SPMod icon indicating copy to clipboard operation
SPMod copied to clipboard

Player iterators

Open Mistrick opened this issue 6 years ago • 0 comments

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
}

How do we replicate the issue?

Expected behavior (i.e. solution)

Other Comments

Mistrick avatar Aug 11 '18 07:08 Mistrick