28.09.2016, 12:34
You could do it this:
PHP код:
#define RANDOM_MINUTES 5 // 5 minutes for example
#DEFINE NUMBER_OF_MESSAGES 2 // 2 messages for example
SetTimer("RandomMessages", 60000 * RANDOM_MINUTES, true); // on gamemodeinit
Forward RandomMessages(); // where ever you got your functions
Public RandomMessages()
{
new message = random (NUMBER_OF_MESSAGES);
Switch(message)
{
Case 0:
{
SendClientMessageToAll(-1, "This is random message 1");
}
Case 1:
{
SendClientMessageToAll(-1, "This is random message 2");
}
}
return 1;
}