How can i fix this?
#1

Hello, does anyone know how i can fix this major problem i have, i have a fuel system that i just made. The fuel system does not change fuel and when u enter any vehicle the fuel is always 0. does anyone know?

code:
public OnFilterScriptInit()
{
for(new i=0;i<MAX_VEHICLES;i++) {
fuel[i] = 100;
}
SetTimer("timer_fuel_lower",4200,true);
return 1;
}

thats the bit that is supposed to make the fuel 100 in every car



BigAl
Reply
#2

We cant say much about it without any code. Could be a problem with integers/floats (you set new a = 0.0 or new Float:a = 0)
Reply
#3

okay i will just go get the code, but the thing is, it works for cars/vehicles scripted into the Gamemode but doesnt work for cars that i spawn, is there anyway i can add this under the callback OnVehicleSpawn(vehicleid)

please reply
Reply
#4

Yep, you can do it with OnVehicleSpawn:

pawn Код:
public OnVehicleSpawn(vehicleid)
{
    fue[vehicleid] = 100;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)