07.11.2015, 16:04
tente
PHP Code:
public OnPlayerDisconnect(playerid, reason)
{
new file[50], aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, sizeof(aname));
format(file, sizeof(file), "Contas/%.ini", aname);
if(DOF2_FileExists(file))
{
DOF2_SetFloat(file, "Vida", pInfo[playerid][vida]);
new Arma[13], Balas[13], sArma[20], sBalas[20];
for(new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, Arma[i], Balas[i]);
format(sArma, sizeof(sArma),"Arma%d", i);
DOF2_SetInt(file, sArma, Arma[i]);
format(sBalas, sizeof(sBalas),"Balas%d", i);
DOF2_SetInt(file, sBalas, Balas[i]);
}
DOF2_SaveFile();
}
return 1;
}