• concommand or hook question
    2 replies, posted
What the code to bind hooks to a chat say like: !open - opens a derma menu basically the came as what ULX does with !menu I should know this but my brain has gone blank at the moment.. Thanks
On the server [code] local function PlayerRequestMenu(ply, text, team) if string.sub(text, 1, 5) == "!open" then umsg.Start("OpenDermaMsg", ply) umsg.End() end end hook.Add("PlayerSay", "PlayerRequestMenu", PlayerRequestMenu) [/code] On the client [code] local function GetDermaMsg(msg) --open derma menu end usermessage.Hook("OpenDermaMsg", GetDermaMsg) [/code]
ahh thanks..
Sorry, you need to Log In to post a reply to this thread.