Bug Fixes Round One

This commit is contained in:
Cooldude2606
2018-10-26 16:20:09 +01:00
parent 3e3e9b747c
commit b9435d08ba
6 changed files with 8 additions and 5 deletions

View File

@@ -327,6 +327,7 @@ function Role._prototype:get_players(online)
if not self_test(self,'role','get_players') then return end
if online and not type_error(online,'boolean','Invalid argument #1 to role:get_players, online is not a boolean.') then return end
if not global.roles[self.name] then global.roles[self.name] = {} end
if self.is_default then if online then return game.connected_players else return game.players end end
local rtn = {}
for _,player_index in pairs(global.roles[self.name]) do
local player = game.players[player_index]