DeatBringer
New Member
- Joined
- Jul 14, 2009
- Messages
- 17
- Reaction score
- 0
im a noob im learning and how do i change the colors when i broadcast =P
sorry dude im running ots 3 years thats imposibile lol:$
doBroadcastMessage(message, type)
MESSAGE_EVENT_ORANGE
MESSAGE_STATUS_CONSOLE_ORANGE
MESSAGE_STATUS_WARNING
MESSAGE_EVENT_ADVANCE
MESSAGE_EVENT_DEFAULT
MESSAGE_STATUS_DEFAULT
MESSAGE_INFO_DESCR
MESSAGE_STATUS_SMALL
MESSAGE_STATUS_CONSOLE_BLUE
Doesn't tfs has that.. ? Broadcast class...
<talkaction log="yes" words="/bc" access="4" event="script" value="broadcastclass.lua"/>
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
local t = string.explode(param, " ", 1)
if(not t[2]) then
doBroadcastMessage(t[1])
elseif(not doBroadcastMessage(t[2], MESSAGE_TYPES[t[1]])) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Bad message color type.")
end
return true
end
MESSAGE_TYPES = {
["advance"] = MESSAGE_EVENT_ADVANCE,
["event"] = MESSAGE_EVENT_DEFAULT,
["white"] = MESSAGE_EVENT_DEFAULT,
["orange"] = MESSAGE_STATUS_CONSOLE_ORANGE,
["info"] = MESSAGE_INFO_DESCR,
["green"] = MESSAGE_INFO_DESCR,
["small"] = MESSAGE_STATUS_SMALL,
["blue"] = MESSAGE_STATUS_CONSOLE_BLUE,
["red"] = MESSAGE_STATUS_CONSOLE_RED,
["warning"] = MESSAGE_STATUS_WARNING,
["status"] = MESSAGE_STATUS_DEFAULT
}