How do I know the KEYS?
#1

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
Reply
#2

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".
Reply
#3

But, How do the Cheater have keys like F11, m and others
Reply
#4

Cheats have different keys because they are their own program, not SA:MP, and have their own KeyHooks built into that program.
Reply
#5

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!!
Reply
#6

Check out https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange. That's what you're looking for.
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)