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

#bc problem

Nightimarez

New Member
Joined
Jul 24, 2008
Messages
287
Reaction score
2
I use my own broadcast to pay script, and in order for it to work, I had to enable the broadcast flag for players. Is there a way to disable #bc or a script that you need to pay to broadcast without enabling the broadcast flag to players?
 
Are you using this function? If so, check this out:
Code:
doPlayerBroadcastMessage(cid, text, class, [B][COLOR="Red"]checkFlag[/COLOR][/B], ghost)
 
This is what I'm using.

Code:
function onSay(cid, words, param)
	if doPlayerRemoveMoney(cid, 500000) == TRUE and getPlayerLevel(cid) > 499 then
	doPlayerBroadcastMessage(cid, param)
	return TRUE
else 
            doPlayerSendCancel(cid, 'You need 50 Crystal coins and level 500 to broadcast.') 
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) 
        end 
        end
 
@up
wtf??
@thread
Use this:
LUA:
function onSay(cid, words, param)
	if doPlayerRemoveMoney(cid, 500000) == TRUE and getPlayerLevel(cid) > 499 then
	   doBroadcastMessage(".. getCreatureName(cid) .." [".. getPlayerLevel(cid) .."]: ".. param ..")
    else 
         doPlayerSendCancel(cid, 'You need 50 Crystal coins and level 500 to broadcast.') 
         doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) 
    end
    return true 
end

or you could try this too:
LUA:
function onSay(cid, words, param)
	if doPlayerRemoveMoney(cid, 500000) == TRUE and getPlayerLevel(cid) > 499 then
	   doPlayerBroadcastMessage(cid, param, 19, false, false)
    else 
         doPlayerSendCancel(cid, 'You need 50 Crystal coins and level 500 to broadcast.') 
         doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) 
    end
    return true 
end
 
Code:
function onSay(cid, words, param, channel)
	if doPlayerRemoveMoney(cid, 500000) and getPlayerLevel(cid) > 499 then
		doPlayerBroadcastMessage(cid, param, nil, false)
	else
		doPlayerSendCancel(cid, 'You need 50 Crystal coins and level 500 to broadcast.') 
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) 
	end
	return true
end
Blame elf it doesn't work.
 
Yeah, it doesn't work without the flag. Is it possible to make players broadcast but with like white text.
elf made a little mistake in this function :p:
Code:
function doPlayerBroadcastMessage(cid, text, class, checkFlag, ghost)
	local checkFlag, ghost, class = [B][COLOR="Red"]checkFlag or true[/COLOR][/B], 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
 
Back
Top