Player leave bugfix.

This commit is contained in:
Coder12a 2018-10-27 10:51:39 -05:00
parent 33b9d59fa7
commit e7fff79b78

View File

@ -253,10 +253,11 @@ function factions.Faction.add_player(self, player, rank)
end end
function factions.Faction.check_players_in_faction(self) function factions.Faction.check_players_in_faction(self)
local players = #self.players for i,k in pairs(self.players) do
if players < 1 then return true
self:disband("Zero players on faction.")
end end
self:disband("Zero players on faction.")
return false
end end
function factions.Faction.remove_player(self, player) function factions.Faction.remove_player(self, player)