AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   HELP: How do I... (https://forums.alliedmods.net/showthread.php?t=41410)

Mini_Midget 07-14-2006 18:40

HELP: How do I...
 
i'm not sure how
but how do you get the number of players in a team
and then print it on print_chat (this part i know how to do)
do I have to use get_players with the "e" flag or something?

XxAvalanchexX 07-14-2006 23:05

Re: HELP: How do I...
 
Code:
new players[32], Tcount, CTcount; get_players(players,Tcount,"e","TERRORIST"); get_players(players,CTcount,"e","CT");

Mini_Midget 07-14-2006 23:57

Re: HELP: How do I...
 
you sure that works?
i just tested it but counts everyone
i was on ct and there were 2 guys on t's
it counted 3 people instead of 2 when i just wanted to count t's only

Drak 07-15-2006 22:41

Re: HELP: How do I...
 
He has both, counting T and CT...Just take it out
Code:
new players[32], Tcount; get_players(players,Tcount,"e","TERRORIST"); client_print(id,print_chat,"There's %i T's",Tcount)

Mini_Midget 07-16-2006 00:13

Re: HELP: How do I...
 
Quote:

Originally Posted by SixTwin
He has both, counting T and CT...Just take it out
Code:
new players[32], Tcount; get_players(players,Tcount,"e","TERRORIST"); client_print(id,print_chat,"There's %i T's",Tcount)

thats what i did but it counted ct's aswell

Mini_Midget 07-17-2006 03:33

Re: HELP: How do I...
 
heres what I tried to use it for
Code:
    new players[32], Tcount, zombies, real, bots     real = get_players(players,Tcount,"e","TERRORIST")     bots = get_cvar_num ("pb_minbots")     zombies = real + bots         client_print(0,print_chat,"%L",LANG_PLAYER,"ZOMBIEBOT_NUMBER",zombies)
I was hoping it counts the T's only but when there was only one bot on the other team and I was on ct, it says that there are 2 zombies instead!


All times are GMT -4. The time now is 07:55.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.