Need help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help (
/showthread.php?tid=80028)
Need help -
Futurezx - 01.06.2009
I need a script when a message show up now and then like: Check out or website: (website shows)
and after like 3 minutes it shows : Check out our new DM area with /(tpname)
Re: Need help -
Ignas1337 - 01.06.2009
first : make an array with these messages. Like :
pawn Код:
#include <a_samp>
new NewsArray[2] = { // instead of 2 input the number of total messages possible
"NewsMessage1",
"NewsMessage2"
};
new News_Timer = 0;
/*OnGameModeInit*/
SetTimer("TimeTest_News", 1000, 1);
TimeTest_News()
{
News_Timer++;
if(News_Timer > 179)
{
new rand = random(sizeof(NewsArray));
Announce_News(rand);
News_Timer = 0;
}
}
Announce_News(id)
{
SendClientMessageToAll(0xFFFFFFFF, "* ANNOUNCEMENT *");
SendClientMessageToAll(0xFFFFFFFF, NewsArray[id]);
}