Super Jump Help [SOLVED]
#1

In this picture I want to make the superjump just like the one from GamerX if you have ever been there.

So lets say I am already moving top speed Blue Arrow

And when I press my desired button to use the super jump I do not want it to move straight up Yellow Arrow

I want it to keep its speed and move up in the direction you are driving in. Red Arrow



Thanks for the help.
Reply
#2

Use velocity functions. You need to get your velocity and then multiple it with how bigger you want to be it and set it.
Reply
#3

pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_HANDBRAKE))
    {
    new Float:x, Float:y, Float:z;
        GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
        SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.3);
    }
    return 1;
}
Press space and it will do what you want, if you want to change it to a different key then go there https://sampwiki.blast.hk/wiki/GetPlayerKeys#Key_List
Reply
#4

thanks it works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)