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=352182)



Super Jump - sanrock - 18.06.2012

How do I make like a super jump for a TEAM_ZOMBIE

So like

If you want to jump on a high building he jumps and he jumps high forward in like running speed?


Re: Super Jump - Andregood - 19.06.2012

Use GetPlayerVelocity and SetPlayerVelocity.


Re: Super Jump - [MM]RoXoR[FS] - 19.06.2012

in under onplayerupdate , get player key and then use SetPlayerVelocity


Re: Super Jump - zombieking - 19.06.2012

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_JUMP))
    {
        new
            Float:x,
            Float:y,
            Float:z;
        GetPlayerPos(playerid, x, y, z);
        SetPlayerPos(playerid, x, y, z + 10.0);
    }
    return 1;
}
At top of script:
pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))



Re: Super Jump - sanrock - 19.06.2012

How do I make it so like you can only press jump button every 20 secounds ?

And how to make the jump go alot more faster!


Re: Super Jump - JaKe Elite - 19.06.2012

set a timer to 20,000 mileseconds


Re: Super Jump - Andregood - 19.06.2012

Tbh, that isn't jumping, that's teleporting, you have to use setplayervelocity in order to make it a "real" jump, that looks realistic and works. SetPlayerPos = teleport.


Re: Super Jump - mineralo - 19.06.2012

you can also to set the gravity of server to small one, default gravity is 0.008 but you can put like 0.004 and players could jump higher but slow will jump and fall down. You can try with gravity too
https://sampwiki.blast.hk/wiki/SetGravity


Re: Super Jump - Rudy_ - 19.06.2012

pawn Код:
GetPlayerVelocity(playerid, X,Y,Z+5);
use this


Re: Super Jump - sanrock - 19.06.2012

which one part of GetPlayerVelocity changes the jump speed?