When player disconect see reason but with command
#1

HELLO i need when player leave from game and i make /quits see who player have quit game and reason for what he is Leave Crash/Timeout/kick/ban
Thanks
Reply
#2

Creating a Join Message


PHP код:
public OnPlayerConnect(playerid)
{
    new 
pname[MAX_PLAYER_NAME], string[22 MAX_PLAYER_NAME];
    
GetPlayerName(playeridpnamesizeof(pname));
    
format(stringsizeof(string), "%s has joined the server"pname);
    
SendClientMessageToAll(0xAAAAAAAAstring);
    return 
1;

Creating a Leave Message

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    new 
pname[MAX_PLAYER_NAME], string[39 MAX_PLAYER_NAME];
    
GetPlayerName(playeridpnamesizeof(pname)); 
    switch(
reason)
    {
        case 
0format(stringsizeof(string), "%s has left the server. (Lost Connection)"pname);
        case 
1format(stringsizeof(string), "%s has left the server. (Leaving)"pname);
        case 
2format(stringsizeof(string), "%s has left the server. (Kicked)"pname);
    } 
    
SendClientMessageToAll(0xAAAAAAAAstring);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)