AlliedModders

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

Cigojlo 09-18-2013 20:51

loop help
 
Hey guys i search all forum but cant finde, how can i loop to see is there is one ct left i want to protect respawn if one ct left,thanks in advance, here is waht im trying to do:

PHP Code:

public bla bla(id)
{
            new 
iPlayers[32], iNumid;
            new 
tdi get_players(iPlayersiNum"1""CT");
            
            
/* --| If already has item, show a damn print and return */
            
if(tdi && cs_get_user_team(id) == CS_TEAM_T && cs_get_user_team(id) == CS_TEAM_SPECTATOR)
            {
                
client_printidprint_chat"" );
                return 
PLUGIN_HANDLED;
            }
            
            
ExecuteHamBHam_CS_RoundRespawnid );
            
            return 
PLUGIN_HANDLED;



Black Rose 09-19-2013 01:00

loop help
 
No Steam, no help.

Cigojlo 09-20-2013 06:37

Re: loop help
 
Quote:

Originally Posted by Black Rose (Post 2037262)
No Steam, no help.

What non steam, areu u drunk? Moderators can you remove this spam bot pls, he spaming all threads?!

mottzi 09-20-2013 07:11

Re: loop help
 
Use get_maxplayers() and cs_get_user_team()

or

use get_players()

Cigojlo 09-20-2013 08:50

Re: loop help
 
thanks mottzi


All times are GMT -4. The time now is 18:52.

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