09.06.2017, 14:45
PHP код:
function bool:haveValue(const sourceArray[], value, limit = sizeof(sourceArray)) {
for (new i = 0; i < limit; i++) {
if (sourceArray[i] === value) return true;
}
return false;
}
for(new x; x < 6; x ++)
{
new value;
do {
value = random(10)
} while(haveValue(AdditionalReset, value, x));
AdditionalReset[x] = value
if(AdditionalReset[x] == Arena[0] || MapPlayer[AdditionalReset[x]][0] <= PlayerOnline[1] <= MapPlayer[AdditionalReset[x]][1]) goto Rand;
}