I’m quite new to LUA so bear with me here, and don’t hate on DarkRP.
I was trying to make a feature where if a player typed “/anonadvert <message>” it would show up as this (in white and a global message):
I put this in the file main.lua:
local function PlayerAnonAdvertise(ply, args) if args == "" then return "" end local DoSay = function(text) if text == "" then return end for k,v in pairs(player.GetAll()) do local col = team.GetColor(ply:Team()) TalkToPerson(v, col, LANGUAGE.Anonymous .." "..Color(255,255,255,255), text, ply) end end return args, DoSay end AddChatCommand("/anonadvert", PlayerAnonAdvertise)
However when I did the command /anonadvert nothing happened.
Could someone clue me in?
On top of that, is there anything like that to make a local OOC?