SA-MP Forums Archive
Can I use While loop in OnPlayerKeyStateChange - 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: Can I use While loop in OnPlayerKeyStateChange (/showthread.php?tid=604793)



Can I use While loop in OnPlayerKeyStateChange - NeXoR - 10.04.2016

I wanna do something like when a playere is using KEY_FIRE something will happen
Can I do like while(newkeys & KEY_FIRE) ?


Re: Can I use While loop in OnPlayerKeyStateChange - Virtual1ty - 10.04.2016

You can detect if they're holding the key. Check the Wiki page.


Re: Can I use While loop in OnPlayerKeyStateChange - NeXoR - 10.04.2016

Quote:
Originally Posted by Virtual1ty
Посмотреть сообщение
You can detect if they're holding the key. Check the Wiki page.
Yeah I have already figured it out after Wiki'ing KeyStateChange
Thanks anyways