[HELP] fuel wrong set
#1

Hello I have a fuel system and know is the problem when I turn on server and go to nrg it say's that is fuel 40 L but it should be 15 L?.For buses cars and trucks it work's fine. What cause that problem? Thanks

Here is code for setting fuel on ongamemodeinit


pawn Код:
for(new o = 1; o < MAX_CARS; o++)
    {
        if(o != INVALID_VEHICLE_ID)
        {
            if(IsAPlane(GetVehicleModel(o)) || IsABus(GetVehicleModel(o))) Fuel[o] = 80.00;
            else if(IsACar(GetVehicleModel(o))) Fuel[o] = 40.00;
            else if(IsAMotocycle(GetVehicleModel(o))) Fuel[o] = 15.00;
            else if(IsATruck(GetVehicleModel(o))) Fuel[o] = 100.00;
            else  Fuel[o] = 40.00;
        }
    }
Reply
#2

Try removing this from your code

PHP код:
            else  Fuel[o] = 40.00
Then rebuild and retry.
Reply
#3

Then it all goes wrong. I already try that.
Reply
#4

Does the fuel has a minimum ?
Reply
#5

Well, pretty obvious is go and check your custom function:

pawn Код:
IsAMotocycle
and find out if there's NRG's ID. Right?

Quote:
Originally Posted by S4t3K
Посмотреть сообщение
Try removing this from your code

PHP код:
            else  Fuel[o] = 40.00
Then rebuild and retry.
What value you going to set to the vehicles not included in if statements then? Of course, you're wrong.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)