25.06.2009, 07:50
pawn Код:
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has joined the server", name);
SendClientMessageToAll(0xAAAAAAAA, string);
}
public OnPlayerDisconnect(playerid, reason)
{
new pName[MAX_PLAYER_NAME];
new string[56];
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason)
{
case 0: format(string, sizeof(string), "%s has left the server. |~Crashed~|", 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(0xAAAAAAAA, string);
}