23.02.2010, 20:06
pawn Код:
//OnPlayerConnect(playerid)
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s has joined the server!", pName);
SendClientMessageToAll(color, string);
//OnPlayerDisconnect(playerid, reason)
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason)
{
case 0: format(string, sizeof(string), "%s has left the server. [Timeout]", pName);
case 1: format(string, sizeof(string), "%s has left the server. [Leaving]", pName);
case 2: format(string, sizeof(string), "%s has left the server. [Kicked/Banned]", pName);
}
SendClientMessageToAll(color, string);