InZidiuZ / LegacyFuel

A simple, lightweight fuel script for FiveM
GNU General Public License v3.0
78 stars 217 forks source link

Is it possible to Sync the Fuel with all drivers in car? #72

Open SamDavid93 opened 3 years ago

SamDavid93 commented 3 years ago

Is it possible if yes, how?

for every help i will pleased :)

Sorry for the bad English

sFxMTA commented 3 years ago

Yeah, i did it in my version, you must re-create the fuel passing vars to server and letting the server side decide it

SamDavid93 commented 3 years ago

You mean with a Servercallback or how u do that?

sFxMTA commented 3 years ago

Yeah, pass everything to server and let it manage the fuel level since actually it's in client-side and has a random number so nobody would have the same, the client should get the fuel level from server-side

SamDavid93 commented 3 years ago

Okay i'm too stupid for this every time i try my hole Speedometer Hud is broken...

sFxMTA commented 3 years ago

I wouldn't recommend you to do it if you don't have a bit of knowledge honestly

SamDavid93 commented 3 years ago

A base of knowledge is there but my f... Hud is not reacting to the settings xD the Fuel state is undefined if i use the callback...

Tinky124 commented 3 years ago

@sFxMTA it would be cool if you could share your fix lol :)

Moonlgiht111 commented 3 years ago

rt

SamDavid93 commented 3 years ago

Now I found out a way to sync the fuel with all the invehicle mates.

But.only Problem I can Not finish is: if anyone is inside the car but the diver or other mate sits in car, somebody is tanking, the fuel will be refreshed after exit. So my thoughts would be if the player gets in the driver seat the fuel should be shared to all mates. But how..

InZidiuZ commented 2 years ago

There is only one 'driver' in a vehicle, so what I assume you mean is that you want the passengers too to be aware of the fuel level?

milafrn commented 2 years ago

Hello, This problem fixed ?

How i can Sync the fuel with the all players for each cars.

Because i have a script what the code is on client and i don't know pass the code for the server side.

svenbledt commented 9 months ago

Would be nice to have some kind of information here.