KEYs problems - 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: KEYs problems (
/showthread.php?tid=310954)
KEYs problems -
Dodo9655 - 14.01.2012
Why doesn't this work?
Код:
IsKeyJustDown(KEY_LEFT, newkeys, oldkeys))
I use it under OnPlayerKeyStateChange, neither KEY_RIGHT works but when I use any other key like KEY_FIRE it works!
Re: KEYs problems -
lamarr007 - 14.01.2012
https://sampwiki.blast.hk/wiki/OnPlayerK...heck_for_a_key
Re: KEYs problems -
Dodo9655 - 14.01.2012
omg........
I already have
stock IsKeyJustDown, But when I check for KEY_LEFT or KEY_RIGHT it just doesnt work! But it works for any other key like KEY_FIRE ETC............
Re: KEYs problems -
Mean - 14.01.2012
Read this.
pawn Код:
new Keys,ud,lr;
GetPlayerKeys(playerid,Keys,ud,lr);
if(ud > 0) {
// KEY DOWN
}
if(ud < 0) {
// KEY UP
}
if(lr > 0) {
// KEY RIGHT
}
if(lr < 0) {
// KEY LEFT
}
You need to use GetPlayerKeys for that.