SA-MP Forums Archive
KeyBoard Buttons - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: KeyBoard Buttons (/showthread.php?tid=142750)



KeyBoard Buttons - Tony1337 - 19.04.2010

How do you create it so the player can do something when the player press's a button like 'tab' or 'f' ?
Код:
OnPlayerPressBotton(playerid,F);
{
   SendClientMessage(playerid,red,"You Pressed F");
}



Re: KeyBoard Buttons - aircombat - 19.04.2010

u can't do this u only can use the keys used in samp :
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_CROUCH)
{
SendClientMessage.......
}
return 1;
}
keys list : https://sampwiki.blast.hk/wiki/GetPlayerKeys#Key_List