Whipped this up, but I don’t know if anyone would want to use this.
[lua]function PostKey(ucmd)
//Msg(tostring(ucmd:GetButtons())…"
")
local i=0
local buttons = ucmd:GetButtons()
for i=0,24 do
if ucmd:GetButtons() & 2^i > 0 then
if CanKeyPress(2^i) then
buttons = buttons - 2^i
end
end
end
end
ucmd:SetButtons(buttons)
end
hook.Add(“CreateMove”,“PostKey”,PostKey)
function CanKeyPress(inkey)
return true
end[/lua]
How to cancel a person attempting to attack:
[lua]
function CanKeyPress(inkey)
if inkey == IN_ATTACK then
return false
end
return true
end
[/lua]