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

TalkAction [0.3] Guild broadcast

Improvement: Working for tfs 0.2.x

Nah I changed some functions and deleted one to make it work for 0,2 distros. The bug is that every member of the guild may speak
PHP:
function onSay(cid, words, param)
	local playerGuild = getPlayerGuildId(cid)
	if playerGuild > 0 then
			local players = getOnlinePlayers()
			local message = "*Guild* " .. getCreatureName(cid) .. " [" .. getPlayerLevel(cid) .. "]:\n" .. param;
			for i,playerName in ipairs(players) do
				local player = getPlayerByName(playerName);
				if getPlayerGuildId(player) == playerGuild then
					doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, message);
				end
			end
			doPlayerSendCancel(cid, "Message sent to whole guild.");
		
	else
		doPlayerSendCancel(cid, "Sorry, you're not in a guild.");
	end
	doPlayerSendTextMessage(cid, 25, words)
	return FALSE
end
 
thnx rep me and the author too xd
~bump
 
Last edited:
Worked perfect. Check my website for in-game photo: - Latest News

Take care! THANKS +++++rep

Tested on LATEST CRY Crying Damson 0.3.5 PATCH 1
 
great script however, could you make it so you don't say the broadcast in default chat that way people can me more secretive while broadcasting in wars etc.
 
great script however, could you make it so you don't say the broadcast in default chat that way people can me more secretive while broadcasting in wars etc.

Yea please, how can we fix it?
 
Back
Top