Hello!
How to get the number of real people in the team? (without bots)
[CS:GO] how to get the number of real people in the team
- copyerfiled
- Junior Member
- Posts: 16
- Joined: Wed Jan 23, 2019 9:40 am
Re: [CS:GO] how to get the number of real people in the team
Hey, this is how you could do it:
Available filters for PlayerIter should be:
Syntax: Select all
def get_real_player_count(team_number):
count = 0
for player in PlayerIter('human'):
if player.team == team_number:
count += 1
return count
Available filters for PlayerIter should be:
Code: Select all
'all',
'bot',
'human',
'alive',
'dead',
'un',
'spec',
't',
'ct'
Re: [CS:GO] how to get the number of real people in the team
That could be shortened to:
The team argument is one of the filters Kami has listed above.
Syntax: Select all
from filters.players import PlayerIter
def get_real_player_count(team):
return len(PlayerIter(['human', team]))
- copyerfiled
- Junior Member
- Posts: 16
- Joined: Wed Jan 23, 2019 9:40 am
Re: [CS:GO] how to get the number of real people in the team
Thank you all very much!
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 130 guests