• 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 Broadcast script

And when I say "give REP!" I mean pushing on the reputation button too ;)
(The button at my post below where it says "Reputation:
reputation_pos.gif
")

I wanna get it like this: Reputation:
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
reputation_pos.gif
:D

nah the rep picture wont change i got 60+ rep and it's still the same.

anywais to use this script on older version just change the broadcast part
 
nah the rep picture wont change i got 60+ rep and it's still the same.

anywais to use this script on older version just change the broadcast part

It does change, you have two dots now.
 
For sau in gree

how i make command

i use

!bc" green msg

but don't work

Edit@

sorry now are working

;D
 
Made it shorter, should work :p
Code:
-- Broadcast script by Jonern
local colors = {
	["red"] = MESSAGE_STATUS_WARNING,
	["white"] = MESSAGE_EVENT_ADVANCE,
	["white2"] = MESSAGE_EVENT_DEFAULT,
	["orange"] = 17,
	["green"] = MESSAGE_INFO_DESCR,
	["small"] = MESSAGE_STATUS_SMALL,
	["blue"] = MESSAGE_STATUS_CONSOLE_BLUE,
	["red2"] = MESSAGE_STATUS_CONSOLE_RED,
}

function onSay(cid, words, param)
    if getPlayerGroupId(cid) == 2 or getPlayerGroupId(cid) == 3 and param ~= nil then
        local textColor = MESSAGE_EVENT_ADVANCE
        local setColor = FALSE
        if string.find(param," ",string.find(param,"[red,white,white2,orange,green,small,blue,red2]")+1) ~= nil then            
            color = string.sub(param,0,string.find(param," ")-1)
            broadcastMessage(string.sub(param,string.find(param," ")+1,string.len(param)),colors[color])
        else
            broadcastMessage(param,textColor)
        end
    end
end
 
Last edited:
@ Jonern - great man, how to me make this for typeid???

-- i'm explain:
groupid 1 = player
groupid 2 = gm
groupid 3 = god

--don't have a tutor, but when i'm make a TYPEID i'm create a tutor:

-- groupid 1 + typeid 1 = player
-- groupid 1 + typeid 2 = tutor << i'm want to use on it...

-- Can you help me???

No more, thx

F@bio
 
@up use this :)
PHP:
function onSay(cid, words, param)
    if getPlayerGroupId(cid) == 2 or getPlayerGroupId(cid) == 1 and getAccountType(cid) == 2 and param ~= nil then
        local textColor = MESSAGE_EVENT_ADVANCE
        local setColor = FALSE
        if string.find(param," ",string.find(param,"[red,white,white2,orange,green,small,blue,red2]")+1) ~= nil then            
            color = string.sub(param,0,string.find(param," ")-1)
            if color == "red" then
                textColor = MESSAGE_STATUS_WARNING
                setColor = TRUE
            elseif color == "white" then
                textColor = MESSAGE_EVENT_ADVANCE
                setColor = TRUE
            elseif color == "white2" then
                textColor = MESSAGE_EVENT_DEFAULT
                setColor = TRUE
            elseif color == "orange" then
                textColor = 17
                setColor = TRUE
            elseif color == "green" then
                textColor = MESSAGE_INFO_DESCR
                setColor = TRUE
            elseif color == "small" then
                textColor = MESSAGE_STATUS_SMALL
                setColor = TRUE
            elseif color == "blue" then
                textColor = MESSAGE_STATUS_CONSOLE_BLUE
                setColor = TRUE
            elseif color == "red2" then
                textColor = MESSAGE_STATUS_CONSOLE_RED
                setColor = TRUE
            end
        end
        if setColor == TRUE then
            broadcastMessage(string.sub(param,string.find(param," ")+1,string.len(param)),textColor)
        else
            broadcastMessage(param,textColor)
        end
    end
end
 
Hey man, sorry for my long time offline, i'm work, many thx for your help, but don't work...

here is the mensage when i'm use a player with group = 1 and type = 2, but with a GOD and GMs it's work...

Code:
Lua Script Error: [TalkAction Interface] 
data/talkactions/scripts/broadcast.lua:onSay

data/talkactions/scripts/broadcast.lua:2: attempt to call global 'getAccountType' (a nil value)

Can you help me??? thx...
 
Last edited:
thanks both Colandus and Jonern. Anyway to make it say who is using it? i want to let my tutors use this but i wana know who is saying what so they dont abuse it
 
Last edited:
checkin back again... nobody has responded.... can someone atleast tell me if its possible, this is like a never ending search :(
 
Of course it's possible...
anything is possible, eventually.
 
Back
Top