SA-MP Forums Archive
[Ajuda] ajuda com combustivel ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] ajuda com combustivel ! (/showthread.php?tid=489936)



ajuda com combustivel ! - Dieguinho - 24.01.2014

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



Respuesta: ajuda com combustivel ! - cantiliano - 24.01.2014

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



Re: ajuda com combustivel ! - Dieguinho - 24.01.2014

nгo funcionou


Respuesta: Re: ajuda com combustivel ! - cantiliano - 24.01.2014

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