View Single Post
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 01-27-2013 , 11:43   Re: [CS:GO] Zeus Round
Reply With Quote #121

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(clientg_bIsControllingBot1); 

Then all I do is check
PHP Code:
if (IsPlayerControllingBot(client)) 
__________________
View my Plugins | Donate
TnTSCS is offline