08.04.2011, 02:25
pawn Код:
new RandomMSG[][] =
{
"You majesty %s has connected!",
"Welcome king or queen, %s!",
"The master has connected. Say hi to %s."
};
public OnPlayerConnect(playerid)
{
new randMSG = random(sizeof(RandomMSG)); //calculates the size of RandomMSG (which is 3)
GetPlayerName(playerid, pName, sizeof(pName));
format(string,sizeof(string),"%s",pName,playerid);
SendClientMessageToAll(0x33CCFFAA, RandomMSG[randMSG]); // Replace the color with your defined color.
return 1;
}