Author Topic: Vehicle HP bar  (Read 1656 times)

Oh stuff, I just assumed all vehicles had 100 max hp.
Well, I guess I can make a new algorithm to fix that.
When are you going to hosting your server with this? (after I fix)

100 / datablock.hpvaluewhatever whatever

Not new, it's easy, I just don't feel like looking up and remember everything that's needed... was about to go to sleep.

100 / datablock.hpvaluewhatever whatever

Not new, it's easy, I just don't feel like looking up and remember everything that's needed... was about to go to sleep.
I know it's easy, I've already made it.
Also, here is the fixed version:
http://www.mediafire.com/?4orqpo62ynqtqou
When you use it let me know.

I might host tomorrow, but I don't know for sure right now.

i just looked at the code, it looks like you forgot to check what datablock the player is, so if you're using fuel jet, it might screw up

i just looked at the code, it looks like you forgot to check what datablock the player is, so if you're using fuel jet, it might screw up
It doesn't matter if it changes the datablock anyways.

i just looked at the code, it looks like you forgot to check what datablock the player is, so if you're using fuel jet, it might screw up
It's for nojet dm/tdm only.

It's for nojet dm/tdm only.
i ment when they're out of a vehicle it will probably display 0 for jet energy, in or out of a minigame

i ment when they're out of a vehicle it will probably display 0 for jet energy, in or out of a minigame
Uh, it packages the mount and dismount.
The bar will disappear when leaving the vehicle.

Instead of having that 250 ms loop, why not simply call an update function whenever a vehicle is damaged?
Wouldn't that lower lag a bit and make the bar slightly more accurate?

I agree, especially if it affects lag.

I agree, especially if it affects lag.
It could be done, but it shouldn't really effect lag.

It could be done, but it shouldn't really effect lag.
At least not noticably.  Even so, I prefer having as few loops running as possible, if only because every one contributes a little bit.

At least not noticably.  Even so, I prefer having as few loops running as possible, if only because every one contributes a little bit.
I made it for one server.
When I make a released version it will be a lot better and compatible.

Just making sure you understand what we're getting at: If people felt free to use loops whenever possible, it'd build up over Add-Ons into something quite horrible. Especially when easily avoidable, you should avoid loops.

It turns out this add-on breaks vehicles; you can control a vehicle from any seat, you always stand while driving and you can not fire a gun properly when in a vehicle.