function checkAFKPlayers()
for index, source in ipairs(getElementsByType("player")) do
if (getPlayerIdleTime(source) > 1000) then
setElementDimension ( source, 50)
setElementAlpha(source, 50)
outputChatBox("#004B00[DDC - Afk] #FFffFFNem mozogtál 2 percig, afk módba léptél! Kikapcsoláshoz mozdulj meg!", root, 255,000,000, true)
elseif isElementMoving(source) then
setElementAlpha(source, 255)
setElementDimension ( source, 0)
outputChatBox("#004B00[DDC - Afk] #FFffFFKiléptél az afk módból!", root, 255,000,000, true)
end
end
end
setTimer(checkAFKPlayers, 1000, 0)
function isElementMoving ( theElement )
if isElement ( theElement ) then
local x, y, z = getElementVelocity( theElement )
return x ~= 0 or y ~= 0 or z ~= 0
end
return false
end
how to fix this? i want once outputChatbox