hello!
there is a problem (or not) with random. sometimes the same player is infected too often per map while others are infected only 1-2 times. is there any way to fix it and make more fair random?
i guess this line responds for the random pick of zombies? or mb not...
Code:
#define _random(%1) random_num(0, %1 - 1)
and there is a stock:
Code:
stock randomly_pick_zombie()
{
static data[4]
data[0] = 0
data[1] = 0
data[2] = 0
data[3] = 0
static index, players[2][32]
for(index = 1; index <= g_maxplayers; index++)
{
if(!is_user_alive(index))
continue
if(g_zombie[index])
{
data[0]++
players[0][data[2]++] = index
}
else
{
data[1]++
players[1][data[3]++] = index
}
}
if(data[0] > 0 && data[1] < 1)
return players[0][_random(data[2])]
return (data[0] < 1 && data[1] > 0) ? players[1][_random(data[3])] : 0
}
players go mad with this...