Player Velocity etc.
#4

Ok, use it like this then (just copy and use the function)

pawn Код:
stock MegaJump(playerid, Float:forwardspeed, Float:upwardspeed)
{
    new Float:vx, Float:vy, Float:vz;
    new Float:rot;
    GetPlayerFacingAngle(playerid, rot);
    rot = 360 - rot;

    GetPlayerVelocity(playerid, vx, vy, vz);
    SetPlayerVelocity(playerid, vx + forwardspeed * floatsin(rot, degrees), vy + forwardspeed * floatcos(rot, degrees), vz + upwardspeed);
    return 1;
}
You can just call this function when a player type /megajump or so. Experiment a bit with the size of forward and upwardspeed. For normal use something below 1.0 should be enough, but try how you like it
Reply


Messages In This Thread
Player Velocity etc. - by sekol - 25.09.2010, 15:25
Re: Player Velocity etc. - by Mauzen - 25.09.2010, 15:30
Re: Player Velocity etc. - by sekol - 25.09.2010, 15:32
Re: Player Velocity etc. - by Mauzen - 25.09.2010, 15:41
Re: Player Velocity etc. - by Jaxson - 21.10.2010, 20:15

Forum Jump:


Users browsing this thread: 1 Guest(s)