19.01.2013, 19:09
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new
LeaveMessage[128];
switch(reason)
{
case 0: format( LeaveMessage,sizeof LeaveMessage, "%s timed out from the server.", GetName(playerid) );
case 1: format( LeaveMessage,sizeof LeaveMessage, "%s left the server.", GetName(playerid) );
case 2: format( LeaveMessage,sizeof LeaveMessage, "%s is banned or kicked from the server.", GetName(playerid) );
}
if(!pShowLeaveMessage[playerid] )
SendClientMessage( playerid, COLOR_GREEN, LeaveMessage );
PlayerInfo[playerid][pLogged] = false;
pShowLeaveMessage[playerid] = true;
SaveStats(playerid);
return 1;
}