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



HotKeys Help - jimis - 18.07.2012

Hi all,how i can make a simple hotkey command,for example when someone press the "m" then he will receive some money.

Thanks for help,
Jimis


Re: HotKeys Help - L.Hudson - 18.07.2012

I think you cannot press any button and it's based on SA-MP hotkeys.

Example

when you press SHIFT key in script language it's KEY_JUMP


Re: HotKeys Help - IstuntmanI - 18.07.2012

'M' can't be detected, find all avaible keys here: https://sampwiki.blast.hk/wiki/GetPlayerKeys

And use like this: Let's say we want key '2' (KEY_SUBMISSION)
Код:
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
    if( newkeys & KEY_SUBMISSION )
    {
        GivePlayerMoney( playerid, 100000 );
    }
    return 1;
}



Re: HotKeys Help - jimis - 18.07.2012

ok thanks