29.05.2010, 17:42
Quote:
Originally Posted by TheGarfield
Bota mais algumas linhas ...
|
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
{
if (PLAYERLIST_authed[playerid] == 1);
{
// Was loggedin, so save the data!
udb_setAccState(PlayerName(playerid),GetPlayerMoney(playerid));
new Float:health;
Presos[playerid] = 0;
Procurados[playerid] = 0;
GetPlayerHealth(playerid, health);
udb_setHealth(PlayerName(playerid), health);
udb_setGasoline(PlayerName(playerid), Petrol[playerid]);
udb_setProf(PlayerName(playerid), Profissao[playerid]);
}
return 1;
}
new PlayerName[MAX_PLAYER_NAME];
new string[56];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
switch(reason)
{
case 0: format(string, sizeof(string), "%s saiu do servidor. (Problema de conexгo)", PlayerName);
case 1: format(string, sizeof(string), "%s saiu do servidor. (Conta prуpria)", PlayerName);
case 2: format(string, sizeof(string), "%s saiu do servidor. (Kickado/Banido)", PlayerName);
}
SendClientMessageToAll(Cor_Azul,string);
return 1;
}