Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- afklist = {}
- function AFK_Queue
- local playerlist = player.GetAll()
- local afkstatus = nil
- hook.Add("Think","AFKQueue", function() -- Hook Think checks/runs every server tick
- for k, v in pairs(playerlist) do
- if v:IsActive() and v:IsSpec() then
- print ( "Grabbing all Spectators" )
- table.insert( afklist, v )
- print ("Inserting spectators to list")
- end
- for k, v in pairs(afklist)
- end)
- hook.Add("TTTBeginRound", "AFKPoints", function()
- for k, v in pairs(afklist) do
- <Insert code to reward players in afklist here>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement