Auto Message - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Auto Message (
/showthread.php?tid=330621)
Auto Message -
Jermi - 01.04.2012
How can i put Auto message System? Got link?
Re: Auto Message -
MrEnd - 01.04.2012
Around top of Script:
Код:
new RandomMSG[][] =
{
"Message 1", //edit
"Message 2", //edit
"Message 3" //edit
};
Код:
public OnGameModeInit()
{
DisableInteriorEnterExits();
SetTimer("SendMSG", 300000, true); //300000 is 5min (60000 X min to find the minutes)
return 1;
}
Around end of Script:
Код:
forward SendMSG();
public SendMSG()
{
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(COLOR_MSGCOLOR, RandomMSG[randMSG]); //Remember to change the color
}
i think that all
Re: Auto Message -
WooTFTW - 01.04.2012

Quote:
Originally Posted by MrEnd
ONE SEC!!! EDITING
FORGOT SOMETHING xD
Around top of Script:
Код:
new RandomMSG[][] =
{
"Message 1",
"Message 1",
"Message 1",
};
Around end of Script:
Код:
forward SendMSG();
public SendMSG()
{
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(COLOR_MSGCOLOR, RandomMSG[randMSG]);
}
i think that all
|
You forgot the timer
Re: Auto Message -
MrEnd - 01.04.2012
haha i saw it :P Fixed it
thats why i wrote
ONE SEC!!! EDITING
FORGOT SOMETHING xD
Re: Auto Message -
Jermi - 02.04.2012
Yes, Thank you But if i need to change the message, is there anything to do? :d
Re: Auto Message -
MrEnd - 02.04.2012
Код:
"Message 1", //edit
"Message 2", //edit
"Message 3" //edit
you can edit that Message 1/2/3 inside " " ofc
But remember, you cant just write
"Message" under there its "Message" now
you gotta have a comma after the message over
like
Код:
"Message",
"Message"
If you see the difference

its just a little difference