SA-MP Forums Archive
[FilterScript] Random Message [STRIKE] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Random Message [STRIKE] (/showthread.php?tid=428356)



Random Message [STRIKE] - Strike97 - 05.04.2013

Hello

I have good random message script (paste In New Scrpit)

Code:
#include <a_samp>

#define TIMER       150000
#define COLOR_GOLD 	0xF6C861AA

new rMessageList[][] = {
"[SERVER]Welcome To Awesome Stuntages Server",
"[SERVER]Add To List IP : 37.205.9.140:7788",
"[SERVER]Have Fun !",
"[SERVER]Killing Allowed !",
"[SERVER]Created & Hosted By: Strike_hero."
};
new rCheckList[sizeof(rMessageList)];

forward rMessage();

public rMessage()
{
	new rNumber, Check = 0;
	do{
	    for(new i=0; i<sizeof(rCheckList); i++)
			if(rCheckList[i] != 0)
				Check++;
		if(Check == sizeof(rCheckList))
		    for(new i=0; i<sizeof(rCheckList); i++)
		        rCheckList[i] = 0;
		rNumber = random(sizeof(rMessageList));
	}while(rCheckList[rNumber]);
    SendClientMessageToAll(COLOR_GOLD, rMessageList[rNumber]);
	rCheckList[rNumber] = 1;
}

public OnFilterScriptInit()
{
    SetTimer("rMessage", TIMER, true);
}