23.11.2013, 10:01
Hello, this has been on my mind for a while now... As I'm writing a gamemode I currently need to add Fuel,Speedometer update and Mileage to vehicles. And I'm looking for tips about it.
Speeomdeter,Mileage - Where would you put the update code for it? I'm currently thinking about OnPlayerUpdate or a ~1second(or less) timer. I guess mileage should be updated as often as speed...
Fuel - As this is going to be updated not as often as speed, I'm planning to put it under 1min timer(I have a 1min timer for every player started in OnPlayerConnect, I use it for main stuff).
An other idea I have is creating a global timer which would loop trough all vehicles and decrease their fuel.
So if you have any ideas,experiences or anything concerning this, please share
Speeomdeter,Mileage - Where would you put the update code for it? I'm currently thinking about OnPlayerUpdate or a ~1second(or less) timer. I guess mileage should be updated as often as speed...
Fuel - As this is going to be updated not as often as speed, I'm planning to put it under 1min timer(I have a 1min timer for every player started in OnPlayerConnect, I use it for main stuff).
An other idea I have is creating a global timer which would loop trough all vehicles and decrease their fuel.
So if you have any ideas,experiences or anything concerning this, please share
