• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Broadcast

lordad

New Member
Joined
May 13, 2008
Messages
61
Reaction score
1
Hello, how do i make a broadcast with GOD/GM Without showing the name of the broadcaster(TFS 1.0) Client Ver. 10.41
 
talkactions.xml
Code:
<talkaction words="/bc" separator=" " script="broadcastclass.lua" />

broadcastclass.lua
Code:
local 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
}

function onSay(cid, words, param, channel)
     local p = Player(cid)
     if param == '' then
         return p:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
     end

     local t = string.explode(param, " ", 1)
     if t[2] and MESSAGE_TYPES[t[1]:lower()] then
         broadcastMessage(t[2], MESSAGE_TYPES[t[1]:lower()])
     else
         broadcastMessage(param)
     end
     return true
end

Also add this in global.lua
http://pastebin.com/VRS3bMae
 
Back
Top Bottom