How to Get Number of Players on Civil Protection DarkRP
1 replies, posted
How do I get the amount of players that are on a team that is in the category "Civil Protection"?
nvm just did it ghetto way
hook.Add("Think", "numbercp", function()
local cpnum = 0
for k,v in pairs(player.GetAll()) do
if v:isCP() then
cpnum = cpnum+1
end
end
accpnum = cpnum
print(accpnum)
end)
Sorry, you need to Log In to post a reply to this thread.