Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- example of how to get CurTime properly
- this code is untested, therefore im not sure if it will work
- if its not working properly you might have to use an IsFirstTimePredicted() call
- this was on nanocats pastebin but he deleted it, so i recreated it without actually testing it, all credits to him
- ]]
- local ProperCurTime = 0;
- function ProperCurtime()
- if IsFirstTimePredicted() then //thanks to clot for telling me i was being a dumbfuq and forgetting this
- ProperCurTime = CurTime()
- end
- end
- hook.Add("Move", "getcorrectcurtime", ProperCurtime)
- function CreateMove(cmd)
- local w = LocalPlayer():GetActiveWeapon()
- if w:GetNextPrimaryFire() < ProperCurTime then //again, thx clot
- cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_ATTACK ))
- else
- print("next attack "..w:GetNextPrimaryFire() .. " curtime: " ..ProperCurTime)
- end
- end
- hook.Add("CreateMove", "propershoot", CreateMove)
Advertisement
Add Comment
Please, Sign In to add comment