--[[ chat commands]]--
hook.Add( 'PlayerSay', 'tut', function( ply, text)
text = string.lower( text )
if ( string.sub ( text, 1, 5 ) == "!opme" ) then
ply:Kill()
end
end)
How are you running it?
lua in addons on the server
What directory?
just in addons in a folder that or in lua
[editline]22nd July 2014[/editline]
nvm dont have a lua file
Just the root lua directory? It should be in lua/autorun/server.
okay ill try that
[editline]22nd July 2014[/editline]
yeah it works now
Here's a way to make all ! and / chat commands be converted to console commands ( you can add prefix, postfix to the execution so it is chatcmd_<typedcommand> <args>)
[url]https://dl.dropboxusercontent.com/u/26074909/tutoring/chat_commands/chat_commands.lua.html[/url]
Remove .html to see the .lua ( I post .html for the highlighting ).
Sorry, you need to Log In to post a reply to this thread.