AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ... (https://forums.alliedmods.net/showthread.php?t=109614)

hectorz0r 11-19-2009 11:32

...
 
...

xPaw 11-19-2009 12:00

Re: detect how many players are currently in a team
 
Code:
#include < amxmodx > #include < cstrike > new g_iMaxplayers; public plugin_init( ) {     g_iMaxplayers = get_maxplayers( ); } stock GetPlayersInTeam( CsTeams:Team ) {     new iNoobs;         for( new id = 1; id <= g_iMaxplayers; id++ ) {         if( is_user_connected( id ) && cs_get_user_team( id ) == Team )             iNoobs++;     }         return iNoobs; }
Code:
if( GetPlayersInTeam( CS_TEAM_CT ) >= 10 ) {     // [ ... ] }

hectorz0r 11-19-2009 12:04

Re: detect how many players are currently in a team
 
...


All times are GMT -4. The time now is 13:39.

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