Don't look to much at this one, i don't think it's recommended doing it this way, but if it works, it works in my opinion (if it doesn't have significant negative effects on the server).
get_alive_team_players(const szTeam) // Only "CT" and "TERRORIST" obviously. Could be adjusted if nessecary { new iPlayers[MAX_PLAYERS + 1], iCtNum, iTerNum; get_players(iPlayers, iCtNum, "ae", "CT");
return (szTeam == "CT") ? iCtNum : iTerNum; }
All these things are untested, but should do their job, except for the first one, that might just be a no-go by the amxmodx communicty.
If you need more info on what i did, feel free to ask, but i feel like it's pretty common sense.
Don't look to much at this one, i don't think it's recommended doing it this way, but if it works, it works in my opinion (if it doesn't have significant negative effects on the server).
get_alive_team_players(const szTeam) // Only "CT" and "TERRORIST" obviously. Could be adjusted if nessecary
{
new iPlayers[MAX_PLAYERS + 1], iCtNum, iTerNum;
get_players(iPlayers, iCtNum, "ae", "CT");
return (szTeam == "CT") ? iCtNum : iTerNum;
}
All these things are untested, but should do their job, except for the first one, that might just be a no-go by the amxmodx communicty.
If you need more info on what i did, feel free to ask, but i feel like it's pretty common sense.
Neither of these make any sense. Simply use get_players() with team argument determined by the check that I posted. It's actually quite simple, no loops necessary.
Don't look to much at this one, i don't think it's recommended doing it this way, but if it works, it works in my opinion (if it doesn't have significant negative effects on the server).
get_alive_team_players(const szTeam) // Only "CT" and "TERRORIST" obviously. Could be adjusted if nessecary { new iPlayers[MAX_PLAYERS + 1], iCtNum, iTerNum; get_players(iPlayers, iCtNum, "ae", "CT");
return (szTeam == "CT") ? iCtNum : iTerNum; }
All these things are untested, but should do their job, except for the first one, that might just be a no-go by the amxmodx communicty.
If you need more info on what i did, feel free to ask, but i feel like it's pretty common sense.