25.01.2017, 21:08
What's the best random message code.
Timer + Don't recall the same message
Timer + Don't recall the same message
forward SendMSG(); new RandomMSG[][] = { "Random Message 1", "Random Message 2", "Random Message 3" }; public SendMSG() { new randMSG = random(sizeof(RandomMSG)); SendClientMessageToAll(-1, RandomMSG[randMSG]); }
public OnGameModeInit() { SetTimer("SendMSG", 60000, true); // whats the right timer? (So it won't call too fast) }
Do you really want a random message (expect the current one) or do you want to show all messages in random order?
In the first case that could happen Random Message 1 Random Message 2 Random Message 1 Random Message 2 Random Message 1 Random Message 3 Or do you want to show all messages in random order and than repeat ? Random Message 1 Random Message 3 Random Message 2 Random Message 3 Random Message 1 Random Message 2 |