How Can i put random messages
#1

i want a random mesage to appear every 10 mins.

how can i do this with

Код:
SendClientMessage(playerid, COLOR, "Text");
Reply
#2

https://sampwiki.blast.hk/wiki/SetTimer
Reply
#3

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

This dosent work
Reply
#5

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

Here try this:
https://sampwiki.blast.hk/wiki/Random_Messages
Reply
#7

Quote:
Originally Posted by Boozmang
Thanks, this Worked !
Reply
#8

Quote:
Originally Posted by [SU
Chris ]
Quote:
Originally Posted by Boozmang
Thanks, this Worked !
That's exactly what SAWC™ said.
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)