Jump to content

Nitro toggle script, help plz ^^


Recommended Posts

Posted
Could i use this http://development.mtasa.com/index.php?title=GetVehicleUpgrades and this http://development.mtasa.com/index.php?title=AddVehicleUpgrade to make a nitro toggle script?

I want to have if i press leftmousebutton and the nitro is already running, then the nitro is shut off, and if i press that button when it's not on it will be on ^^

Really quite simple mate.

To reset nitro, just add the upgrade again. :P

So for example:

-Nitro x10 added

-Nitro x10 used

-Nitro x10 added (to stop using)

etc. And well making it a toggle isn't that hard. Use variables. :P

Posted
i found that if u bind addupgrade1010 to a key u can switch nitro on/off quite easy with no scripting involved

i use f3 for mine :D

Well, the problem is that you need to use 2 keys. F3 and LMB. He only wants to use LMB, which is alot more user-friendly. ;)

Posted

why do you need f3 and lmb ? cant u just bind f3 down check if nitro is on, if its not put it on, if it is turn it off ?

that would be the most locical thing to do wouldnt it ?

Posted

i made one ages ago lol

all you need to do is bind one key i had "0" on my server, which added the upgrade to my car if it wasnt on the car allready, if it was on the car it then removed it, and you then once added the upgrade just use your usual key to use the nos

Posted
But LOL if someone doesn't have nitro on the car and you press f3 or LMB it would give him that :/ that's the problem ^^ i wanna use it for a RP server :D

You can use setElementData to remember how many times he used nitro. And if it hits 10, you can remove the upgrade. :P

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