[Ajuda] ajuda com combustivel !
#1

Eai pessoal , hoje estarei pedindo a ajuda de vocкs com um velocimetro que coloquei sу que ele nгo esta carregando o combustivel !


tipo quando eu criou /cv id do veiculo ele tem quer ficar indesponivel


quando criou um veiculo da concessionaria ele tem quer mostrar a gasolina (pois o erro esta ai , nгo aparecer )
pawn Код:
for(new carro = 0; carro < MAX_CONCES; carro++)
        {
            format(file2, sizeof(file2), PASTA_CONCE, carro);
            //if(dini_Exists(file2))
            {
                if(cCarro[playerid] == 1)
                {
                    if(GetPlayerVehicleID(playerid) == dini_Int(file2, "Id"))
                    {
                        format(file2, sizeof(file2), PASTA_CONCE, carro);
                        dini_IntSet(file2, "Combustivel", MAX_COMB);
                        format(str3,sizeof(str3),"~w~~d~Combustivel: ~g~~h~%d", cCarro[playerid]);
                        TextDrawSetString(combustivelt[i], str3);
                    }
                }
                else
                {
                    if(cCarro[playerid] == -1)
                    {
                        format(str3,sizeof(str3),"~w~~d~Combustivel: ~g~~h~Indisponivel");
                        TextDrawSetString(combustivelt[i], str3);
                    }
                }
                SaveDtenPlayerPos[i][LastX] = Speedo_X, SaveDtenPlayerPos[i][LastY] = Speedo_Y, SaveDtenPlayerPos[i][LastZ] = Speedo_Z;
            }
        }
Reply
#2

tente assim

pawn Код:
for(new carro = 0; carro < MAX_CONCES; carro++)
        {
            format(file2, sizeof(file2), PASTA_CONCE, carro);
            if(dini_Exists(file2))
            {
                if(cCarro[playerid] == 1)
                {
                    if(GetPlayerVehicleID(playerid) == dini_Int(file2, "Id"))
                    {
                        format(file2, sizeof(file2), PASTA_CONCE, carro);
                        dini_IntSet(file2, "Combustivel", MAX_COMB);
                        format(str3,sizeof(str3),"~w~~d~Combustivel: ~g~~h~%d", cCarro[playerid]);
                        TextDrawSetString(combustivelt[i], str3);
                    }
                }
                else
                {
                    format(str3,sizeof(str3),"~w~~d~Combustivel: ~g~~h~Indisponivel");
                    TextDrawSetString(combustivelt[i], str3);
                }
                SaveDtenPlayerPos[i][LastX] = Speedo_X, SaveDtenPlayerPos[i][LastY] = Speedo_Y, SaveDtenPlayerPos[i][LastZ] = Speedo_Z;
            }
        }
Reply
#3

nгo funcionou
Reply
#4

Quote:
Originally Posted by Dieguinho
Посмотреть сообщение
nгo funcionou
Manda mais codigo acima desses e mais abaixo desses pq n entendie "^^"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)