• Chat commands glitching
    2 replies, posted
Hello, I tried making addons for TTT which use chat commands, and it bugs out the whole hooks, like !dm doesnt work anymore !shop doesnt work anymore, people can bypass the chat when being dead by using the 'say' concommand. I dont know how to fix this. Here are the codes I use: [CODE]hook.Add("PlayerSay", "Meow", function(ply, text, _) if string.sub(string.lower(text), 1, 8) == "!browser" then ply:ConCommand("browser") end return text end)[/CODE] [CODE]hook.Add("OnPlayerChat", "SlashMe", function(ply, text, isteam, dead) if ply:IsValid() then if string.sub(string.lower(text), 1, 3) == "!me" or string.sub(string.lower(text), 1, 3) == "/me" then chat.AddText(Color(255, 255, 255), "** ", ply, string.sub(text, 4)) return true end end end)[/CODE] (please dont ask why I use these identifiers etc ;-;) I dont know how to fix it :c HALP!
take out the return text from the first example [editline]2nd March 2015[/editline] Also this isn't the glua help forum, see developer discussion for lua questions
Oh sorry ;-; I mislooked. Is there a way to move the thread? [editline]3rd March 2015[/editline] Thanks, its fixed, I'd like to get a moderator to move the thread for me c:
Sorry, you need to Log In to post a reply to this thread.