04.02.2017, 03:43
Fiz um sistema de salvar posiзгo ao desconectar e tб dando 3 warnings (tag mismatch)
Code:
Ja tentei por Float no DOF2_SetInt mas tambйm nгo consegui
Code:
PHP код:
public OnPlayerDisconnect(playerid, reason)
{
new file[50], aname[MAX_PLAYER_NAME], Float:x, Float:y, Float:z;
GetPlayerName(playerid, aname, sizeof(aname));
KillTimer(TimerUp[playerid]);
format(file, sizeof(file), "Contas/%s.ini", aname);
if(DOF2_FileExists(file))
{
GetPlayerPos(playerid, x, y, z);
DOF2_SetInt(file, "Dinheiro", GetPlayerCash(playerid));
DOF2_SetInt(file, "Level", pLevel[playerid]);
DOF2_SetInt(file, "MinUP", minutoup[playerid]);
DOF2_SetInt(file, "SegUP", segundoup[playerid]);
DOF2_SetInt(file, "SairX", x);
DOF2_SetInt(file, "SairY", y);
DOF2_SetInt(file, "SairZ", z);
DOF2_SaveFile();
}
return 1;
}