SA-MP Forums Archive
Possible? - 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: Possible? (/showthread.php?tid=583625)



Possible? - CounterTDM - 29.07.2015

I understand players can achieve this by using a program such as Auto Hotkey however that's not entirely appropriate in this situation.

I have a command, lets use '/weaponshop' or '/w' for short. Given the nature of the sever weapons drop on death, I can see people having to type the word '/w' upon every single death very annoying. I am wanting a player to be able to push a certain key for example 'X' which would open up the dialog for the weapon shop or if possibly just assign that command to a letter.

Thanks in advance for the help.

(I have tried to search around but I cannot find the right way to context my search)


Re: Possible? - StuartD - 29.07.2015

You can use this to check when a key has been pressed;
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange