How to create a random text message that appears every 30 min? - 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 to create a random text message that appears every 30 min? (
/showthread.php?tid=188703)
How to create a random text message that appears every 30 min? -
Sundiz - 08.11.2010
Hello.
I have been searching around and couldn't find anything. Anyone know a code for like having a text message to come up on the server every 30min like "Need help use /helpme" I want that to come up every 30 min anyone willing to help me?
Re: How to create a random text message that appears every 30 min? -
Alex_Valde - 08.11.2010
I think you haven't searched enough!
Here is a
link.
Re: How to create a random text message that appears every 30 min? -
Cypress - 08.11.2010
pawn Код:
//Top of your script
new infotimer;
new InfoMessage;
forward Information();
//Put this under OnGameModeInit
infotimer = SetTimer("Information", 1800000, true);
//Put this under OnGameModeExit
KillTimer(infotimer);
//Put this somewhere in your script
public Information()
{
switch(InfoMessage){
case 0:
{
SendClientMessageToAll(color, "Saw cheater type /report id reason ");
InfoMessage = 1;
}
case 1:
{
SendClientMessageToAll(color, "");
InfoMessage = 2;
}
case 2:
{
SendClientMessageToAll(color, "");
InfoMessage = 3;
}
case 3:
{
SendClientMessageToAll(color, "");
InfoMessage = 4;
}
case 4:
{
SendClientMessageToAll(color, "");
InfoMessage = 5;
}
case 5:
{
SendClientMessageToAll(your color, "");
InfoMessage = 6;
}
case 6:
{
SendClientMessageToAll(your color, "");
InfoMessage = 7;
}
}
return 1;
}
Next time use search. I'm sure there are tons of this scripts.
Re: How to create a random text message that appears every 30 min? -
TheXIII - 08.11.2010
Quote:
Originally Posted by Cypress
pawn Код:
//Top of your script new infotimer; new InfoMessage;
forward Information();
//Put this under OnGameModeInit infotimer = SetTimer("Information", 300000, true);
//Put this under OnGameModeExit KillTimer(infotimer);
//Put this somewhere in your script public Information() { switch(InfoMessage){ case 0: { SendClientMessageToAll(color, "Saw cheater type /report id reason "); InfoMessage = 1; } case 1: { SendClientMessageToAll(color, ""); InfoMessage = 2; } case 2: { SendClientMessageToAll(color, ""); InfoMessage = 3; } case 3: { SendClientMessageToAll(color, ""); InfoMessage = 4; } case 4: { SendClientMessageToAll(color, ""); InfoMessage = 5; } case 5: { SendClientMessageToAll(your color, ""); InfoMessage = 6; } case 6: { SendClientMessageToAll(your color, ""); InfoMessage = 7; }
} return 1; }
Next time use search. I'm sure there are tons of this scripts.
|
This won't really work as supposed, as there is no 7th InfoMessage, also it is not random.
Re: How to create a random text message that appears every 30 min? -
Hiddos - 08.11.2010
If you want a working and easy-to-use filterscript, try this:
https://sampforum.blast.hk/showthread.php?tid=186569
If you'd rather make your own code (What I'd support myself), I hope this helps you:
https://sampforum.blast.hk/showthread.php?tid=185649
Re: How to create a random text message that appears every 30 min? -
Cypress - 08.11.2010
Quote:
Originally Posted by TheXIII
This won't really work as supposed, as there is no 7th InfoMessage, also it is not random.
|
Did you tried it before saying anything? It works fine for me.
Re: How to create a random text message that appears every 30 min? -
Sundiz - 08.11.2010
Thanks guys
I will search a bit more next time!