[pawn]public OnPlayerDisconnect(playerid, reason)
{
new PlayerName[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(ServerInfo[ConnectMessages] == 1)
{
switch (reason) {
case 0: format(str, sizeof(str), \"*** %s (%d) elhagyta a szervert (Idõtúllépés)\", PlayerName, playerid);
case 1: format(str, sizeof(str), \"*** %s (%d) elhagyta a szervert (Kilépés)\", PlayerName, playerid);
case 2: format(str, sizeof(str), \"*** %s (%d) elhagyta a szervert (Kick/Bann)\", PlayerName, playerid);
}
SendClientMessageToAll(grey, str);
}
if(PlayerInfo[playerid][LoggedIn] == 1) SavePlayer(playerid);
if(udb_Exists(PlayerName2(playerid))) dUserSetINT(PlayerName2(playerid)).(\"loggedin\",0);
PlayerInfo[playerid][LoggedIn] = 0;
PlayerInfo[playerid][Level] = 0;
PlayerInfo[playerid][Jailed] = 0;
PlayerInfo[playerid][Frozen] = 0;
if(PlayerInfo[playerid][Jailed] == 1) KillTimer( JailTimer[playerid] );
if(PlayerInfo[playerid][Frozen] == 1) KillTimer( FreezeTimer[playerid] );
if(ServerInfo[Locked] == 1) KillTimer( LockKickTimer[playerid] );
if(PlayerInfo[playerid][pCar] != -1) CarDeleter(PlayerInfo[playerid][pCar]);
#if defined ENABLE_SPEC
for(new x=0; x<MAX_PLAYERS; x++)
if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo
AdvanceSpectate(x);
#endif
return 1;
}[/pawn]