vecDown = vector3(0, 0, -1);
vecForceScale = vector3(500, 500, 500);
vecForceUp = vector3(0, 0, 500);
nextJumpTime = 0;
function onThink( )
if _PlayerIsKeyDown(Owner, 8192) then
local curTime = _CurTime()
if(curTime >= nextJumpTime) then
--see if the player is on the ground
_TraceLine(_PlayerGetShootPos(Owner), vecDown, 64, Owner);
if _TraceHitWorld() then
local vecJumpVel = vecMul(_PlayerGetShootAng(Owner), vecForceScale);
_EntSetVelocity(Owner, vecJumpVel);
end
nextJumpTime = curTime + 1;
end
end
end