Learn how to add the /ano command to your Garry's mod server. This command displays anonymous messages on your GMod server.

How to install /ano script?

  1. Go to your management panel.
  2. Open your Web FTP (click on Files & FTP).
  3. Go to garrysmod/addons/darkrpmodification/luadarkrp_modules.
  4. Create directory anochat.
  5. Create sh_anochat.lua file in anochat directory, with the following script:
    DarkRP.declareChatCommand{
            command = "ano",
            description = "Send anonymous message on server",
            delay = 5
    }
    
    DarkRP.chatCommandAlias("ano","anonymous")

  6. Create sv_anochat.lua file in anochat folder, with the following script:
    local function anonymous(ply, args)
       if args == "" then return "" end
       for _, target in pairs(player.GetHumans()) do
          if IsValid(target)  then
             DarkRP.talkToPerson(target, Color(204,18,21,255), "Anonymous", Color(250,250,250,255), args, ply)
          end
       end
       DarkRP.log(ply:Name().." said anonymously: "..args,Color(255,255,255,255))
    end
    
    DarkRP.defineChatCommand("ano", anonymous)

  7. Reboot your Garry's Mod server.

Usage

In the chat or the server console, enter the command  /ano <message> (replace <message> by your text). By example:

/ano We have the Mayor hostage in his office, we ask € 5,000 in exchange.
Your players will see in chat:

Anonymous: We have the Mayor hostage in his office, we ask € 5,000 in exchange.