How to add Random Messages
------------------------------------------------
What is a Random Message?
Code:
A random message can be scripted to make a message/sentence that you choose to appear.
What can I use Random Messages for?
Code:
You can use Random Messages for a lot of things. For example, if you have a forum for your server, you can add the URL into a Random Message to get people to register on it.
STEP 1
You are going to need to add (the code bellow) to your script anywhere. "Random Message 1", and 'Random Message 2", and ect.. are what will be showed on your server when we're done. So, if you don't want "Random Message 1" showing up on your server ever x minutes, I'd change it... If you don't know where to put it here's a picture of where I put it: http://prntscr.com/mtpjl
Code:
new RandomMSG[][] =
{
"Random Message 1",
"Random Message 2",
"Random Message 3"
};
STEP 2
After putting that somewhere in your script, we need to add in the timer. A timer will make the message appear on your server ever x minutes. 60000ms = 60 seconds = 1 minute. So, you're going to need to add (the code bellow) to OnGameModeInit. The code of the timer will be shown bellow. If you are having troubles understanding where to put it here's a screenshot where you must put it: http://prntscr.com/mtpyi
Code:
SetTimer("SendMSG", 60000, true);
STEP 3
After adding in the timer in step 2, let's move on to step 3. We must now add in our forwards. Scroll up to the top of your script where your includes, and defines are. Add the code bellow into your script. If you are having trouble understanding where you must put it here's a screenshot where you must put it: http://prntscr.com/mtqde
Code:
forward SendMSG();
STEP 4
After step 3 has been finished, we move on to step 4. We must now add SendMSG. The code will be bellow. You may put this code anywhere in your script. If you are having trouble seeing where to put this look here: http://prntscr.com/mtqw1
Code:
public SendMSG()
{
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(COLOR, RandomMSG[randMSG]); // Replace the "COLOR" with your defined color.
}
--------------------------------------------------------------------------------------------------------
FAQ
Q: Why does "Random Message 1", "Random Message 2", and "Random Message 3" keep coming up on my server?
A: Because in Step 1 you've forgotten to change "Random Message 1", "Random Message 2", and "Random Message 3" to your custom text.

Q: Why do I get an error saying "undefined symbol "COLOR_BLUE""
A: Because you will need to define the color at the "Defines" at the top of the script. You can find Defines for colors here: http://bfxtylez.bf.funpic.de/PawnoColors.htm

DID THIS NOT WORK?
If this is not working please comment saying so. If you want the official tutorial from the SA-MP Wiki go here: http://wiki.sa-mp.com/wiki/Random_Messages