Codigo
stock SalvarPlayer(playerid) { GetPlayerName(playerid, Nome, sizeof(Nome)); format(String, sizeof(String), CONTAS, Nome); DOF2::SetInt(String,"Dinheiro", GetPlayerMoney(playerid)); Skin[playerid] = GetPlayerSkin(playerid); DOF2::SetInt(String,"Skin", GetPlayerSkin(playerid)); Procurado[playerid] = GetPlayerWantedLevel(playerid); DOF2::SetInt(String,"Procurado", Procurado[playerid]); GetPlayerName(playerid, Nome, sizeof(Nome)); format(String, sizeof(String), "LevelBRL/%s.ini", Nome); DOF2_SetInt(String, "Segundos", PlayerInfo[playerid][pSegundos]); DOF2_SetInt(String, "Score", PlayerInfo[playerid][pScore]); GetPlayerName(playerid, String, sizeof(String)); format(String, sizeof(String), CONTAS, Nome); GetPlayerPos(playerid,CoordX[playerid],CoordY[playerid],CoordZ[playerid]); GetPlayerFacingAngle(playerid,CoordA[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(); 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")); Procurado[playerid] = DOF2::GetInt(String, "Procurado"); SetPlayerWantedLevel(playerid, Procurado[playerid]); SetPlayerPos(playerid, CoordX[playerid], CoordY[playerid], CoordZ[playerid]); SetPlayerFacingAngle(playerid, CoordA[playerid]); SetPlayerInterior(playerid, DOF2::GetInt(String,"CoordInt")); GetPlayerName(playerid, Nome, sizeof(Nome)); format(String, sizeof(String), "LevelBRL/%s.ini", Nome); PlayerInfo[playerid][pSegundos] = DOF2_GetInt(String, "Segundos"); PlayerInfo[playerid][pScore] = DOF2_GetInt(String, "Score"); SetPlayerScore(playerid, DOF2_GetInt(String,"Score")); DOF2::SaveFile(); return true; } |
Codigo
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;
}