I'm wanting to create a menu in the form of a circle whenever the user presses the O key. I want the circle to appear and the user to be able to move their mouse around without moving their player which I've got working but the circle some reason doesn't show up and I'm not sure why.
This is my script that is autorun for the client:
[CODE]
local function CreateMenu(active)
if active == true then
Menu = surface.DrawCircle(ScrW() / 2, ScrH() / 2, 100, Color(61, 61, 61, 255))
end
end
hook.Add("Think", "MenuButton", function()
if input.IsKeyDown(KEY_O) then
CreateMenu(true)
gui.EnableScreenClicker(true)
else
CreateMenu(false)
gui.EnableScreenClicker(false)
end
end)[/CODE]
Can anyone see the issue?
You need to draw the circle in the [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/HUDPaint]GM:HUDPaint[/url] hook, not in Think as you're doing now.
Sorry, you need to Log In to post a reply to this thread.