SA-MP Forums Archive
Super Jump Help [SOLVED] - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Super Jump Help [SOLVED] (/showthread.php?tid=105560)



Super Jump Help [SOLVED] - BP13 - 29.10.2009

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.


Re: Super Jump Help - Sergei - 29.10.2009

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


Re: Super Jump Help - V1ceC1ty - 30.10.2009

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



Re: Super Jump Help - BP13 - 30.10.2009

thanks it works