01.07.2015, 04:51
Eu uso a include DOF2, salvar nгo й o problema, fica tudo perfeito, o problema, й na hora de carregar, que reseta tudo, se alguem puder me ajudar! Ao invйs de carregar o que ta no arquivo ele reseta o que ta no arquivo!
Uso as includes:
Uso as includes:
PHP код:
#include <a_samp>
#include <foreach>
#include <zcmd>
#include <DOF2>
#include <mSelection>
#include <Streamer>
#include <sscanf>
PHP код:
stock CarregarPlayer(playerid)
{
new Arquivodelogin[256];
format(Arquivodelogin, sizeof(Arquivodelogin), "Contas/%s.ini", Nome(playerid));
if(DOF2_FileExists(Arquivodelogin))
{
PlayerInfo[playerid][pAdmin] = DOF2_GetInt(Arquivodelogin, "Administrador");
PlayerInfo[playerid][pMod] = DOF2_GetInt(Arquivodelogin, "Moderador");
PlayerInfo[playerid][pAju] = DOF2_GetInt(Arquivodelogin, "Ajudante");
PlayerInfo[playerid][pDono] = DOF2_GetInt(Arquivodelogin, "Dono");
SetPlayerScore(playerid, DOF2_GetInt(Arquivodelogin, "Level"));
PlayerInfo[playerid][pRespeito] = DOF2_GetInt(Arquivodelogin, "EXP");
//SetPlayerSkin(playerid, DOF2_GetInt(Arquivodelogin, "Skin"));
PlayerInfo[playerid][pMatou] = DOF2_GetInt(Arquivodelogin, "Matou");
PlayerInfo[playerid][pMorreu] = DOF2_GetInt(Arquivodelogin, "Morreu");
GivePlayerMoney(playerid, DOF2_GetInt(Arquivodelogin, "Dinheiro"));
PlayerInfo[playerid][pProfissao] = DOF2_GetInt(Arquivodelogin,"Profissao");
PlayerInfo[ playerid ][ pSpawn ] = DOF2_GetInt(Arquivodelogin,"Spawn");
PlayerInfo[ playerid ][ pTCasa ] = DOF2_GetInt(Arquivodelogin,"Casa" );
PlayerInfo[ playerid ][ pImpostos ] = DOF2_GetInt(Arquivodelogin,"Impostos");
PlayerInfo[ playerid ][ pAtrasados ] = DOF2_GetInt(Arquivodelogin,"Atrasados");
pVip[playerid][0]= DOF2_GetInt(Arquivodelogin,"pVTime");
pVip[playerid][1] = DOF2_GetInt(Arquivodelogin,"pVip");
EmpresaInfo[playerid][Numero] = DOF2_GetInt(Arquivodelogin,"EmpresaID");
PlayerInfo[ playerid ][ pContratado ] = DOF2_GetInt(Arquivodelogin,"Contratado");
PlayerInfo[playerid][pGalaoGasolina] = DOF2_GetInt(Arquivodelogin,"LitrosGalao");
PlayerInfo[playerid][pTemGalao] = DOF2_GetInt(Arquivodelogin,"TemGalao");
PlayerInfo[playerid][pCelular] = DOF2_GetInt(Arquivodelogin,"CelNumero");
PlayerInfo[playerid][pPhoneBook] = DOF2_GetInt(Arquivodelogin,"AgendaTel");
PlayerInfo[playerid][pCreditos] = DOF2_GetInt(Arquivodelogin,"Creditos");
PlayerInfo[playerid][pFightingStyle] = DOF2_GetInt(Arquivodelogin,"EstiloLuta");
PlayerInfo[playerid][pCarLic] = DOF2_GetInt(Arquivodelogin,"LicencaCarro");
PlayerInfo[playerid][pBarcoLic] = DOF2_GetInt(Arquivodelogin,"LicencaBarco");
PlayerInfo[playerid][pAviaoLic] = DOF2_GetInt(Arquivodelogin,"LicencaAviao");
PlayerInfo[playerid][pLicArma] = DOF2_GetInt(Arquivodelogin,"LicencaArma");
PlayerInfo[playerid][pCadeia] = DOF2_GetInt(Arquivodelogin,"Preso");
PlayerInfo[playerid][pAbuser] = DOF2_GetInt(Arquivodelogin,"Abuser");
PlayerInfo[playerid][pCongelado] = DOF2_GetBool(Arquivodelogin, "pCongelado");
PlayerInfo[playerid][pCalado] = DOF2_GetBool(Arquivodelogin, "pCalado");
PlayerInfo[playerid][pCapacete] = DOF2_GetInt(Arquivodelogin,"Capacete");
PlayerInfo[playerid][pBoombox] = DOF2_GetInt(Arquivodelogin,"Boombox");
PlayerInfo[playerid][pAlgemado] = DOF2_GetInt(Arquivodelogin,"Algemado");
PlayerInfo[playerid][pRelogioCor] = DOF2_GetInt(Arquivodelogin,"Cor_Relogio");
PlayerInfo[playerid][pSegUP] = DOF2_GetInt(Arquivodelogin,"SegUP");
PlayerInfo[playerid][pMinUP] = DOF2_GetInt(Arquivodelogin,"MinUP");
PlayerInfo[playerid][pLocal] = DOF2_GetInt(Arquivodelogin, "Local");
PlayerInfo[playerid][pTem_Kit] = DOF2_GetInt(Arquivodelogin,"KitFavela");
SetPlayerInterior(playerid, DOF2_GetInt(Arquivodelogin, "Interior"));
/* PlayerInfo[playerid][pPosX] = DOF2_GetFloat(Arquivodelogin, "pPosX");
PlayerInfo[playerid][pPosY] = DOF2_GetFloat(Arquivodelogin, "pPosY");
PlayerInfo[playerid][pPosZ] = DOF2_GetFloat(Arquivodelogin, "pPosZ");
PlayerInfo[playerid][pPosA] = DOF2_GetFloat(Arquivodelogin, "pPosA");*/
for(new i = 0; i < sizeof(Registro); i++) { TextDrawHideForPlayer(playerid, Registro[i]);}
CancelSelectTextDraw(playerid);
if(PlayerInfo[ playerid ][ pTCasa ] == 1 && PlayerInfo[ playerid ][ pSpawn ] == 1 )
{
SpawnCasa( playerid );
}
else
{
SetSpawnInfo(playerid, 0, DOF2_GetInt(Arquivodelogin, "Skin"), DOF2_GetFloat(Arquivodelogin, "pPosX"),DOF2_GetFloat(Arquivodelogin, "pPosY"),DOF2_GetFloat(Arquivodelogin, "pPosZ"),DOF2_GetFloat(Arquivodelogin, "pPosA"),0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
}
return 1;
}