How Can i put random messages - 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: How Can i put random messages (
/showthread.php?tid=125267)
How Can i put random messages -
[SU]CHRiS - 03.02.2010
i want a random mesage to appear every 10 mins.
how can i do this with
Код:
SendClientMessage(playerid, COLOR, "Text");
Re: How Can i put random messages -
lolumadd - 03.02.2010
https://sampwiki.blast.hk/wiki/SetTimer
Re: How Can i put random messages -
Miguel - 03.02.2010
pawn Код:
new
RD[][] =
{
"Type /commands to see me naked",
"This is spartaaa!",
"Type /rules to break them all!"
};
// these are the messages
pawn Код:
public OnGameModeInit()
{
SetTimer("RandomMessage", 1000 * 60 * 10, true); // this is gonna call the message function every 10 mins
return 1;
}
pawn Код:
forward RandomMessage();
public RandomMessage() // this is called 10 mins (random message from RD)
{
new
rand = random(sizeof(RD));
SendClientMessageToAll(COLOR, RD[rand]);
return 1;
}
Here's a basic example.
https://sampwiki.blast.hk/wiki/Random_Messages
Re: How Can i put random messages -
[SU]CHRiS - 03.02.2010
This dosent work
Re: How Can i put random messages -
Joe Staff - 03.02.2010
Quote:
Originally Posted by [SU
Chris ]
This dosent work
|
Yes it does, just learn to script a little bit and you'll figure out how to place that into your gamemode or filterscript.
Also there are plenty of Filterscripts for this exact feature.
Here's one I made but never released:
http://forum.sa-mp.com/index.php?top...7595#msg847595
Re: How Can i put random messages -
evanx10 - 03.02.2010
Here try this:
https://sampwiki.blast.hk/wiki/Random_Messages
Re: How Can i put random messages -
[SU]CHRiS - 03.02.2010
Quote:
Originally Posted by Boozmang
|
Thanks, this Worked !
Re: How Can i put random messages -
Joe Staff - 03.02.2010
Quote:
Originally Posted by [SU
Chris ]
Quote:
Originally Posted by Boozmang
|
Thanks, this Worked !
|
That's exactly what SAWC™ said.
Re: How Can i put random messages -
evanx10 - 03.02.2010
Quote:
Originally Posted by Joe Staff
Quote:
Originally Posted by [SU
Chris ]
Quote:
Originally Posted by Boozmang
|
Thanks, this Worked !
|
That's exactly what SAWC™ said.
|
Didnt see that O.o
Sorry for reposting it...
Quote:
Originally Posted by [SU
Chris ]
Quote:
Originally Posted by Boozmang
|
Thanks, this Worked !
|
Glad i could help