Detecting Player Key Config - 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: Detecting Player Key Config (
/showthread.php?tid=587102)
Detecting Player Key Config -
PSYCHOBABYKILLA - 28.08.2015
how can i detect a key that the player configured example default crouch key is c if it is changed to numpad0 i want to know how i can detect that...
heres a picture example
Re: Detecting Player Key Config -
Abagail - 28.08.2015
There is no way to detect numpad0 by default unless they have it as an available key. However you can give the player a list of available configurable keys to choose from and log it as a variable.
See:
wiki.sa-mp.com/wiki/Keys
Oh I misunderstood. You can't, however you can use the k string that is available to show the GameText string for the key that's set in their client, however you cannot actually get the key they have.
See:
wiki.sa-mp.com/wiki/GameTextForPlayer
Re: Detecting Player Key Config -
PSYCHOBABYKILLA - 28.08.2015
Quote:
Originally Posted by Abagail
There is no way to detect numpad0 by default unless they have it as an available key.
|
edit:
if key attack is lmb and the textdraw says press lmb to close i want to change the textdraw to whatever key the player changed it to...
it is very possible as you can see in the screen shots i took from crazybobs cops and robbers
Re: Detecting Player Key Config -
Redirect Left - 28.08.2015
Use the ~k~ code -
https://sampwiki.blast.hk/wiki/Keys
This is changed by San Andreas into the key they configured locally. All you do is use the ~k~ code, so ~k~~PED_FIREWEAPON~ is for LMB (although if they had changed it, it'd say different)
Re: Detecting Player Key Config -
PSYCHOBABYKILLA - 28.08.2015
Quote:
Originally Posted by Redirect Left
Use the ~k~ code - https://sampwiki.blast.hk/wiki/Keys
This is changed by San Andreas into the key they configured locally. All you do is use the ~k~ code, so ~k~~PED_FIREWEAPON~ is for LMB (although if they had changed it, it'd say different)
|
thank you + rep exactly the answer i was looking for