I apologize my english is rubbish...
You must hack dll and get offset.
For example, let's try to get m_isFollowing offset.
https://github.com/perilouswithadoll...cs_bot.h#L1001
And find some code where using m_isFollowing property in source code.
I found this one:
https://github.com/perilouswithadoll...achine.cpp#L84
and as you can see, in that code, compares m_isFollowing(
https://github.com/perilouswithadoll...achine.cpp#L90).
And set m_isFollowing property values to true(
https://github.com/perilouswithadoll...achine.cpp#L93).
and open server.dll and go to CCSBot::Follow function.
keep it mind, COMPARES m_isfollowing, and SET m_isfollowing to true.
let's find offset which use 2 times. because in source code, compares, and set value (totally 2 times)
I found this one: 3C10h.
but it's not the offset what we want find. because there are 2 'mov' instruction. its about set values (like, move instruction is... eax, 123123(assambler) -> a = 123123(C, java, etc))
and I found this one: 3C0Ch.
looks like this offset is right which we want find! because there are 'cmp', 'mov' instruction. comapres, and set value.
and let's convert offset to decimal. cause that offset is hexadecimal.
(and we can get 15372 value converting by 3C0C)
and make game data file like this.
and lets test some code like this...
Code:
#include <sourcemod>
#include <sdktools>
Handle g_gameConfig = INVALID_HANDLE;
int g_isFollowingOffset;
public void OnPluginStart()
{
RegAdminCmd("sm_test_offset", Cmd_Offset, ADMFLAG_GENERIC);
g_gameConfig = LoadGameConfigFile("bot_new.games");
g_isFollowingOffset = GameConfGetOffset(g_gameConfig, "CCSBot::m_isFollowing");
}
public Action Cmd_Offset(int client, int args)
{
for (int i=1; i<=MaxClients; i++)
{
if (!IsFakeClient(i))
continue;
bool isFollowing = view_as<bool>(LoadFromAddress(GetEntityAddress(i) + view_as<Address>(g_isFollowingOffset), NumberType_Int8));
PrintToChatAll("%N bot is following? %s", i, (isFollowing ? "YES!" : "NO."));
}
return Plugin_Handled;
}
and I tested got(cliffe is my teammate, and I maked him follow me):
Cliffe bot is following? YES!
Wolf bot is following? NO.