mirror of
https://github.com/willox/gmod-keypad.git
synced 2025-03-04 03:13:31 -05:00
ops
This commit is contained in:
parent
a7859e660e
commit
0686009fd1
@ -54,12 +54,14 @@ for i = KEY_PAD_1, KEY_PAD_9 do
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("CreateMove", "Keypad", function(cmd)
|
||||
local last_press = 0
|
||||
|
||||
if not IsFirstTimePredicted() then
|
||||
hook.Add("CreateMove", "Keypad", function(cmd)
|
||||
|
||||
if RealTime() - 0.1 < last_press then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
for key, handler in pairs(physical_keypad_commands) do
|
||||
if input.WasKeyPressed(key) then
|
||||
|
||||
@ -77,6 +79,8 @@ hook.Add("CreateMove", "Keypad", function(cmd)
|
||||
return
|
||||
end
|
||||
|
||||
last_press = RealTime()
|
||||
|
||||
handler(ent)
|
||||
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user