new String[100], str[200];
GetPlayerName(playerid, Nome,sizeof(Nome));
format(String, sizeof(String), "Contas/%s.ini", Nome);
if(!strcmp(inputtext,DOF2_GetString(String,"Senha"),false))
{
CarregarConta(playerid);
ClearChatbox(playerid, 25);
SpawnPlayer(playerid);
SetPlayerScore(playerid, TitoInfo[playerid][pScore]);
GivePlayerMoney(playerid, TitoInfo[playerid][pDinheiro]);
GetPlayerPos(playerid,TitoX[playerid],TitoY[playerid],TitoZ[playerid]);
GetPlayerFacingAngle(playerid,TitoA[playerid]);
format(str,sizeof(str),"{FFFFFF}Conta {FF0000}%s{FFFFFF} , esta totalmente {FFC801}carregada{FFFFFF}.", Nome);
SendClientMessage(playerid, -1, str);
SendClientMessage(playerid, -1,"|---------------------------------------------------|");
format(str,sizeof(str),"Seja Bem Vindo , %s .", Nome);
SendClientMessage(playerid, -1, str);
SendClientMessage(playerid, -1,"APh RP");
SendClientMessage(playerid, -1,"|----------------------------------------------------|");
format(str,sizeof(str),"~g~Seja Bem Vindo~n~ ~y~ %s", Nome);
GameTextForPlayer(playerid, str, 2000, 1);
stock CarregarConta(playerid)
{
new voltarcoordenada[256], String[99];
GetPlayerName(playerid, Nome,sizeof(Nome));
format(String, sizeof(String), "Contas/%s.ini", Nome);
TitoInfo[playerid][pDinheiro] = DOF2_GetInt(String, "Dinheiro");
TitoInfo[playerid][pBank] = DOF2_GetInt(String, "Banco");
TitoInfo[playerid][pScore] = DOF2_GetInt(String, "Score");
TitoInfo[playerid][pAdmin] = DOF2_GetInt(String, "AdiminLevel");
TitoInfo[playerid][pJob] = DOF2_GetInt(String, "Emprego");
TitoInfo[playerid][pTut] = DOF2_GetInt(String, "Tutorial");
TitoInfo[playerid][pCash] = DOF2_GetInt(String, "Cash");
TitoInfo[playerid][pRespeito] = DOF2_GetInt(String, "Respeito");
TitoInfo[playerid][pAviso] = DOF2_GetInt(String, "Aviso");
TitoInfo[playerid][pMora] = DOF2_GetInt(String, "Mora");
TitoX[playerid] = DOF2_GetFloat(voltarcoordenada,"CoordenadaX");
TitoY[playerid] = DOF2_GetFloat(voltarcoordenada,"CoordenadaY");
TitoZ[playerid] = DOF2_GetFloat(voltarcoordenada,"CoordenadaZ");
TitoA[playerid] = DOF2_GetFloat(voltarcoordenada,"CoordenadaA");
return 1;
}
stock SalvarConta(playerid)
{
new String[99];
GetPlayerPos(playerid,TitoX[playerid],TitoY[playerid],TitoZ[playerid]);
GetPlayerFacingAngle(playerid,TitoA[playerid]);
GetPlayerName(playerid, Nome,sizeof(Nome));
format(String, sizeof(String), "Contas/%s.ini", Nome);
DOF2_SetInt(String, "Dinheiro", GetPlayerMoney(playerid));
DOF2_SetInt(String, "Banco", TitoInfo[playerid][pBank]);
DOF2_SetInt(String, "Score", GetPlayerScore(playerid));
DOF2_SetInt(String, "AdiminLevel", TitoInfo[playerid][pAdmin]);
DOF2_SetInt(String, "Emprego", TitoInfo[playerid][pJob]);
DOF2_SetInt(String, "Tutorial", TitoInfo[playerid][pTut]);
DOF2_SetInt(String, "Cash", TitoInfo[playerid][pCash]);
DOF2_SetInt(String, "Respeito", TitoInfo[playerid][pRespeito]);
DOF2_SetInt(String, "Aviso", TitoInfo[playerid][pAviso]);
DOF2_SetInt(String, "Mora", TitoInfo[playerid][pMora]);
DOF2_SetFloat(String,"CoordenadaX",TitoX[playerid]);
DOF2_SetFloat(String,"CoordenadaY",TitoY[playerid]);
DOF2_SetFloat(String,"CoordenadaZ",TitoZ[playerid]);
DOF2_SetFloat(String,"CoordenadaA",TitoA[playerid]);
DOF2_SaveFile();
return 1;
}
TitoX[playerid] = DOF2_GetFloat(String, "CoordenadaX");
TitoY[playerid] = DOF2_GetFloat(String, "CoordenadaY");
TitoZ[playerid] = DOF2_GetFloat(String, "CoordenadaZ");
TitoA[playerid] = DOF2_GetFloat(String, "CoordenadaA");
|
pawn Код:
|
|
porque voce usa GetPlayerPos(playerid,TitoX[playerid],TitoY[playerid],TitoZ[playerid]); aqui?
nao deveria ser SetPlayerPos ? jб verificou o ficheiro, se salva correto ? |