PDA

View Full Version : Super Jump..


ProBro
14/03/2017, 02:20 PM
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=rbPjGY3DzIA&feature=youtu.be

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

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
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,Flo at:z+0.8* 1.2);
}

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

Toroi
14/03/2017, 02:25 PM
As i pointed out 20min ago in your old thread, you're missing a bracket.

ProBro
14/03/2017, 02:26 PM
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.
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
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,Flo at:z+0.8* 1.2);
}
}
}
Please help me,I do not understand or seem to see where I've done this mistake.

RyderX
14/03/2017, 02:27 PM
EDIT: KOSTABRAVA >:(:mad:

ProBro
14/03/2017, 02:29 PM
EDIT: KOSTABRAVA >:(:mad:

hahaha ;)

Toroi
14/03/2017, 02:30 PM
is that causing the bug?

Here's more of it.
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
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,Flo at:z+0.8* 1.2);
}
}
}

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

Also, what is this?
Float:y*1.0

GoldenLion
14/03/2017, 02:35 PM
if (newkeys & KEY_WALK)

ProBro
14/03/2017, 02:44 PM
if (newkeys & KEY_WALK)
OMGG WORKED THANKS BRO!

ProBro
14/03/2017, 02:48 PM
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.