So I'm trying to reset the server password when everyone lefts the server. The problem is it doesn't work for some reason.
PHP Code:
public client_disconnect( id )
{
new Players[ 32 ], iNum
get_players( Players, iNum, "ch" )
if( !iNum )
_e_AllPlayersLeft( id )
}
public _e_AllPlayersLeft( LastConnectedPlayer )
{
server_cmd( "sv_password fuckoff" )
}
Nothing happens, the password still remains unchanged. What could be wrong?
Edit: Is the player still "in server" when get_players() gets called? I know you cannot execute anything on him though.
__________________
Currently busy working on a very large scale anime database project.