mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 19:45:22 +09:00
Added kick for all if there is less than 3 players
This commit is contained in:
@@ -22,7 +22,7 @@ Event.register(-1,function(event)
|
||||
}:on_event('tick',function(self)
|
||||
if (game.tick%3600) ~= 0 then return end
|
||||
for _,player in pairs(game.connected_players) do
|
||||
local afk = get_afk_time(player)
|
||||
local afk = #game.connected_players < 3 and 10 or get_afk_time(player)
|
||||
if afk then
|
||||
if player.afk_time > afk*3600 then game.kick_player(player,'AFK For Too Long ('..math.floor(afk)..' Minutes)') end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user