Modindependent way to count team and enemies?
Is there a mod independent / generic way to count players per team? I need to know at player respawn, how much players I have in each team and than to decide for each player what to do with him, depending on his team and the player number in each team ...
I could easily do this with cs or dod, but how to do this with any mod? Is get_players still my friend in this case or do I have to add some code lines for each mod? get_user_team is quite good to have a generic way to get a players team, but how to know which teams exist to count the number of players in each team? I would really not like to use some "pre parse" on each respawn of a player to get to know, which teams exist and than to count how many players are in there ... |
Re: Modindependent way to count team and enemies?
yes, very easy.
Code:
Here a litle complete example:You only need the team id number. I am NOT 100% sure(1= CT,Axis/2= Terror,Allies/0= Spectator) Code:
For the teamnames there exist an event:http://wiki.amxmodx.org/index.php/Ha...t for all Mods |
Re: Modindependent way to count team and enemies?
Works quite well, karma++ for this.
|
| All times are GMT -4. The time now is 22:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.