16.04.2016, 01:30
use the "SetTimerEx" function, you can make it with a very easy method:
Rep me if i helped
PHP код:
// OnGameModeInit... or wherever you want
SetTimerEx("Advertisement", 10000, false, "d", 0); // We will start at messageID 0
// Top on your script
forward Advertisement(messageID);
public Advertisement(messageID)
{
switch(messageID)
{
case 0: SendClientMessageToAll(-1, "My Advertisement!!");
case 1: ...............
}
// Call the timer again, but with another ID, you can do it random
SetTimerEx("Advertisement", 50000, false, "d", messageID + 1); // Call the function again, after 50 secs, with another ID
}