Участник
Пользователь
- Сообщения
- 147
- Реакции
- 29
hi guys! as most of you probably know random_num() are not getting really random numbers on every call (because its 'too much' repetitive), can anyone help with some pseudo-random num function/code ? *random() is even worse than random_num(), can be seen here: https://github.com/alliedmodders/amxmodx/issues/545#issuecomment-418216005
my idea was, because i want to get random player from all alive players,currently code is:
but im not sure if its convinient..anyone got better solution ? ps: RandomX module is not for linux, so cant work with it
my idea was, because i want to get random player from all alive players,currently code is:
Код:
random_num( 1, alive_players )
//if its called on every round start, results will be like ~10 of 15 the same
//idea:
new rand = random_num( 1, alive_players )
if( rand > 2 )
{
return random_num( 1, ( random_num( 2, rand ) )
}
else
{
return rand
}