SA-MP Forums Archive
KEY_JUMP - 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: KEY_JUMP (/showthread.php?tid=310979)



KEY_JUMP - BetaLaxx - 14.01.2012

So well i'm using KEY_JUMP so that when player presses the key the vehicle engine starts, But when i press Shift key it doesn't perform any action, but when i press ARROW KEY DOWN it starts the engine, can you help?
pawn Код:
else if(newkeys == KEY_JUMP)



Re: KEY_JUMP - Face9000 - 14.01.2012

The players keys are the keys setuped in the options,if you use the arrow key down to jump,another player uses SHIFT,the keys work as like the control settings,anyone has different controls.The default of key_jump is SHIFT,but i assume you have edited the control with ArrowKeyDown.


Re: KEY_JUMP - T0pAz - 14.01.2012

Are you sure you are pressing the correct key?

DEBUG: Put
pawn Код:
print("Key jumped has been pressed");
inside the KEY_JUMP condition block.


Re: KEY_JUMP - BetaLaxx - 14.01.2012

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
Are you sure you are pressing the correct key?

DEBUG: Put
pawn Код:
print("Key jumped has been pressed");
inside the KEY_JUMP condition block.
Using it and when i press Shift key it doesn't print it but does when i press Arrow key down.

And i have default San andreas controls.


Re: KEY_JUMP - spedico - 14.01.2012

Maybe KEY_JUMP is different for vehicles? If it's arrow down, maybe it's the wheelie button? Try making something with KEY_JUMP on foot.


Re: KEY_JUMP - BetaLaxx - 14.01.2012

I removed the code that checks if the player is in vehicle and checked by pressing Shift key, It actually works on foot but in vehicle it doesn't, still Key arrown down, Any help?


Re: KEY_JUMP - Mean - 14.01.2012

Click me.
Check the keys' "Gametext-Key in Vehicle," that's what the key will give in vehicles. In vehicles KEY_JUMP should be vehicle brake key.


Re: KEY_JUMP - BetaLaxx - 14.01.2012

Using This Key now but it still doesn't perform any action while player's in vehicle.
pawn Код:
if(newkeys == KEY_WALK)



Re: KEY_JUMP - Mean - 14.01.2012

KEY_WALK is nothing when in a vehicle.

For example:
Код:
KEY_ANALOG_UP2048-~k~~VEHICLE_TURRETUP~
that means if you put "KEY_ANALOG_UP," in a vehicle, it will be "VEHICLE_TURRETUP," so if you press the turret up, it will call the function in where you used "KEY_ANALOG_UP." Get it?


Re: KEY_JUMP - BetaLaxx - 14.01.2012

Yes, Thank you.