Quote:
Originally Posted by HLM
PHP Code:
// there HAS to be an easier way...
will this work as intended? I am assuming no, since there is the possibility that team1 could have 4 peopls team2 4 team3 5 team4 6 and it will probably be wrong..
|
I'm sure there is a more dynamic way but it probably won't be easy. First of all, what mod has more than two team? And, I have a hard time believing that get_user_team() will return 0 for spectator on any mod. CS and DOD both have spec that are non-zero IIRC.
Quote:
Originally Posted by RedRobster
Well, when looping through the players, make sure to do
PHP Code:
new players[32], pnum
get_players(players, pnum)
for(new i; i < pnum; i++)
{
new tempid = players[i]
}
The way you are doing it, it will loop through 33 times instead of just 32 as well.
|
Note: You don't need to cache the player id if it is only used once. He could just as easily do switch(get_user_team(players[i])).
__________________