Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local max_IdleTime = 20000
- function afkDetector()
- for index, player in pairs( getElementsByType("player") ) do
- if ( getPlayerIdleTime( player ) >= max_IdleTime ) then
- setElementDimension( player, 10000 )
- setElementData( player,"awayFromKeyboard", true )
- setElementFrozen( player, true )
- outputChatBox("You are now afk type /back to move to the main wolrd", player,255,0,0)
- end
- end
- end
- setTimer(afkDetector, 1000,0)
- addCommandHandler("back",
- function(plr, cmd)
- setElementDimension(plr, 0)
- setElementFrozen (plr, false)
- setPlayerNametagText(plr,""..getPlayerName(plr).."["..getElementData(plr, "WL").."]")
- outputChatBox("You are back to the main world", source, 255, 0, 0)
- end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement