When player disconect see reason but with command
#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


Messages In This Thread
When player disconect see reason but with command - by Configuration - 20.07.2013, 21:40
Re : When player disconect see reason but with command - by AmirRFCNR - 20.07.2013, 22:05

Forum Jump:


Users browsing this thread: 1 Guest(s)