Racing Nos. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Racing Nos. (
/showthread.php?tid=604029)
Racing Nos. -
Th3UnKnOwN - 30.03.2016
Hi. Recently. I've been adding things to my map testing server that could help. I was thinking of adding "Racing Nos". Basically. It's what you see in racing, and drifting servers. Hold LMB for nos, and Release from none. The issue is I have barely worked with OnPlayerKeyStateChange.
Re: Racing Nos. -
-CaRRoT - 30.03.2016
It's the same as if you're creating a command, but instead your code would go under the key you're detecting. In your case, it would be KEY_FIRE which is LMB.
So your code would basically check if the button is being pressed
Код:
if (newkeys & KEY_FIRE)
then you'd check if the player is in a vehicle & give them the nos.
Re: Racing Nos. -
SickAttack - 30.03.2016
The WIKI tells you how to do it:
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Attach NOS when the player presses fire
Re: Racing Nos. -
Th3UnKnOwN - 30.03.2016
Thank you both. Both of your replies were quite helpful. REP for both of you.
[EDIT: Have to give others rep before I can add more to SickAttack, thanks anyway. :P]