SA-MP Forums Archive
[Question]How to make automatic announcements - 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: [Question]How to make automatic announcements (/showthread.php?tid=135605)



[Question]How to make automatic announcements - [AXS]Bryce - 21.03.2010

Hey I was just wondering if anyone had any idea how to make automatic announcements come up in the chatbox every now and then for example, "Visit our website at www.blahblahblah.com"?


Re: [Question]How to make automatic announcements - FujiNNN - 21.03.2010

pawn Code:
forward AutoMsg();
OnGameModeInt
pawn Code:
SetTimer("AutoMsg",900000,1); // Auto message in every XX minutes
pawn Code:
public AutoMsg()
{
    SendClientMessageToAll(YOURCOLOR, "EPIC FAIL");
    return 1;
}



Re: [Question]How to make automatic announcements - [AXS]Bryce - 21.03.2010

if i add lots of these announcments and i set it to 1 minute then will all of them pop up in the chat box at the same time? coz if it does then that would be kinda crap.. lol


Re: [Question]How to make automatic announcements - Snoooopy - 21.03.2010

Quote:
Originally Posted by [AXS
Bryce ]
if i add lots of these announcments and i set it to 1 minute then will all of them pop up in the chat box at the same time? coz if it does then that would be kinda crap.. lol
Probably yes
Make fullscreen annoucements - When there is one annouced thing and second is going to be , first one dissapears.


Re: [Question]How to make automatic announcements - [AXS]Bryce - 21.03.2010

? i dont get what your saying...

i need these announcments to come in chatbox everyone 1 minute but i want them to keep cycling through and not coming up all at once. is their a way to do this?


Re: [Question]How to make automatic announcements - Snoooopy - 21.03.2010

Hmmmm... Idk then
i will look


But try dont make all annoucements at same time like
'Annoucement 1 repeats every X min
'Annoucement 2 repeats every Y min


Re: [Question]How to make automatic announcements - [AXS]Bryce - 21.03.2010

ahh i see now! so its all a matter of timing! ill give it a shot

thanks snoooopy, thanks FujiNNN


ok ill have a look and see what happens


Re: [Question]How to make automatic announcements - [03]Garsino - 21.03.2010

pawn Code:
#define Announce_Time 2 // In minutes
#define Number_Of_Announcements 37 // Change this to the number of announcements
new Announcements[Number_Of_Announcements][0] = {
{"Announcement 1"},
{"Announcement 2"},
{"Announcement 3 (Notice no ',' after the '}'! "}
};

public OnGameModeInit()
{
    SetTimerEx("Announce", Announce_Time*60000, 1, "i");
    return 1;
}
forward Announce();
public Announce()
{
    new RandAn = random(sizeof(Announcements));
    SendClientMessageToAll(COLOUR, Announcements[RandAn]);
    return 1;
}