OnPlayerKeyStateChange - 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: OnPlayerKeyStateChange (
/showthread.php?tid=226430)
OnPlayerKeyStateChange -
Lorrden - 15.02.2011
How come it doesn't work with KEY_UP, KEY_DOWN, KEY_LEFT and KEY_RIGHT but with all the others ?
And does anybody knows how to fix this as easy as possible ?
Re: OnPlayerKeyStateChange -
xxmitsu - 15.02.2011
It won't work with the keys you mentioned.
In order to read those keys, you can use GetPlayerKeys in OnPlayerUpdate.
Re: OnPlayerKeyStateChange -
_Tommy - 15.02.2011
KEY_UP is actually the ALT KEY (walking key).
Re: OnPlayerKeyStateChange -
Lorrden - 15.02.2011
okay, but when using it in OnPlayerUpdate with GetPlayerKeys it spams...
Re: OnPlayerKeyStateChange -
Hiddos - 15.02.2011
Use OnPlayerUpdate, easiest solution.
Re: OnPlayerKeyStateChange -
blackwave - 15.02.2011
Quote:
Originally Posted by Lorrden
okay, but when using it in OnPlayerUpdate with GetPlayerKeys it spams...
|
pawn Код:
do
{
// Code you want to run here
}
while(GetPlayerKeys(playerid, KEYS)) // Put the condition for run here. Will run the action between "{" "}" while this is true