Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: MatheuS on September 21, 2013, 04:28:14 am

Title: Auto Message's System By Me
Post by: MatheuS on September 21, 2013, 04:28:14 am
          Auto Messages System


New's

[pawn]new gstring[128];
new Color[] = {
   0x20B2AAAA,
   0xFFFFFFAA,
   0x33AA33AA,
   0xE0FFFFAA,
   0x934FF6F6,
   0xF4005BF6,
   0xF68E00F6,
    0x00E7C6F6,
    0x5EB7E3F6,
    0xCD6CF6F6,
    0x685000F6
};
new Messages[][128] = {
   "Your Message 1",
        "Your Message 2",
   "Welcome To The Server" // exemple
};[/pawn]

Public's

[pawn]forward SendMessages();
public SendMessages()
{
   new random1 = random(sizeof(Messages));
   new random2 = random(sizeof(Color));
   format(gstring, sizeof(gstring), "%s", Messages[random1]);
   SendClientMessageToAll(Color[random2],gstring);
   return 1;
}[/pawn]

GameModeInit

 [pawn]SetTimer("SendMessages", 160000, 1);[/pawn]

========== By Me ==========

sorry for my bad english...
Title: Re: Auto Message's System By Me
Post by: sseebbyy on September 22, 2013, 02:19:02 pm
Looks pretty decent for me :)
I like your idea about using random colors.

By the way, the Pawn BBCode still sucks as I see...
Quote
Messages[][128] =
Title: Re: Auto Message's System By Me
Post by: MatheuS on September 25, 2013, 05:37:27 pm
Change s[] to []

 ;D