Since I fixed my FastDL issue, I moved on to finishing the rest of my game mode.
I decided on the GryMod Crysis HUD. It all works fine, but I need a way to call +crysishud on middle click so that it will bring up the suit interface (armor, strength, speed, etc.), and I need this to be available to every client.
Essentially, press = interface appears; release = disappears. I tried RunConsoleCommand( “bind”, “mouse3”, “+crysishud”), but then ran into bind being blocked.
I also tried GM:KeyPress() and GM:KeyRelease(), but MOUSE doesn’t translate to KEY.
Now I’m trying to get input.IsMouseDown(MOUSE_MIDDLE) to work, but no luck so far. I keep getting an error that input is nil.
Here’s my latest attempt in clientside.
local ply = LocalPlayer()
function CryHUD( ply )
if not IsValid( ply ) then
if ( input.IsMouseDown( MOUSE_MIDDLE ) ) then RunConsoleCommand("+crysishud") end
hook.Add( “Think”, “CryHUD”, CryHud)[/LUA]
At this point, I’m just tweaking it to see what works, but nothing yet. Any ideas?