View Single Post
Author Message
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-06-2012 , 04:59   get_players in client_disconnect
Reply With Quote #1

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_disconnectid )
{
    new 
Players32 ], iNum
    get_players
PlayersiNum"ch" )
    
    if( !
iNum )
        
_e_AllPlayersLeftid )
}

public 
_e_AllPlayersLeftLastConnectedPlayer )
{
    
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.

Last edited by Backstabnoob; 05-06-2012 at 05:01.
Backstabnoob is offline