-- Broadcast script by Jonern
local colors = {
["red"] = MESSAGE_STATUS_WARNING,
["white"] = MESSAGE_EVENT_ADVANCE,
["white2"] = MESSAGE_EVENT_DEFAULT,
["orange"] = 17,
["green"] = MESSAGE_INFO_DESCR,
["small"] = MESSAGE_STATUS_SMALL,
["blue"] = MESSAGE_STATUS_CONSOLE_BLUE,
["red2"] = MESSAGE_STATUS_CONSOLE_RED,
}
function onSay(cid, words, param)
if getPlayerGroupId(cid) == 2 or getPlayerGroupId(cid) == 3 and param ~= nil then
local textColor = MESSAGE_EVENT_ADVANCE
local setColor = FALSE
if string.find(param," ",string.find(param,"[red,white,white2,orange,green,small,blue,red2]")+1) ~= nil then
color = string.sub(param,0,string.find(param," ")-1)
broadcastMessage(string.sub(param,string.find(param," ")+1,string.len(param)),colors[color])
else
broadcastMessage(param,textColor)
end
end
end