Mefisto_PL Posted January 29, 2012 Posted January 29, 2012 How I can replace speedbar in race gamemode to nitrobar? I ask because on wiki I don't found anything to help :
Paper Posted January 29, 2012 Posted January 29, 2012 you must modify the race scripts for make the bar relative to the nitro and if you want you can change the image ^^
Castillo Posted January 29, 2012 Posted January 29, 2012 Is not that easy, because there's no such function "getNitroLeft" or something similar. There's a resource called "race_nos", it's a script which has a nitro meter.
Mefisto_PL Posted January 29, 2012 Author Posted January 29, 2012 Yes it is but I want create bar, not meter
Castillo Posted January 29, 2012 Posted January 29, 2012 Events...? you mean functions? You only need dxDrawRectangle and if you want to draw the nitro left in a text then dxDrawText.
Paper Posted January 30, 2012 Posted January 30, 2012 Is not that easy, because there's no such function "getNitroLeft" or something similar. He can use timers, nitro durations i definied, but i don't remember it
Phat Looser Posted February 1, 2012 Posted February 1, 2012 1) get a car 2) tune it with NOS 3) get a stopwatch 4) trigger the nitro 5) write down the time 6) create another bar in the "race" resource 7) set this bar to "1" if the car has nitro, else don't if the car has nitro and "fire" is pressed, activate a timer which triggers each 200 ms and reduces the bar (1-(maxNitroTime - timercalls*200)/maxNitroTime) 9) if (maxNitroTime - timercalls*200) <= 0 then set the bar to 0 10) if another nitro is ready (measure that time, too maybe) or a nitro was picked up, set the bar to 1 again 11) ??? 12) PROFIT
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