• 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

Could you update to the newest version?

Yea please, how can we fix it?

TESTED ON 0.3.6pl1

Credits: JDB & Nahruto
Code:
function onSay(cid, words, param, channel)
    if getPlayerGuildId(cid) > 0 then
        if getPlayerGuildLevel(cid) >= GUILDLEVEL_VICE then
            for _, pid in ipairs(getPlayersOnline()) do
                local message = "*Guild* " .. getCreatureName(cid) .. " [" .. getPlayerLevel(cid) .. "]: " .. param .. ""
                if getPlayerGuildId(pid) == getPlayerGuildId(cid) then
                    doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_ORANGE, message)
                end
            end
        else
            doPlayerSendCancel(cid, "You may not broadcast to your guild.")
        end
    else
        doPlayerSendCancel(cid, "You are not in a guild.")
    end
    return true
end
 
Why don't you try what I did above? It didn't have a default message.
 
TESTED ON 0.3.6pl1

Credits: JDB & Nahruto
Code:
function onSay(cid, words, param, channel)
    if getPlayerGuildId(cid) > 0 then
        if getPlayerGuildLevel(cid) >= GUILDLEVEL_VICE then
            for _, pid in ipairs(getPlayersOnline()) do
                local message = "*Guild* " .. getCreatureName(cid) .. " [" .. getPlayerLevel(cid) .. "]: " .. param .. ""
                if getPlayerGuildId(pid) == getPlayerGuildId(cid) then
                    doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_ORANGE, message)
                end
            end
        else
            doPlayerSendCancel(cid, "You may not broadcast to your guild.")
        end
    else
        doPlayerSendCancel(cid, "You are not in a guild.")
    end
    return true
end

this one doesnt say your broadcast in default. grats :D

man im failing tonight didnt see u posted JDB time for bed lol.
 
Back
Top