07.04.2012, 08:18
(
Last edited by Rob_Maate; 02/12/2015 at 01:56 AM.
)
Set a recurring timer.
https://sampwiki.blast.hk/wiki/SetTimerEx
Inside your function, have a list of random messages.
Here's an example script (untested):
https://sampwiki.blast.hk/wiki/SetTimerEx
Inside your function, have a list of random messages.
Here's an example script (untested):
pawn Code:
new RandomMessages[5][128];
new MsgIDX;
forward DisplayRandomMessage();
public OnGameModeInit()
{
SetTimer("DisplayRandomMessage", 60000, 1);
RandomMessages[0] = "Add to favorites!";
RandomMessages[1] = "sdf";
RandomMessages[2] = "sd";
RandomMessages[3] = "fdsf";
RandomMessages[4] = "sdfdsf";
MsgIDX = 0;
return 1;
}
public DisplayRandomMessage()
{
SendClientMessageToAll(0xFFFF00FF, RandomMessages[MsgIDX]);
MsgIDX++;
if(MsgIDX >= 5) MsgIDX = 0;
return 1;
}