SA-MP Forums Archive
How to add more keys ? - 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: How to add more keys ? (/showthread.php?tid=463976)



How to add more keys ? - bustern - 14.09.2013

I want to use key "2" and key "3" How to define them ? ( https://sampwiki.blast.hk/wiki/Keys )
I want when player press key 2 or 3 to do my command


Re: How to add more keys ? - Dragonsaurus - 14.09.2013

You can use only 2 (Default for KEY_SUBMISSION). Number 3 is not a valid key.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_SUBMISSION)
    {
         // Your command stuff
    }
    return 1;
}