Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Jane
« on: February 09, 2011, 08:24:14 pm »

Great Scripts as always !
Posted by: Face9000
« on: February 09, 2011, 08:12:49 pm »

Have a populated server and want some messages showing in the middle of the screen at all players?

Well,with this tutorial now u can.

WARNING: THERE ARE NOT NORMAL MESSAGE PASTED IN CHAT,BUT ANNOUNCES WITH YOUR TEXT SHOWING IN THE MIDDLE OF SCREEN.

Let's start by creating a timer of 120000 milliseconds (2 minutes). You can always change it.

Paste it under OnGameModeInit:

Code: [Select]
SetTimer("AutoAnn",120000,1);
Now,let's create the forward and the public function.

Paste the code where u want.

Code: [Select]
forward AutoAnn();
public AutoAnn()
{
    new randANN = random(sizeof(RandomANN));
    GameTextForAll(RandomANN[randANN], 10000, 4);
return 1;
}

Explain:

We've created the forward and the public function.

With:

Code: [Select]
new randANN = random(sizeof(RandomANN));
Server will take a random text (Look under for more info) and shows as announce ingame.

Code: [Select]
  GameTextForAll(RandomANN[randANN], 10000, 4);
Is for show the announce.

Ok,now we got all,we need only to create the auto announces.

Add where you want,this:

Code: [Select]
new RandomANN[][] =
{
    "Announce 1",
    "Announce 2",
   "Announce 3"
};

Remember to DONT PUT THE , AT YOUR LAST ANNOUNCE!

And here we go,simple and easy.