11.12.2015, 08:07
Acho que estб dando conflito entre variбveis, tente agora.
PHP код:
stock SalvarPlayer(playerid)
{
GetPlayerName(playerid, Nome, sizeof(Nome));
GetPlayerPos(playerid, CoordX[playerid], CoordY[playerid], CoordZ[playerid]);
GetPlayerFacingAngle(playerid, CoordA[playerid]);
format(String, sizeof(String), CONTAS, Nome);
DOF2_SetInt(String, "Dinheiro", GetPlayerMoney(playerid));
DOF2_SetInt(String, "Skin", GetPlayerSkin(playerid));
DOF2_SetInt(String, "Procurado", GetPlayerWantedLevel(playerid));
DOF2_SetInt(String, "CoordInt", GetPlayerInterior(playerid));
DOF2_SetFloat(String, "CoordX", CoordX[playerid]);
DOF2_SetFloat(String, "CoordY", CoordY[playerid]);
DOF2_SetFloat(String, "CoordZ", CoordZ[playerid]);
DOF2_SetFloat(String, "CoordA", CoordA[playerid]);
DOF2_SaveFile();
new Str[50];
format(Str, sizeof(Str), "LevelBRL/%s.ini", Nome);
DOF2_SetInt(Str, "Segundos", PlayerInfo[playerid][pSegundos]);
DOF2_SetInt(Str, "Score", GetPlayerScore(playerid));
DOF2_SaveFile();
return true;
}
stock CarregarPlayer(playerid)
{
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), CONTAS, Nome);
GivePlayerMoney(playerid, DOF2_GetInt(String, "Dinheiro"));
SetPlayerSkin(playerid, DOF2_GetInt(String, "Skin"));
SetPlayerWantedLevel(playerid, DOF2_GetInt(String, "Procurado"));
SetPlayerPos(playerid, DOF2_GetFloat(String, "CoordX"), DOF2_GetFloat(String, "CoordY"), DOF2_GetFloat(String, "CoordZ"));
SetPlayerFacingAngle(playerid, DOF2_GetFloat(String,"CoordA"));
SetPlayerInterior(playerid, DOF2_GetInt(String, "CoordInt"));
new Str[60];
format(Str, sizeof(Str), "LevelBRL/%s.ini", Nome);
PlayerInfo[playerid][pSegundos] = DOF2_GetInt(Str, "Segundos");
SetPlayerScore(playerid, DOF2_GetInt(Str, "Score"));
return true;
}

