• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

doPlayerSendTextMessage GOLD MSG FROM HELP CHANNEL

Mauzim

Member
Joined
Jan 3, 2011
Messages
568
Reaction score
9
how to make that player get msg in default channel with golden color from gm or tutor say in help channel ex.
doPlayerSendTextMessage(cid, HERE COLOR????, "hERE TEXT")
 
doPlayerSendTextMessage(cid, TALKTYPE_SAY, "msg")

talktypes sent on local chat:
TALKTYPE_SAY << yellow
TALKTYPE_ORANGE_1 << orange
MESSAGE_STATUS_CONSOLE_BLUE << lightblue(like somebody pm'ed to you)
red and green messages are sent to server log anyway
 
Last edited:
yes but i want display gold msg that like gm or tutor write in help channel thats is possible? change lib or something

any1?
 
Last edited by a moderator:
They set the STATUS Message to said color


these are all the messages (0.2.15)

MESSAGE_STATUS_CONSOLE_BLUE = 4
MESSAGE_STATUS_CONSOLE_RED = 12
MESSAGE_STATUS_DEFAULT = 16
MESSAGE_STATUS_WARNING = 17
MESSAGE_EVENT_ADVANCE = 18
MESSAGE_STATUS_SMALL = 19
MESSAGE_INFO_DESCR = 20
MESSAGE_DAMAGE_DEALT = 21
MESSAGE_DAMAGE_RECEIVED = 22
MESSAGE_HEALED = 23
MESSAGE_EXPERIENCE = 24
MESSAGE_DAMAGE_OTHERS = 25
MESSAGE_HEALED_OTHERS = 26
MESSAGE_EXPERIENCE_OTHERS = 27
MESSAGE_EVENT_DEFAULT = 28
MESSAGE_EVENT_ORANGE = 34
MESSAGE_STATUS_CONSOLE_ORANGE = 35
 
You can use
Code:
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your message here.")
rxCd0_.png


Other types and colors
Code:
MESSAGE_FIRST = 18
MESSAGE_STATUS_CONSOLE_RED = MESSAGE_FIRST
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
MESSAGE_LAST = MESSAGE_STATUS_CONSOLE_BLUE

The dark yellow message is a channel message, you can use it in channels.
Code:
doPlayerSendChannelMessage(cid, "", "Your message here.", TALKTYPE_CHANNEL_O, CHANNEL_HELP)
iMVll-.png


Other channels you can choose
Code:
CHANNEL_GUILD = 0
CHANNEL_PARTY = 1
CHANNEL_STAFF = 2
CHANNEL_COUNSELOR = 4
CHANNEL_GAME_CHAT = 5
CHANNEL_TRADE = 6
CHANNEL_TRADE_ROOKGAARD = 7
CHANNEL_RL_CHAT = 8
CHANNEL_HELP = 9
If you don't have the channel constant name in 000-constant.lua, use the number or add it.

You can't use all kinds of messages in all channels, it's a limit in the client.
 
i found this is 0.4
i don't know if i'm right or not xD
Code:
CHANNEL_GUILD = 0
CHANNEL_PARTY = 1
CHANNEL_RVR = 3
CHANNEL_HELP = 9
CHANNEL_DEFAULT = 0xFFFE
CHANNEL_PRIVATE = 0xFFFF

CHANNEL_DEFAULT = 0xFFFE
maybe give it number ? or just try it like this
3884.TFS 0.4
 
i don't wanna all write in this color just msg but btw.
another question how to make player with storage.... can write gold in trade???? it is possible or need source compile?????????
doPlayerSendChannelMessage(cid, "", "Your message here.", TALKTYPE_CHANNEL_O,CHANNEL_TRADE)
 
Last edited:
i found this is 0.4
i don't know if i'm right or not xD
Code:
CHANNEL_GUILD = 0
CHANNEL_PARTY = 1
CHANNEL_RVR = 3
CHANNEL_HELP = 9
CHANNEL_DEFAULT = 0xFFFE
CHANNEL_PRIVATE = 0xFFFF

CHANNEL_DEFAULT = 0xFFFE
maybe give it number ? or just try it like this
3884.TFS 0.4
0xFFFF = 65535
0xFFFE = 65534
 
any one knwo that????????
i don't wanna all write in this color just msg but btw.
another question how to make player with storage.... can write gold in trade???? it is possible or need source compile?????????
doPlayerSendChannelMessage(cid, "", "Your message here.", TALKTYPE_CHANNEL_O,CHANNEL_TRADE)
 
You can do it with a talkaction
talkactions.xml
Code:
<talkaction words="!trade" hide="yes" event="script" value="trade.lua"/>

trade.lua
Code:
local tradestorage = 5000

local condition = createConditionObject(CONDITION_MUTED)
setConditionParam(condition, CONDITION_PARAM_TICKS, 120000)
setConditionParam(condition, CONDITION_PARAM_SUBID, 2)

function onSay(cid, words, param, channel)

     if getCreatureCondition(cid, CONDITION_MUTED, 2) then
         return doPlayerSendCancel(cid, "You may only place one offer in two minutes.")
     end
     if channel ~= CHANNEL_TRADE or param == "" then
         return doPlayerSendCancel(cid, "Write your offer"..(param == "" and "" or " in the trade channel")..".")
     end
     if getPlayerStorageValue(cid, tradestorage) >= 1 then
         for _, pid in ipairs(getPlayersOnline()) do
             doPlayerSendChannelMessage(pid, getPlayerName(cid), param, TALKTYPE_CHANNEL_O, CHANNEL_TRADE)
         end
         doAddCondition(cid, condition)
     else
         doPlayerSendCancel(cid, "You need storage to talk in orange in trade.")
     end
     return true
end
Change 5000 to the storage people need.

kBDBTr.png

Qz6x6z.png
 
Last edited:
You can do it with a talkaction
talkactions.xml
Code:
<talkaction words="!trade" hide="yes" event="script" value="trade.lua"/>

trade.lua
Code:
local tradestorage, storage = 5000, 53732

function onSay(cid, words, param, channel)

     if exhaustion.check(cid, storage) then
         return doPlayerSendCancel(cid, "You may only place one orange offer in five minutes.")
     end
     if channel ~= CHANNEL_TRADE or param == "" then
         return doPlayerSendCancel(cid, "Write your offer"..(param == "" and "" or " in the trade channel")..".")
     end
     if getPlayerStorageValue(cid, tradestorage) >= 1 then
         for _, pid in ipairs(getPlayersOnline()) do
             doPlayerSendChannelMessage(pid, getPlayerName(cid), param, TALKTYPE_CHANNEL_O, CHANNEL_TRADE)
         end
         exhaustion.set(cid, storage, 5 * 60)
     else
         doPlayerSendCancel(cid, "You need storage to talk in orange in trade.")
     end
     return true
end
Change 5000 to the storage people need.

kBDBTr.png

Qz6x6z.png


and its possible to storage is exhaustion is conditionid 2 what is mute for 2min????
muted="120" conditionId="2" conditionMessage="You may only place one offer in two minutes."
 
Back
Top