11.05.2015, 09:56
You could do something like this:
Sorry about the indentation, the forum messes it up.
pawn Код:
new checked = 0;
foreach(new i : Player)
{
switch(whatever_var)
{
case 1:
{
//does whatever
//happens fully, like loops normally as foreach does.
}
case 2:
{
if(checked == 0)
{
checked = 1;
//does whatever
//occurs once, foreach does not loop through this case more than once <== That is the question, how to make that possible
}
}
}
}