local msgs = getnewmessages("Local chat")
local qtd = msgs.count-1
local player = Tile.GetByPosition(posx-1, posy, posz):TopCreature():Name()
for i=0,qtd
do
if msgs[i].text:find(player..'(.+)hello')
then
say("hello")
end
end
wait(500)
how to make anti spam for it? i dont know what code to use i think about something like this
but only if player posx-1 spamm to me
local msgs = getnewmessages("Local chat")
local qtd = msgs.count-1
local player = Tile.GetByPosition(posx-1, posy, posz):TopCreature():Name()
for i=0,qtd
do
getnewmessages("Local chat").count > 1 then
say("stop spamm")
else
if msgs[i].text:find(player..'(.+)hello')
then
say("hello")
end
end