URI:
   DIR Return Create A Forum - Home
       ---------------------------------------------------------
       CGGMTA
  HTML https://cgg2.createaforum.com
       ---------------------------------------------------------
       *****************************************************
   DIR Return to: Scripting Board
       *****************************************************
       #Post#: 413--------------------------------------------------
       AFK secript
       By: oussama1 Date: June 5, 2014, 8:10 am
       ---------------------------------------------------------
       afk.lua
       [code]
       function antiafk (player)
       if (getPlayerWantedLevel(player) > math.random )
       then
       outputChatBox("You can't Go afk While You're
       wanted", player, 255, 0, 0 )
       return false
       elseif (getElementInterior(player)
       ~= math.random ) then
       outputChatBox("Get Out Of Interior Inorder to become
       afk.", player, 255, 0, 0)
       return false
       end
       
       function afk ( player )
       
       fadeCamera(player, false, 2, 0, 0, 0)
       afkTable[player] = true
       setElementDimension(player,
       math.random(1000, 1100))
       setElementFrozen(player, true)
       outputChatBox("You are Currently AFK",
       player, 0, 255, 0)
       end
       addCommandHandler("afk", AFK)
       
       function afkback ( player )
       
       if (afkTable[player]) then
       afkTable[player] = nil
       setElementDimension(player, 0)
       fadeCamera(player, true, 2)
       setElementFrozen(player, false)
       outputChatBox("Welcome Back!.", player, 0,
       255, 0)
       end
       end
       addCommandHandler("afkback", afkback)
       end
       [/code]
       *****************************************************