Define KEY_AIM!
#1

Can someone tell me how to define KEY_AIM?
I have it like this

pawn Код:
#define KEY_AIM (128) found somewhere!
If someone can help please also explain whats to be explained!

Thanks.
Reply
#2

I don't understand your post, but to define this, you simply need to add:
pawn Код:
#define KEY_AIM (128)
to your gamemode / filterscript.

After defining it, you can use it simply in OnPlayerKeyStateChange, just as default defined keys. Example:
pawn Код:
if(newkeys & KEY_AIM && !IsPlayerInAnyVehicle(playerid))
Reply
#3

i have tried that but it wont work
when i press the key nothing happens
i made the system,should stop the vehicle,
ive setted vehicle velocity to 0
x,y,z=0 so it should work i guess!
Reply
#4

You can't do this. You can only use these keys that do something in game. For example, if you set in your client key configuration, space to shot, then KEY_FIRE is called with space.
Reply
#5

So there is no way to use that key to stop the vehicle?
Reply
#6

Currently, can't. But it's possible to bypass this - writing a plugin which would get every key pressed by player, but it would need a client application, like it's in Audio Plugin.
Reply
#7

ah i see alright thanks for the infos!
Reply
#8

didnt get your point?
Reply
#9

Well Here It's saying that KEY_AIM must be defined,i was asking how to define it lol!
Reply
#10

pawn Код:
#define KEY_AIM 132

if(newkeys == KEY_AIM && !IsPlayerInAnyVehicle(playerid))
That will work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)