from what
Miraculix said, bot_takeover event never fires, but I'll verify later today if you want.
I don't think I'm setting m_bIsControllingBot, i'm just retrieving the information:
PHP Code:
new g_bIsControllingBot = -1;
public OnPluginStart()
{
g_bIsControllingBot = FindSendPropInfo("CCSPlayer", "m_bIsControllingBot");
if (g_bIsControllingBot == -1)
{
SetFailState("Unable to locate m_bIsControllingBot");
}
}
/**
* Check if a player is controlling a bot
* @param client Player's ClientID
* @return 1 if player is controlling a bot or 0 if player is not controlling a bot
*/
IsPlayerControllingBot(client)
{
return GetEntData(client, g_bIsControllingBot, 1);
}
Then all I do is check
PHP Code:
if (IsPlayerControllingBot(client))
__________________