Two Questions - 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: Two Questions (
/showthread.php?tid=229314)
Two Questions -
captainjohn - 21.02.2011
Hello I have these codes here.
pawn Код:
SetTimer("SendRandomMsgToAll", 1200 * 1000, 1);
This is placed under
pawn Код:
public OnFilterScriptInit()
{
First question is, the 1200, shown next to "SendRandomMsgToAll" , does that correspond to when each message shows up, in that case it is every 20minutes one random message will show up (random messages displayed below) (1200 = 1200 seconds = 20mins)
pawn Код:
forward SendRandomMsgToAll();
public SendRandomMsgToAll()
{
switch(random(4))
{
case 0: SendClientMessageToAll(0x00ff00ff, "Please donate to keep the server running.");
case 1: SendClientMessageToAll(0x00ff00ff, "Version 7.0.0");
case 2: SendClientMessageToAll(0x00ff00ff, "Want to go afk? Type /afk");
case 3: SendClientMessageToAll(0x00ff00ff, "Type /anns to view the current global announcements.");
}
}
Next question is, these messages appear in the chatbox at the top left.
How do I make it so they appear at the botton of the screen, instead of in the chatbox?
Like this (I made this picture in paint).
Thanks in advance.
Re: Two Questions -
JaTochNietDan - 21.02.2011
You need to use Textdraws.
https://sampwiki.blast.hk/wiki/Scripting...ions#Textdraws
You should also search for tutorials, I'm sure there are a few on making Textdraws.
Re: Two Questions -
jameskmonger - 21.02.2011
Use textdraws.
Re: Two Questions -
captainjohn - 21.02.2011
Thankyou both of you.
Anybody answer my first question, please?
Re: Two Questions -
JaTochNietDan - 21.02.2011
Yes that does correspond to how often it calls the function. It's measured in miliseconds, hence being multiplied by 1000 to get it into seconds format.
Re: Two Questions -
captainjohn - 21.02.2011
Thanks.