Skip to content

Instantly share code, notes, and snippets.

@ValentinFunk
Last active November 14, 2017 15:12
Show Gist options
  • Save ValentinFunk/963357602587f2e725c522f91a0aaee6 to your computer and use it in GitHub Desktop.
Save ValentinFunk/963357602587f2e725c522f91a0aaee6 to your computer and use it in GitHub Desktop.
Open Pointshop2 with a key other than the F keys, this example uses F6. Save as lua/autorun/sh_ps2_keywatcher.lua
if SERVER then
AddCSLuaFile()
return
end
local lastDown = 0
local function hkKey()
if input.IsKeyDown( KEY_F6 ) and CurTime() > lastDown + 1 then
lastDown = CurTime()
RunConsoleCommand("pointshop2_toggle")
end
end
hook.Add("Think","twsgssdsdh",hkKey)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment