Advertisement Queue [+REP]
#1

Hey,
I've been thinking about adding an advertisement queue system to my server. However, I'm having a hard time in figuring out how to script it. Would love it if you gave me ideas.
Reply
#2

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

Rep me if i helped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)