Raised This Month: $ Target: $400
 0% 

[SNIPPED] CS_GetValidSpawnTeam


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 10-23-2013 , 16:47   [SNIPPED] CS_GetValidSpawnTeam
Reply With Quote #1

PHP Code:
stock CS_GetValidSpawnTeam()
{
new 
maxEnt GetMaxEntities(), tcountctcount;
decl String:sClassName[64];
for (new 
MaxClientsmaxEnti++)
{
if (
IsValidEdict(i) && IsValidEntity(i) && GetEdictClassname(isClassNamesizeof(sClassName)))
{
if (
StrEqual(sClassName"info_player_terrorist"))
{
tcount++;
}
else if (
StrEqual(sClassName"info_player_counterterrorist"))
{
ctcount++;
}
}
}

if(
tcount 0) return CS_TEAM_T;
else if(
ctcount 0) return CS_TEAM_CT;

else return 
CS_TEAM_NONE;

__________________

Last edited by asherkin; 01-14-2015 at 20:01.
zipcore is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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