Hello!
I'm making plugin where I need to make randomizer that selects random round, but I don't want to select round that already has been in the current map. The problem is, that I can't think of randomizer that will not repeat numbers that already has been. I need randomizer that selects numbers without duplication (no repeat).
Best that I could think was this -
PHP Code:
new RandomNumber;
RandomNumber= GetRandomInt(0, 25);
if (LastRandomNumber!= RandomNumber) {
if (KvJumpToKey(DB, RandomNumber), false)) {
//code
}
}
LastWeaponNumber = Random;
but this code still repeats numbers, it just doesn't repeat last number.
btw, I read somewhere that the function GetRandomInt is old and buggy, that I don't need to use it. Is it true?