19.01.2012, 04:24
Hmm..Can make it even simpler by doing this
pawn Code:
#define MINUTES 3
new RandMessages[][] = {
"Somethin",
"Somethin2",
"Somethin3"
};
new RandTimer; //in case we want to kill it later
forward RandomMessages();
pawn Code:
public OnGameModeInit()
{
RandTimer = SetTimer("RandomMessages", 60000*MINUTES, true);
}
public OnGameModeExit()
{
KillTimer(RandTimer);
}
public RandomMessages()
{
new Rand = random(sizeof(RandMessages));
SendClientMessageToAll(0x00CCCCAA, RandMessages[Rand]);
}