[Ajuda] Nao carrega
#1

Galera nao ta carregando as info do player ...

nao carrega nd level , o lugar da onde saiu etc... na moral nada carrega

pawn Код:
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);
pawn Код:
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;
}
Reply
#2

E o Salvar ? As vezes o Problema estб nele!
Reply
#3

Aho que estar coreto Olhe.

pawn Код:
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;
}
Reply
#4

O ъnico Problema que encontrei foi esse:

pawn Код:
TitoX[playerid] = DOF2_GetFloat(String, "CoordenadaX");
TitoY[playerid] = DOF2_GetFloat(String, "CoordenadaY");
TitoZ[playerid] = DOF2_GetFloat(String, "CoordenadaZ");
TitoA[playerid] = DOF2_GetFloat(String, "CoordenadaA");
O Resto estб correto...
Reply
#5

kkkk pdc isso nгo ta fazendo carregar as info do player.
Reply
#6

Quote:
Originally Posted by mau.tito
Посмотреть сообщение
pawn Код:
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);
porque voce usa GetPlayerPos(playerid,TitoX[playerid],TitoY[playerid],TitoZ[playerid]); aqui?
nao deveria ser SetPlayerPos ?
jб verificou o ficheiro, se salva correto ?
Reply
#7

Quote:
Originally Posted by DJloko
Посмотреть сообщение
porque voce usa GetPlayerPos(playerid,TitoX[playerid],TitoY[playerid],TitoZ[playerid]); aqui?
nao deveria ser SetPlayerPos ?
jб verificou o ficheiro, se salva correto ?
Sim salva corretamente , era o salvamento que estava errado, ja estou corrijindo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)