AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to check how many players on team? (https://forums.alliedmods.net/showthread.php?t=237611)

linuxas 03-27-2014 07:55

How to check how many players on team?
 
Hello. :) I'm trying to make my own plugin right now, and I got stuck on line, where I need to check if there is 5 players in TERORRIST team and 5 players on CT team playing at this moment.

I will try to explain what I need in the code:
PHP Code:

If [5x5 players online]
return 
PLUGIN_CONTINUE 

I need to change [5x5 players online] line with a correct one, whick would check if there is 5x5 players online. I really tried to search this forum but I can't find anything similar to this.

Thanks if you will try to help me, and sorry if you didn't understand what i need, my english is crap... :(

p.s. I'm writing this plugin for HLDS server.

DavidJr 03-27-2014 08:18

Re: How to check how many players on team?
 
Look at amxmodx.org
http://www.amxmodx.org/funcwiki.php?go=func&id=1338

PHP Code:

       new iPlayers[32], iNum;
       
get_players(iPlayersiNum"ce""TERRORIST");
       
       if (
iNum == 5)
       {
              
//5 players in T
       



linuxas 03-27-2014 08:19

Re: How to check how many players on team?
 
Very fast answering :o

Thank you very much! :)


All times are GMT -4. The time now is 06:02.

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