Simple Fuel Saving/Loading System [Help]
#1

I have it to where when the server starts the first time, it creates all the vehicle files. (VEHICLEID.ini)
Then when I enter a vehicle, it loads the VehicleID File based by VehicleID.
Now I want it to load the text "Fuel = ##"

At The Top Of The GM:
Код:
Float:Fuel[MAX_VEHICLES]
So what I have for entering vehicle is:
Код:
new File_Fuel = dini_Int(VehicleFile, "Fuel");
Fuel[File_VehicleID] = File_Fuel;
Obviously, there is more code. But pretty self-explainitory.
So, Fuel is the Variable I use for my fuel system. (0-100)
Now I want it to load the Fuel Number from the dini file.
It compiled good. I went in-game and enter a vehicle. The Vehicle has no fuel
None of the vehicles have fuel now?

Код:
In My Vehicle File I Have This:
ID=0
Owner=None
ZVehicleID=439
Fuel=84
CarX=1834.857666
CarY=-1871.735351
CarZ=13.283900
Rotation=180.000000
CarColor1=25
CarColor2=78
Respawn_Delay=0
CarFaction=0
Price=560
What's wrong with the code?

Should It be somewhere else other than OnPlayerEnterStreamVehicle?
Reply
#2

You might have wrong control structures where you are freezing the player if there isn't a fuel.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)