Auto message - 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)
+--- Thread: Auto message (
/showthread.php?tid=290907)
Auto message -
Azzeto - 17.10.2011
Simple question, how do I make one I'v searched for tutorials so if some one could tell mea simple way to make one
To like make messages like "Join us at teamspeak IP: and The server owner is blahblah etc
Re: Auto message -
Stigg - 17.10.2011
https://sampwiki.blast.hk/wiki/SetTimer
Should help you get started.
Or these tutorials:
http://forum.sa-mp.com/showthread.ph...t=auto+message
http://forum.sa-mp.com/showthread.ph...t=auto+message
Re: Auto message -
Azzeto - 17.10.2011
Wow, I know about SetTimer, I just dont know how I would do the whole automated messages.. Could you post an example of an automated message instead of a link to SetTimer? thanks.
Re: Auto message -
Stigg - 17.10.2011
Quote:
Originally Posted by Azzeto
Wow, I know about SetTimer, I just dont know how I would do the whole automated messages.. Could you post an example of an automated message instead of a link to SetTimer? thanks.
|
Check my first post.
Re: Auto message -
DaRkAnGeL[NBK] - 17.10.2011
hey,
firstly you will need to put this somewhere in your script:
pawn Код:
new RandomMSG[][] =
{
"message 1",
"message 2",
"message 3",
"message 4"
};
of course change "message 1 -5" to what you want also you can have as many of these as you like.
okay next put this i OnGameModeInit()
pawn Код:
SetTimer("SendMSG", 300000, true);
change the milliseconds as you wish
then you need this also some where in your script:
pawn Код:
forward SendMSG();
public SendMSG()
{
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(COLOR_RANDOM, RandomMSG[randMSG]);
return 1;
}
hope this help
EDIT didn't see that Stigg had replied also read Stiggs post below
Re: Auto message -
Stigg - 17.10.2011
Your code^^
pawn Код:
new RandomMSG[][] =
{
"message 1",
"message 2",
"message 3,
"message 4"
};
Should be:
pawn Код:
new RandomMSG[][] =
{
"message 1",
"message 2",
"message 3",
"message 4"
};
Just a heads up.