Jump to content

How to get/set fuel level of a vehicle in c++


Giusekk

Recommended Posts

I've been in the mods world for a while now and I've always wanted to find an efficient fuel system. Of course there is 'Fuel Script V Mod' which is a really nice project and which I'm using at the moment.

 

The point is that it occurred to me to create something of my own (adding additional features) and I wanted to write it in c++. The point is, I couldn't find anything on how to get the fuel level of a vehicle using c++.

 

While in c# it's like eating bread:

 

private Vehicle car; 
car = Game.Player.Character.CurrentVehicle; 
car.FuelLevel -= 0.05f;

 

in c++ I have found absolutely nothing, nor searching on the internet, on the docs, I also tried to ask gpt chat as a last resort but I have not found any results.

Does anyone have an idea how to get/change the fuel level in a vehicle in c++ or is it even possible?

Edited by Giusekk
Link to comment
Share on other sites

As far as I know - there is no such thing as 'fuel level' in GTA SA. 
car.FuelLevel is just a user-created variable.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.