doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your message here.")
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
doPlayerSendChannelMessage(cid, "", "Your message here.", TALKTYPE_CHANNEL_O, CHANNEL_HELP)
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
CHANNEL_GUILD = 0
CHANNEL_PARTY = 1
CHANNEL_RVR = 3
CHANNEL_HELP = 9
CHANNEL_DEFAULT = 0xFFFE
CHANNEL_PRIVATE = 0xFFFF
0xFFFF = 65535i 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
<talkaction words="!trade" hide="yes" event="script" value="trade.lua"/>
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
You can do it with a talkaction
talkactions.xml
Code:<talkaction words="!trade" hide="yes" event="script" value="trade.lua"/>
trade.lua
Change 5000 to the storage people need.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
![]()
![]()