How do I know the KEYS? - 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: How do I know the KEYS? (
/showthread.php?tid=76931)
How do I know the KEYS? -
linthebigs - 07.05.2009
I would like to know how I disccover a key.
Example:
I want that the cars power when the player press the key S or other key that the player don`t use in Game like control.
How do I discover the number that identificate the key?
Please help me
Re: How do I know the KEYS? -
ferriswheel - 07.05.2009
The S key is used in game (Backwards), and currently in SA:MP you can only detect game keys, not non-standard keys like "R" or "L".
Re: How do I know the KEYS? -
linthebigs - 07.05.2009
But, How do the Cheater have keys like F11, m and others
Re: How do I know the KEYS? -
ferriswheel - 07.05.2009
Cheats have different keys because they are their own program, not SA:MP, and have their own KeyHooks built into that program.
Re: How do I know the KEYS? -
linthebigs - 07.05.2009
ok, thanks.... Can you help me with this?
I want that when the player use the key "enter" , he enter in interiors. I tried to do this, but when the player does this somewhere, the keys function!!
Please help me!!
Re: How do I know the KEYS? -
ferriswheel - 07.05.2009
Check out
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange. That's what you're looking for.
Re: How do I know the KEYS? -
watkijkje - 07.05.2009
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new dbgstr[32];
format(dbgstr, sizeof(dbgstr), "pressed key(s) = %d", newkeys);
SendClientMessage(playerid, 0xFFFFFF, dbgstr);
return 1;
}
Not made by me.