Guys please help, i've tried one milion combinations of codes to write a simple line .
I want to ban a player when he disconnect if he has a boolean true .
Idk what is the problem, i was thinking that he disconnect too soon so the server can't get his authid to banhim , i've scrooled all fucking topics i founded and nothing , the same result .
I added an debug message, wich is called properly . but the player doesn't get ban.
My last attempt was to ban him with addip but nothing works .
PHP Code:
public client_disconnect( id )
{
if( cs_get_user_team(id) == CS_TEAM_T )
{
get_user_name( id, gLastRetryName, charsmax(gLastRetryName) );
RetryOn = true;
if( BanHim[id] )
{
server_cmd("amx_ban #%d 30 ^"Reason: TERO RETRY TWO TIMES!^"", get_user_userid(id) )
client_print( 0, print_chat, "Jucatorul %s a primit ban 30 de minute pentru retry ca terorist!", gLastRetryName );
}
}
}
Please note that the message "Jucatorul %s.. " ( an debug message) is properly called, but the line where i'm trying to ban the player is simply isn't called .
Thank you . (the amxx version is higher than 1.8.2)
To make it easy for you, everything works only this part:
Code:
server_cmd("amx_ban #%d 30 ^"Reason: TERO RETRY TWO TIMES!^"", get_user_userid(id) )
__________________