25.09.2010, 15:41
Ok, use it like this then (just copy and use the function)
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
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;
}
