Guest User

Hide Chat Command

a guest
Dec 17th, 2015
707
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. -- To install on a Garry's Mod Dedicated Server navigate to garrysmod\lua\autorun\ and make a new file, it can be called anything you
  2. -- want, but must have the extension ".Lua", once you have created this file paste this script into the file and save it.
  3.  
  4. -- To edit this file for different command prefixes change the ! on line 13 to whichever prefix your commands use, for multiple
  5. -- prefixes you can delete "--" on line 15 and 16 and change "Yourprefixhere" (on line 15)to whatever prefix your command system uses.
  6.  
  7.  
  8. hook.Add( "PlayerSay", "HIDECOM", function( ply, text, public )
  9.     function string.starts(String,Start)
  10.         return string.sub(String,1,string.len(Start))==Start
  11.     end
  12.     text = string.lower( text )
  13.     if string.starts(text, "!") then
  14.         return ""
  15. --  elseif string.starts(text, "Yourprefixhere") then
  16. --      return ""
  17.     end
  18. end )
Advertisement
Add Comment
Please, Sign In to add comment