SA-MP Forums Archive
Random Text Draws - 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: Random Text Draws (/showthread.php?tid=329517)



Random Text Draws - (_AcE_) - 29.03.2012

How do I make a textdraw every 10 seconds change to saying something else?

Like I want it to say:

Welcome to our server (then 10 seconds later it changes to) You are playing LVDM Mode


Re: Random Text Draws - The__ - 29.03.2012

Use a timer.


Re: Random Text Draws - DarkScripter - 29.03.2012

pawn Код:
SetTimerEx("Callback", 1000 * 10, false, "i", playerid); // TIMER

//
forward Callback(playerid); public Callback(playerid) //  
{
      TextDrawHideForPlayer(playerid, TeXTDRAW);
      TextDrawShowForPlayer(playerid, TEXTDRAW2);
}



Re: Random Text Draws - Reklez - 29.03.2012

You don't need to use ^ above post you could just do something like

pawn Код:
new Announce[][] = {
     "Supra release today!",
     "Scripter Hiring today!",
     //"Rock time!",
     "Last Textdraw"
};
keep in mind that if you gonna add a message for textdraw there is always , at the end. for the last one there will be no ,

just like this

pawn Код:
"Last Textdraw"
then OnGameModeInit (or OnFilterScriptInit)

pawn Код:
SetTimer("Announcement", 10000, true); //will create a timer - 10 secs and will repeat (true)
pawn Код:
public Announcement()
{
     TextDrawSetString(YourText, Announce[random(sizeof(Announce))]);
     return 1;
}
you have create your own textdraw and replace YourText with your TextDraw name