• Retrun how many players in a team?
    2 replies, posted
Hello facePunch I'm trying to come up with a method on retrieving a value on how many players are in that specific team. For an example... iI'm trying to use table.Count(), but it doesn't seem to be working for me... [CODE] if table.Count(TEAM_POLICE) > 0 then print("There is police online!") else print("They're ni police officers online!") end [/CODE] Help is much appreciated.
[url]http://wiki.garrysmod.com/page/team/NumPlayers[/url] [code]team.NumPlayers(TEAM_POLICE)[/code] [editline]5th February 2017[/editline] TEAM_POLICE isn't a table, but a number: [url]https://github.com/FPtje/DarkRP/blob/master/gamemode/modules/base/sh_createitems.lua#L456[/url]
[QUOTE=Fruitwesp;51780848][url]http://wiki.garrysmod.com/page/team/NumPlayers[/url] [code]team.NumPlayers(TEAM_POLICE)[/code] [editline]5th February 2017[/editline] TEAM_POLICE isn't a table, but a number: [url]https://github.com/FPtje/DarkRP/blob/master/gamemode/modules/base/sh_createitems.lua#L456[/url][/QUOTE] Thank you, helps alot! <3
Sorry, you need to Log In to post a reply to this thread.