Super Jump
#1

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?
Reply
#2

Use GetPlayerVelocity and SetPlayerVelocity.
Reply
#3

in under onplayerupdate , get player key and then use SetPlayerVelocity
Reply
#4

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)))
Reply
#5

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!
Reply
#6

set a timer to 20,000 mileseconds
Reply
#7

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.
Reply
#8

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
Reply
#9

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

which one part of GetPlayerVelocity changes the jump speed?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)