• Admin advert command for Phase Four (lua)
    1 replies, posted
I have been working on an admin advert plugin and what it does is, whenever you type "/adminvert <text>", it comes back anonymously as "[Administration] <text>" As an example, I type "/adminvert Do not park you cars in the street, or they will be removed" it comes back as "[Administration] Do not park you cars in the street, or they will be removed" as easy as it sounds, can someone help? here is the code I have so far [CODE]--[[ &#65533; 2013 CloudSixteen.com do not share, re-distribute or modify without permission of its author (kurozael@gmail.com). --]] local Clockwork = Clockwork; local COMMAND = Clockwork.command:New("adminvert"); COMMAND.tip = "Sends a message anonymously from administration"; COMMAND.text = "<string Text>"; COMMAND.flags = CMD_DEFAULT; COMMAND.access = "o"; COMMAND.arguments = 1; -- Called when the command has been run. function COMMAND:OnRun(player, arguments) Clockwork.chatBox:Add(nil, player, "adminvert", table.concat(arguments, " ")); end; COMMAND:Register();[/CODE]
[code]local Clockwork = Clockwork; local COMMAND = Clockwork.command:New("Adminvert"); COMMAND.tip = "Sends a message anonymously from administration"; COMMAND.text = "<string Msg>"; COMMAND.access = "o"; COMMAND.arguments = 1; -- Called when the command has been run. function COMMAND:OnRun(player, arguments) local msg = table.concat(arguments, " ") local allplayers = player.GetAll() Clockwork.chatBox:SendColored(allplayers, Color(0, 180, 216), "[Administration] ", Color(255, 255, 255), msg) end; COMMAND:Register();[/code]
Sorry, you need to Log In to post a reply to this thread.