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



Super Jump.. - ProBro - 14.03.2017

I don't know why this is happening.
androids have the ability to super jump,but for some reason,They super jump when I press ANY KEY! EVEN AIM!

Here's a video on this bug : https://www.youtube.com/watch?v=rbPj...ature=*********

They're supposed to jump from LALT ( WALK KEY).

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
if(
GetPlayerTeam(playerid) == 2)
{
if(
PRESSED(KEY_WALK))
{
new 
Float:x,Float:y,Float:z;
GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
SetPlayerVelocity(playerid,Float:x,Float:y*1.0,Float:z+0.81.2);

Please help me,I do not understand or seem to see where I've done this mistake.


Re: Super Jump.. - Toroi - 14.03.2017

As i pointed out 20min ago in your old thread, you're missing a bracket.


Re: Super Jump.. - ProBro - 14.03.2017

Quote:
Originally Posted by Troydere
Посмотреть сообщение
As i pointed out 20min ago in your old thread, you're missing a bracket.
is that causing the bug?

Here's more of it.
PHP код:
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
if(
GetPlayerTeam(playerid) == 2)
{
if(
PRESSED(KEY_WALK))
{
new 
Float:x,Float:y,Float:z;
GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
SetPlayerVelocity(playerid,Float:x,Float:y*1.0,Float:z+0.81.2);
}
}

Quote:
Originally Posted by ProBro
Please help me,I do not understand or seem to see where I've done this mistake.



Re: Super Jump.. - RyderX - 14.03.2017

EDIT: KOSTABRAVA


Re: Super Jump.. - ProBro - 14.03.2017

Quote:
Originally Posted by RyderX
Посмотреть сообщение
EDIT: KOSTABRAVA
hahaha


Re: Super Jump.. - Toroi - 14.03.2017

Quote:
Originally Posted by ProBro
Посмотреть сообщение
is that causing the bug?

Here's more of it.
PHP код:
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
if(
GetPlayerTeam(playerid) == 2)
{
if(
PRESSED(KEY_WALK))
{
new 
Float:x,Float:y,Float:z;
GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
SetPlayerVelocity(playerid,Float:x,Float:y*1.0,Float:z+0.81.2);
}
}

Please post the entire OnPlayerKeyStateChange callback, you look like steam games throwing out dlc.

Also, what is this?
Код:
Float:y*1.0



Re: Super Jump.. - GoldenLion - 14.03.2017

Код:
if (newkeys & KEY_WALK)



Re: Super Jump.. - ProBro - 14.03.2017

Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
Код:
if (newkeys & KEY_WALK)
OMGG WORKED THANKS BRO!


Re: Super Jump.. - ProBro - 14.03.2017

Quote:
Originally Posted by Troydere
Посмотреть сообщение
Please post the entire OnPlayerKeyStateChange callback, you look like steam games throwing out dlc.

Also, what is this?
Код:
Float:y*1.0
Nevermind,Thanks to Goldenlion it's fixed.