05-19-2017, 10:47 AM
So I'm coding a doublejump plugin for my server, and I was wondering what the most optimal way of doing so was.
My current code:
I haven't really dug into the docs yet, so I'm likely missing something. I know that I would need to track the jump input in the if statement somehow... How would I go about doing that? Also, does IsSprinting get set to false if the player is airborne? And is it smart to be checking this every tick, or is there another hook that would be more optimal?
Please and thank you.
My current code:
Code:
function OnTick(Player, TimeDelta)
if(not Player.IsOnGround) then
if(Player.IsSprinting) then
-- Do Stuff
end
end
end
I haven't really dug into the docs yet, so I'm likely missing something. I know that I would need to track the jump input in the if statement somehow... How would I go about doing that? Also, does IsSprinting get set to false if the player is airborne? And is it smart to be checking this every tick, or is there another hook that would be more optimal?
Please and thank you.