[Ajuda] Erro Desconhecido
#1

Eae galera, estou montando um gamemode para meu servidor e estou com um problema na Skin..

Montei agora recentemente com ajuda de um membro do forum uma script de level up para meu GM mais acho que estб fazendo alteraзхes nos outros valores..

- PROBLEMA -
Ao conectar no meu servidor, vocк й setado em spaw defino com a skin 97 e 800 reais.
Ao sair й salvo tudo, para quando relogar ser setado os ultimos valores, como dinheiro, spaw x,y,z e a e skin
mais EVENTUALMENTE do nada vocк renasce com a skin do CJ no bloco de notos voce ta com um valor muito loko na skin.. Como mostra as imagem a baixo.

Normal - http://i.imgur.com/k18jEhw.png

Quando rola o Erro - http://i.imgur.com/8QBbbM7.png

E as vezes quando nao muda a skin muda й os valores da coordenada e o char nasce no ponto 0 do mapa.
Nem imagino o que seja.
Reply
#2

Manda as linhas de salvamento e carregamento, sem elas nгo tem como te ajudar.
Reply
#3

Salvamento - http://i.imgur.com/KWK9Z3y.png

Carregamento - http://i.imgur.com/J3AsqJd.png

quer no pasterbin?
Reply
#4

Cara nгo precisa ficar botando os erros no imgur coloca o codigo aqui so coloca assim

pawn Код:
Codigo
Reply
#5

Ta ai..
Quote:

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;
}

Reply
#6

Cara nгo precisa ficar botando os erros no imgur coloca o codigo aqui so coloca assim

pawn Код:
Codigo
Reply
#7

Enviei jб
Reply
#8

Acho que estб dando conflito entre variбveis, tente agora.

PHP код:
stock SalvarPlayer(playerid)
{
    
GetPlayerName(playeridNomesizeof(Nome));
    
GetPlayerPos(playeridCoordX[playerid], CoordY[playerid], CoordZ[playerid]);
    
GetPlayerFacingAngle(playeridCoordA[playerid]);

    
format(Stringsizeof(String), CONTASNome);
    
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(Strsizeof(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(playeridNomesizeof(Nome));

    
format(Stringsizeof(String), CONTASNome);
    
GivePlayerMoney(playeridDOF2_GetInt(String"Dinheiro"));
    
SetPlayerSkin(playeridDOF2_GetInt(String"Skin"));
    
SetPlayerWantedLevel(playeridDOF2_GetInt(String"Procurado"));
    
SetPlayerPos(playeridDOF2_GetFloat(String"CoordX"), DOF2_GetFloat(String"CoordY"), DOF2_GetFloat(String"CoordZ"));
    
SetPlayerFacingAngle(playeridDOF2_GetFloat(String,"CoordA"));
    
SetPlayerInterior(playeridDOF2_GetInt(String"CoordInt"));

    new 
Str[60];
    
format(Strsizeof(Str), "LevelBRL/%s.ini"Nome);
    
PlayerInfo[playerid][pSegundos] = DOF2_GetInt(Str"Segundos");
    
SetPlayerScore(playeridDOF2_GetInt(Str"Score"));

    return 
true;

Reply
#9

Nгo deu.... Ele agora ta mudando os valores sу quando do "exit" no console do servidor..
e o relogio de up ta rapidгo....

Se eu ficar saindo e entrando no servidor funciona normalmente
mais se eu eu fechar o console a abrir de novo o servidor ele buga a skin, a coordenada e tudo que й de numero...

To achando que deve ser algum erro na script do LevelUP (RelogioUP,convert,e contagem) Cicinho.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)