This is how to add auto offsets to a CS 1.6 Hack source.
Anywhere in client.cpp
PHP Code:
void func_offsetlog()
{
string filepath = getOgcDirFile(cmd.argC(1));
filepath += "OffsetLog.ini";
ofstream outfile;
outfile.open(filepath.c_str(), ofstream::out | ofstream::trunc);
outfile<<"SoundByte : 0x" <<soundbyte<<endl;
outfile<<"GlobalTime : 0x" <<globaltime<<endl;
outfile<<"PlayerMove : 0x" <<ppmove<<endl;
outfile<<"EngineFuncs : 0x" <<pEngfuncs<<endl;
outfile<<"SlotsPointer : 0x" <<slots<<endl;
outfile<<"EngineStudio : 0x" <<pstudio<<endl;
outfile<<"StudioInterface : 0x" <<ppinterface<<endl;
outfile.close();
}
PHP Code:
cmd.AddCommand("logoffsets" ,func_offsetlog);
//or most src's are set like
REGISTER_COMMAND(logoffsets);
This will make a file in ur hack directory named offsets.iini