fuel on startup
#1

Hello!

I got a fuel system, and it fills the cars on server startup.
But i have NPCs in vehicles and they cant refuel by them self and get out of fuel.
So how to do to get vehicle ids to get like 9999 fuel? i want id 548 and id 592 to get 9999 in fuel on startup.

Code on OnGameModeInit:
pawn Код:
for(new i=0;i<MAX_VEHICLES;i++) {
        fuel[i] = 250 + random(150);
    }
Reply
#2

pawn Код:
for(new i=0;i<MAX_VEHICLES;i++) {
        fuel[i] = 250 + random(150);
        if(i == 592 || i == 548) fuel[i] = 99999;    
}
Reply
#3

Quote:
Originally Posted by Pharrel
Посмотреть сообщение
pawn Код:
for(new i=0;i<MAX_VEHICLES;i++) {
        fuel[i] = 250 + random(150);
        if(i == 592 || i == 548) fuel[i] = 99999;    
}
Getting warning 213: tag mismatch on that and it doesn't work
Reply
#4

i changed him...try again
Reply
#5

Quote:
Originally Posted by Pharrel
Посмотреть сообщение
i changed him...try again
i have
pawn Код:
if(i == 592 || i == 548) fuel[i] = 99999;
no warning, but it still doesn't work
Reply
#6

pawn Код:
for(new i=0;i<MAX_VEHICLES;i++)
    {
        if(i == 592 || i == 548)
        {
            fuel[i] = 99999;
            continue;
        }
        fuel[i] = 250 + random(150);
    }
Reply
#7

Quote:
Originally Posted by Pharrel
Посмотреть сообщение
pawn Код:
for(new i=0;i<MAX_VEHICLES;i++)
    {
        if(i == 592 || i == 548)
        {
            fuel[i] = 99999;
            continue;
        }
        fuel[i] = 250 + random(150);
    }
Hmm...it still not working :/
Reply
#8

lol so it must have something in your GM that is setting the fuel after this loop...
Reply
#9

Quote:
Originally Posted by Pharrel
Посмотреть сообщение
lol so it must have something in your GM that is setting the fuel after this loop...
No i havent, the only thing that can sett the fuel is when you refueling your self.
Reply
#10

idk then... i'm sure that this function works...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)