Quote:
PHP Code:
get_players(players, count) for (new i; i < count; i++) { if (cs_get_user_team(players[i]) != CS_TEAM_CT || cs_get_user_defuse(players[i]) ) players[ i-- ] = players[ --count ]; }
|
I would get only alive CTs, then check if they have a diffuse
PHP Code:
get_players(players, count, "ae", "CT")
PHP Code:
if( cs_get_user_defuse(players[i]) )
that would cut your for-loop iterations in about half, and get rid of another one of your if- checks. As well as make it easier to read. (directly showing you're only dealing with alive CTs)
This is just personal opinion. Your code looks like it works fine. But that would be more efficient.
Other than that...well done, man.