Quote:
Originally Posted by Rolnaaba
@organizedKaos
what do you mean thats nothing like checking if is user bot he is checking if the cvars he created are equal to zero for the plugin to continue, but the default value for those cvars is 1...
|
Negative....you are still confused.
Code:
if(is_user_bot(id))
return PLUGIN_CONTINUE
Will stop if the users id returns as bot, or 1 since is_user_bot will return 1 on true and 0 on false.
Heres an example....taken from Xanimos' current one name plugin
Code:
public client_infochanged(id)
{
if(g_Vault < 0) // This statement says STOP if g_Vault is less than zero
return PLUGIN_CONTINUE;
if(g_bAllowed[id] || is_user_bot(id))// This statement here says STOP if g_bAllowed[id] returns true or is_user_bot(id) returns 1.
return PLUGIN_CONTINUE;
new szNewName[36] , szSavedName[36] , szAuth[36];
get_user_info(id , "name" , szNewName , 35)
get_user_authid( id , szAuth , 35);
if(!nvault_lookup(g_Vault , szAuth , szSavedName , 35 , gabenstamp))
{
return PLUGIN_CONTINUE;
}
if(!equali(szNewName , szSavedName))
{
stock_SetName(id , szSavedName);
client_print(id , print_chat , "[AMXX] Sorry but you are only allowed to use one name here.");
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
Now let's see you question it again, and this time question it to Xanimos.
Like I said earlier, and it still stands, that function will
NOT proceed if the var is 0. Case and point.