29.03.2013, 15:04
Hello,
I have this:
My goal is every once in a while, one of the Houses would become true. How can i set a random one?
I have this:
pawn Код:
new bool:House[4];
new bool:House[4];
House[random(4)] = false;
forward public SelectRandomHouse();
new bool: Houses[4], currentHouse;
public OnGameModeInit()
{
SelectRandomHouse();
SetTimer("SelectRandomHouse", 600000, 1);
return 1;
}
public SelectRandomHouse()
{
Houses[currentHouse] = false;
currentHouse = random(sizeof(Houses));
Houses[currentHouse] = true;
return 1;
}