30.11.2013, 15:33
Como o titulo diz, a callback nao й chamada. Algumas dicas?
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
printf("> players: %d",GetPlayers());
SaveAccount(playerid);
new string[1024];
switch(reason)
{
case 0: format(string, sizeof(string), "O jogador {ffffff}%s {2CF52C}[{ffffff}ID:%d{2CF52C}] caiu/crashou do servidor.[{ffffff}%d/%d{2CF52C}]", GetPlayerNameEx(playerid),playerid,GetPlayers(),GetMaxPlayers());
case 1: format(string, sizeof(string), "O jogador {ffffff}%s {2CF52C}[{ffffff}ID:%d{2CF52C}] abandonou o servidor.[{ffffff}%d/%d{2CF52C}]", GetPlayerNameEx(playerid),playerid,GetPlayers(),GetMaxPlayers());
}
SendClientMessageToAll(COLOR_GREEN,string);
if(TeamAlien[playerid] == 1) TeamAlien[playerid] = 0, Aliens--;
if(TeamHuman[playerid] == 1) TeamHuman[playerid] = 0, Humans--;
PlayerInfo[playerid][Kills] = 0;
PlayerInfo[playerid][Deaths] = 0;
PlayerInfo[playerid][Vip] = 0;
PlayerInfo[playerid][Admin] = 0;
PlayerInfo[playerid][Prenda] = 0;
return 1;
}