AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   difference between flags and is_user_bot (https://forums.alliedmods.net/showthread.php?t=84583)

whosyourdaddy 01-28-2009 13:30

difference between flags and is_user_bot
 
im wondering what the difference is between
Code:

is_user_bot(id)
and
Code:

(pev(id, pev_flags) & FL_FAKECLIENT)



ConnorMcLeod 01-28-2009 13:48

Re: difference between flags and is_user_bot
 
Check only pev_flags may return false results, is_user_bot checks other things :

PHP Code:

__is_user_botid )
{
    if( 
<= id <= get_maxplayers() )
    {
        if( (
pev(idpev_flags) & FL_FAKECLIENT) == FL_FAKECLIENT) )
        {
            return 
1
        
}
        new 
szAuth[32]
        
get_user_authid(idszAuthcharsmax(szAuth))
        if( 
szAuth[0] && equal(szAuth"BOT") )
        {
            return 
1
        
}
    }
    return 
0




All times are GMT -4. The time now is 01:46.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.