• 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 msg

televolt

Member
Joined
Jun 21, 2010
Messages
153
Reaction score
9
Hello all, i have a noob question.. where i can edit broadcast to not show in console?
 
050-function.lua

Lua:
function doPlayerBroadcastMessage(cid, text, class, checkFlag, ghost)
	local checkFlag, ghost, class = checkFlag or true, ghost or false, class or TALKTYPE_BROADCAST
	if(checkFlag and not getPlayerFlagValue(cid, PLAYERFLAG_CANBROADCAST)) then
		return false
	end

	if(type(class) == 'string') then
		local className = TALKTYPE_TYPES[class]
		if(className == nil) then
			return false
		end

		class = className
	elseif(class < TALKTYPE_FIRST or class > TALKTYPE_LAST) then
		return false
	end

	local players = getPlayersOnline()
	for _, pid in ipairs(players) do
		doCreatureSay(cid, text, class, ghost, pid)
	end

	print("> " .. getCreatureName(cid) .. " broadcasted message: \"" .. text .. "\".")
	return true
end

print shows it on console
 
MESSAGE_STATUS_CONSOLE_RED = 18
MESSAGE_EVENT_ORANGE = 19
MESSAGE_STATUS_CONSOLE_ORANGE = 20
MESSAGE_STATUS_WARNING = 21
MESSAGE_EVENT_ADVANCE = 22
MESSAGE_EVENT_DEFAULT = 23
MESSAGE_STATUS_DEFAULT = 24
MESSAGE_INFO_DESCR = 25
MESSAGE_STATUS_SMALL = 26
MESSAGE_STATUS_CONSOLE_BLUE = 27

these are the types of the messages{broadcast}
use this code
Lua:
doBroadcastMessage(message, type)
where message is you message you want to send
and type = name of the message type you want or the id of the type like;
Lua:
doBroadcastMessage('televolt is an otland member :D', 20)
this will send televolt is an otland member :D {with orange colour in deafult channel}
CONSLE = deafult page

~~~~ Slave Ots ~~~~
 
What are you talking about ? Its about console. Deleting print is enough for it to work ... Just delete last third line
 
Back
Top