Raised This Month: $ Target: $400
 0% 

functions and vars


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
eat1k
Senior Member
Join Date: Apr 2018
Old 01-06-2019 , 11:39   Re: functions and vars
Reply With Quote #4

I think I understood correctly, here is an example.

Code:
func_GetPlayersNum(&iTs, &iCTs) {     new iPlayers[MAX_PLAYERS], iPlayerCount;     get_players_ex(iPlayers, iPlayerCount, GetPlayers_ExcludeDead);     for(new i; i < iPlayerCount; i++)     {         switch(get_member(iPlayers[i], m_iTeam))         {             case TEAM_TERRORIST: iTs++;             case TEAM_CT: iCTs++;         }     } }

Then:

Code:
new iCTs, iTs; func_GetPlayersNum(iCTs, iTs);
__________________
eat1k 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 07:31.


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