Server broadcasts.
#1

Hello everyone, I was wondering..I am currently scripting a DM server, and I'd like to know how to make a message, which will be posted automatically like every 10~15 minutes. Like, "Don't forget to visit our forums at ..."
And how is it possible to make multiple messages? Thanks in advance.
Reply
#2

pawn Код:
// Somewhere at your script:
forward RandomMessage(); // Or whatever name you want.

// Under OnGameModeInit:
SetTimer("RandomMessage",120000,1); // Change the timer according to what you prefer.

//Any place you like:
public RandomMessage()
{
    new mrand =random(1); // Change the number according to the number of messages you're going to send
    if(mrand == 1)
    {
    SendClientMessageToAll(0xFFF000AA,"Visit our forums at: put forum here etc");
    }
}
Reply
#3

https://sampwiki.blast.hk/wiki/Random_Messages
Reply
#4

Quote:
Originally Posted by BenJackster
Посмотреть сообщение
pawn Код:
// Somewhere at your script:
forward RandomMessage(); // Or whatever name you want.

// Under OnGameModeInit:
SetTimer("RandomMessage",120000,1); // Change the timer according to what you prefer.

//Any place you like:
public RandomMessage()
{
    new mrand =random(1); // Change the number according to the number of messages you're going to send
    if(mrand == 1)
    {
    SendClientMessageToAll(0xFFF000AA,"Visit our forums at: put forum here etc");
    }
}
Thanks alot!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)