17.12.2016, 16:07
Use an array, something like:
Note that this example is only for consecutive numbers, you'd have to write your own version if you'd like to use any value.
pawn Код:
new array = {0, 1, 2, 3, 4}, count = sizeof(array), selected[5];
selected[0] = random(count);
array[selected[0]] = array[-- count];
selected[1] = random(count);
array[selected[1]] = array[-- count];
and so on...