Jump to content

Nitrobar


Mefisto_PL

Recommended Posts

Posted

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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

It's easy if you have DX drawing knowledge.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Events...? you mean functions?

You only need dxDrawRectangle and if you want to draw the nitro left in a text then dxDrawText.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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

Posted

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

8) 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

Officially MTA's worst fanboy

default.pngdefault.png

default.pngdefault.pngdefault.png

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...