Jump to content

Speed-o-Meter and NOS doubt


Recommended Posts

The Speed and the vehicle HP is not hard you can find on wiki function's for both.

About the NOS difren't story there is no function to get the NOS nivel. So you need to make a costum NOS function. (adding nos to the car checking when the player hit the Nos bind key, start a timer about 20-25s after that remove the nos from the car or lock the binkey for recharge time unlock the binkey ..... )

Link to comment
thanks it works! but there is two problems :(( it says the health and the velocity (in kmh) with commas (like 120.2222333) like that :(( and there's other problem. it says there are 140 HP of vehicle when my vehicle is already blowing!

You can round up the speed:

local speedStr = string.format( "%d", yourSpeedVar ); -- speedStr will be string: "120" 

Vehicles start burning at roughly 250hp, their maximum health is 1000hp. Once they start burning the health decreases slowly and eventually when it reaches 0 they explode. So, as you may know, when the vehicle is burning and you keep shooting at it the health decreases more quickly what makes them explode sooner then if you just watched it burning. So you can use vehicle's health percentage (0-1) instead of the actual value (0-1000)

local vehHealthPercent = (vehHealth - 250) / 1000;  -- vehHealthPercent will be < 0 when vehicle is burning 

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...