12.06.2018, 10:33
Break your loop when you have found what you are looking for:
Your function could be rewritten. Plus, don't use foreach(Player,i) but foreach(new i : Player)
PHP код:
foreach(new i : Gangs)
{
if(i == gangid)
{
found = true;
break;
}
}