[Question]How to make automatic announcements
#1

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"?
Reply
#2

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;
}
Reply
#3

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
Reply
#4

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.
Reply
#5

? 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?
Reply
#6

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
Reply
#7

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
Reply
#8

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)