14.05.2012, 21:23
pawn Code:
public OnPlayerDisconnect(playerid, reason)
{
SalvarConta(playerid);
return 1;
}
public OnGameModeExit()
{
DOF2_Exit();
return 1;
}
SalvarConta(playerid)
{
new file[64];
new Float:Vida, Float:Colete;
GetPlayerHealth(playerid, Vida);
GetPlayerArmour(playerid, Colete);
format(file, sizeof(file), d_CONTAS, PlayerInfo[playerid][Nome]);
DOF2_SetInt(file, "Assassinatos",PlayerInfo[playerid][Assassinatos]);
DOF2_SetInt(file, "Mortes",PlayerInfo[playerid][Mortes]);
DOF2_SetInt(file, "Dinheiro",PlayerInfo[playerid][Dinheiro]);
DOF2_SetInt(file, "AdminLevel",PlayerInfo[playerid][Admin]);
DOF2_SetFloat(file, "Vida",Vida);
DOF2_SetFloat(file, "Colete",Colete);
return DOF2_SaveFile();
}