11.05.2015, 09:42
Umm...I was working on one of my scripts and I have to leave now, so, I was working on a problem where I want the foreach loop to go only once in one of the cases inside the switch. For example,
So, yeah, I might as well figure it out when I come back but until then if someone can help it will be appreciated.
pawn Код:
foreach(new i : Player)
{
switch(whatever_var)
{
case 1:
{
//does whatever
//happens fully, like loops normally as foreach does.
}
case 2:
{
//does whatever
//occurs once, foreach does not loop through this case more than once <== That is the question, how to make that possible
}
}
}