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

Lua Channel Auto-Mensagem

darkmu

Well-Known Member
Joined
Aug 26, 2007
Messages
274
Solutions
1
Reaction score
50
Location
Paraná,Brazil
function onThink(interval, lastExecution)
local player = Player(cid)
local MESSAGE = {
"teste 1.",
"teste2!",
"teste3"
}

player:sendChannelMessage(MESSAGE[math.random(1, #MESSAGE)], TALKTYPE_CHANNEL_O, 9)
return true

end

Help?
 
Remember, the functions "onThink" doesn't have attribute "cid" or "player". So, try this:
Code:
function onThink(interval, lastExecution)
local MESSAGE = {
"teste 1.",
"teste2!",
"teste3"
}
for _, player in ipairs(Game.getPlayers()) do
player:sendChannelMessage(PUT HERE WHATEVER YOU NEED)
end
return true
end
 
Back
Top