GamerDeMTA Posted June 25, 2013 Share Posted June 25, 2013 I want to create a Speed-O-Meter and a NOS "Speedometer" (which show u how much NOS u've) How? Thanks you EDIT: Can u also say me the function for get the vehicle's HP (vehicle health)? Link to comment
bandi94 Posted June 25, 2013 Share Posted June 25, 2013 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
GamerDeMTA Posted June 25, 2013 Author Share Posted June 25, 2013 ah ok thanks. can you give me the functions for vehicle HP and speed? I didn't found them Link to comment
bandi94 Posted June 25, 2013 Share Posted June 25, 2013 HP GetElementHealth Speed getElementVelocity Link to comment
GamerDeMTA Posted June 25, 2013 Author Share Posted June 25, 2013 thanks :DD hey do u know if there's any NOS Speed-O-MeTer in the Community?? Ah, and for what's gthis function? I didn't understand in wiki: getVehicleNitroCount ah and what means "if the vehicle is steamed in"? Link to comment
bandi94 Posted June 25, 2013 Share Posted June 25, 2013 Hmmm i have no idea about this function i never seen it/used it , you can try the example code from wiki and see what it's doing, it's returning some NitroCount in int value so maybe they added a function to get the veh nitro level in the V 1.3.2 when i made my nos meter (on MTA 1.1) there was no function like this. https://community.multitheftauto.com/in ... ls&id=2133 -race_nos2 Link to comment
GamerDeMTA Posted June 25, 2013 Author Share Posted June 25, 2013 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! Link to comment
50p Posted June 25, 2013 Share Posted June 25, 2013 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now