Announceing help - 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: Announceing help (
/showthread.php?tid=273687)
Announceing help -
ServerRestart - 02.08.2011
Hi, i want to make a textdraw what announce's things, with a timer ect..
Example
Click the pic to enlarge!
Re: Announceing help -
sleepysnowflake - 02.08.2011
You mean like a textdraw that is runned by a timer ?
Re: Announceing help -
ServerRestart - 02.08.2011
No, were it automaticly advertises messages, like every 5 mins.
Re: Announceing help -
ServerRestart - 02.08.2011
but at the bottom of the screen, like the pic i included.
Re: Announceing help -
Odyssey - 02.08.2011
pawn Код:
#include <a_samp>
new MessageTimer;
new Messages[][] =
{
{"Message Here"},
{"Message Here"},
{"Message Here"},
{"Message Here"},
{"Message Here"},
{"Message Here"}
};
forward SendMessagesToAll();
public SendMessagesToAll()
{
GameTextForAll(Messages[random(sizeof(Messages))], 4000, 0);
return 1;
}
//OnFilterScriptInit
public OnFilterScriptInit()
{
MessageTimer = SetTimer("SendMessagesToAll",60000, 1);
return 1;
}
//OnFilterScriptExit
public OnFilterScriptExit()
{
KillTimer(MessageTimer);
return 1;
}
Give that a go. I just did it quickly
**Edit, I just seen the picture, you might not want this.
Re: Announceing help -
sleepysnowflake - 02.08.2011
And after he advertised that message it dissapeared ?
-
ServerRestart - 02.08.2011
Nope, i'm not intrested in that sorry, im wanting it like the pic. ** And you Berlovan
Re: Announceing help -
Sil3nc3d Gh0st - 02.08.2011
Then you want textdraw's ... ran by timer's. As stated in the first response.
Re: Announceing help -
ServerRestart - 02.08.2011
Yes, textdraw's that announce messages every 5 min, ran by timers. :/ Cmon.. can someone help
Re: Announceing help -
sleepysnowflake - 02.08.2011
pawn Код:
// The top of the script.
new RandomMessages[][] =
{
"Have you seen a hacker? /report [ID] [Reason]",
"Only Noobs Rule break! Are you a noob?",
"Did you know we have forums? Register today!",
"You are playing on MY OWN SERVER.!"
};
new Text:TextRandom; // Same.
forward RandomMessage(); // Up there tho.
SetTimer("RandomMessage",3000,1); // Under OnGameModeInit
// Anywhere.
public RandomMessage()
{
TextDrawSetString(TextRandom, RandomMessages[random(sizeof(RandomMessages))]);
return 1;
}
You just have to change the position and probablly add it a box or something.
Re: Announceing help -
ServerRestart - 02.08.2011
It never worked.
Re: Announceing help -
sleepysnowflake - 02.08.2011
Yeah sorry .. This also goes under OnGameModeInit.
pawn Код:
TextRandom = TextDrawCreate(150.000000, 1.000000,"Sum text.");
TextDrawAlignment(TextRandom,0);
TextDrawBackgroundColor(TextRandom,0x000000ff);
TextDrawFont(TextRandom,2);
TextDrawLetterSize(TextRandom,0.199999,0.899999);
TextDrawColor(TextRandom,0xffffffff);
TextDrawSetOutline(TextRandom,1);
TextDrawSetProportional(TextRandom,1);
TextDrawSetShadow(TextRandom,1);
Re: Announceing help -
ServerRestart - 02.08.2011
Lol... still not working