05.01.2010, 13:26
Код:
forward OnPlayerDisconnect(playerid);
Код:
public OnPlayerDisconnect(playerid, reason) { SendDeathMessage(INVALID_PLAYER_ID, playerid, 201); new string[128]; switch (reason) { case 0: { GetPlayerName(playerid, playername, sizeof(playername)); format(string,sizeof(string), "*** %s has left the server (Timeout).", playername); SendClientMessageToAll(COLOR_GREY, string); } case 1: { GetPlayerName(playerid, playername, sizeof(playername)); format(string,sizeof(string), "*** %s has left the server (Leaving).", playername); SendClientMessageToAll(COLOR_GREY, string); } case 2: { GetPlayerName(playerid, playername, sizeof(playername)); format(string,sizeof(string), "*** %s has left the server (Kicked).", playername); SendClientMessageToAll(COLOR_GREY, string); } } return 1; }