ok i been working on this help menu for darkrp just like the help menu for cop and and mobboss it works and stuff but im not sure where to add the command /x to be able to close the help menu and also the /help… so all i need is some1 to tell me what file i need to be in and where to add the command to be able to open and close the help menu it works when i first pic the class and the help menu will open just i cant close it and reopen it some1 please help

Chat hook.

ok what file?

Garrysmod wiki is down, I’ll look when it’s back up.
Though unless you start typing properly I won’t do shit for you.


lol what you mean by typing properly

Would change to:

ah, ok thank you

Also, capitalisation.

OK, sorry.


I’ll reply to this thread when the wiki is up.

Ok, thank you for helping me. :slight_smile:

Or if the wiki is down forever (:bang:), then you can just use a console command (although not ideal).

[lua]concommand.Add(“close_copmenu” , CloseCopMenu)[/lua]

So i would put that in console in game, or?
i am not that good of a scripter, but i do know some.
I sound like a complete idiot.

You could try this… Dunno if it would work.

function CloseCopMenu(ply , text , teamonly)
if !(ply == LocalPlayer()) then return end
if string.sub(text , 0 , 2) == “/x” then
// Stick the code to close the menu below here

	// And above here! In the little gap :D

hook.Add(“OnPlayerChat” , “CloseCopInfo” , CloseCopMenu)

Ok i go and test that, what file would i put this in? cl_init.lua?


This help menu is for the gun dealer, as i have made custom shipments and there is a lot of shipments now, so i have just added the help menu so they can see the names of the weapon they want a shipment for.

Just a simple help menu?

Why not use a derma panel with a close button?

Here, i will give the what i have done so far it all works fine just cant close and reopen the menu.


LocalPlayer():GetNWBool(“helpgundealer”) then
draw.RoundedBox(10, 10, 10, 590, 194, Color(0, 0, 0, 255))
draw.RoundedBox(10, 12, 12, 586, 190, Color(51, 58, 51, 200))
draw.RoundedBox(10, 12, 12, 586, 20, Color(0, 0, 70, 200))
draw.DrawText(“gundealer help”, “ScoreboardText”, 30, 12, Color(255,0,0,255),0)
draw.DrawText(“what gun dealers need to know
-as a gundealer you need a gun licence
-type /buyshipment(name) or /buy (name)(for only a single weapon instead or 10)
-these are the names of the weapons
-ak47, m4a1, aug, deagle, duelelites, famas, fiveseven, g3sg1, gail, glock
-knife, m249, mac10, mp5, p90, p228, scout, awp, sg550, sg552, tmp, ump45, usp
-help menu made by death_row_dave, /x to close it”, “ScoreboardText”, 30, 35, Color(255,255,255,255),0)


Lol, don’t ask about the (menu made by death_row_Dave) i was bored. :confused:

Where are you putting that code?