SA-MP Forums Archive
If user press key X... - 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: If user press key X... (/showthread.php?tid=81401)



If user press key X... - carlos- - 10.06.2009

How can do this?

public OnPressKey(playerid,key)
{
if(key = F11)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DAN CE1);
}elseif(key = Left Shift OR key = Q)
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DAN CE2);
Others acionts = NULL
}
return 1;
}

Sorry for my english


Re: If user press key X... - Correlli - 10.06.2009

You can't detect F11 key in SA-MP.
Here is list of available keys: https://sampwiki.blast.hk/wiki/GetPlayerKeys#Key_List


Re: If user press key X... - Annihalation - 21.07.2009

could you perhaps define it? like find the value of the <x> key and do a

#define KEY_X

that would be cool, someone smarter than me please help


Re: If user press key X... - James_Alex - 21.07.2009

Quote:
Originally Posted by Annihalation
could you perhaps define it? like find the value of the <x> key and do a

#define KEY_X

that would be cool, someone smarter than me please help
no, i think it's impossible
but you can change the function of Key X in your GTA SA to action for example !!


Re: If user press key X... - Annihalation - 21.07.2009

you mean in the Options of GTA change the fire button to X :P


Re: If user press key X... - James_Alex - 21.07.2009

exactly