SPMod
SPMod copied to clipboard
Player iterators
Description
Create iterators for player loops. Do this for SPMod and for SPMod plugins.
PlayersItterReset();
Player player;
while (PlayersItterNext(PL_ITTER_EXCLUDE_HLTV | PL_ITTER_EXCLUDE_BOTS)) {
player = PlayersItterGetPlayer();
// Do some stuf
}
or
for(Player p = GetFirstPlayer(SOME_SEARCH_FLAGS); p; p.NextPlayer(/* flags? */))
{
// code
}