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?
- Go to your management panel.
- Open your Web FTP (click on
Files & FTP
). - Go to
garrysmod/addons/darkrpmodification/luadarkrp_modules
. - Create directory
anochat
. - 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")
- 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)
- 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.
Anonymous: We have the Mayor hostage in his office, we ask € 5,000 in exchange.