Key. - 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: Key. (
/showthread.php?tid=195842)
Key. -
SeQualX - 03.12.2010
Hello,
Im trying to make a register-textdraw system but im having a problem with some keys that doesnt works properly,
"KEY_RIGHT" doesnt works but if i tray with another key like SPRINT works perfect.
Thanks if someone could help.
Re: Key. -
Badger(new) - 03.12.2010
Read this:
https://sampwiki.blast.hk/wiki/GetPlayerKeys
You need to use that function to detect if someone is pressing up, down, left or right.
Example:
pawn Код:
new keys, updown, leftright;
GetPlayerKeys(playerid,updown,leftright);
if(updown<0){
// When they press Up.
//Up has a value of -128, which is LESS THAN (<) 0
}
else {
// When they press Down.
//Up has a value of 128, which is NOT LESS THAN (<) 0
}
if(leftright<0){
// When they press Left.
//Left has a value of -128, which is LESS THAN (<) 0
}
else {
// When they press Right.
//Right has a value of 128, which is NOT LESS THAN (<) 0
}