Sniper zoom calls 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: Sniper zoom calls KEY_JUMP?! (
/showthread.php?tid=592480)
Sniper zoom calls KEY_JUMP?! -
Aerotactics - 25.10.2015
So our script sends a message anytime someone presses the jump key. Unfortunately, that same key is called whenever a sniper scope is zoomed in or out. How can we fix this?
AW: Sniper zoom calls KEY_JUMP?! -
Kaliber - 25.10.2015
Just check if he has a sniper or not?!
Re: Sniper zoom calls KEY_JUMP?! -
Mencent - 25.10.2015
Hello!
Use this:
PHP код:
if(GetPlayerWeapon(playerid) == 34)return 1;
If you don't know how you should use this, then you may send us your code.
Re: Sniper zoom calls KEY_JUMP?! -
J0sh... - 25.10.2015
Quote:
Originally Posted by Mencent
Hello!
Use this:
PHP код:
if(GetPlayerWeapon(playerid) == 34)return 1;
If you don't know how you should use this, then you may send us your code.
|
That will not work, what if the player has a sniper in his hand not aiming and jumps?
Re: Sniper zoom calls KEY_JUMP?! -
Abagail - 25.10.2015
Aiming will return a different ID from idling or jumping in GetPlayerAnimationIndex(not sure what the ID's are though).
Re: Sniper zoom calls KEY_JUMP?! -
Aerotactics - 25.10.2015
Quote:
Originally Posted by Jamester
That will not work, what if the player has a sniper in his hand not aiming and jumps?
|
I could force them not to jump because a sniper is too big to jump with
Re: Sniper zoom calls KEY_JUMP?! -
Tamer - 26.10.2015
GetPlayerCameraZoom or GetPlayerCameraMode can help.