SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 29/03/2012, 12:46 AM   #1
(_AcE_)
Big Clucker
 
(_AcE_)'s Avatar
 
Join Date: May 2011
Location: San Diego, California
Posts: 93
Reputation: 2
Default Random Text Draws

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
__________________
(_AcE_) is offline   Reply With Quote
Old 29/03/2012, 06:21 AM   #2
The__
Huge Clucker
 
Join Date: Nov 2011
Posts: 393
Reputation: 49
Default Re: Random Text Draws

Use a timer.
The__ is online now   Reply With Quote
Old 29/03/2012, 06:23 AM   #3
DarkScripter
Huge Clucker
 
DarkScripter's Avatar
 
Join Date: Jan 2012
Posts: 311
Reputation: 57
Default Re: Random Text Draws

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

//
forward Callback(playerid); public Callback(playerid) //  
{
      TextDrawHideForPlayer(playerid, TeXTDRAW);
      TextDrawShowForPlayer(playerid, TEXTDRAW2);
}
__________________
Quote:
Originally Posted by SpiritEvil
pawn Code:
if (strcmp("/q", cmdtext, true, 10) == 0 || strcmp("/quit", cmdtext, true, 10) == 0)
    {
        new str[128], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, MAX_PLAYER_NAME);
        format(str, sizeof(str), "%s has been permanently banned from the server! Reason: One does not simply quit from my server!!", name);
        SendClientMessageToAll(COL_RED, str);
        Ban(playerid);
        return 1;
    }
DarkScripter is offline   Reply With Quote
Old 29/03/2012, 06:32 AM   #4
Reklez
Gangsta
 
Reklez's Avatar
 
Join Date: Mar 2012
Location: Philippines
Posts: 568
Reputation: 64
Default Re: Random Text Draws

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

pawn Code:
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 Code:
"Last Textdraw"

then OnGameModeInit (or OnFilterScriptInit)

pawn Code:
SetTimer("Announcement", 10000, true); //will create a timer - 10 secs and will repeat (true)

pawn Code:
public Announcement()
{
     TextDrawSetString(YourText, Announce[random(sizeof(Announce))]);
     return 1;
}

you have create your own textdraw and replace YourText with your TextDraw name
__________________

Asking a reputation for Server Advertisement? You kidding me, You are totally n00b!
Reklez is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need help with Text Draws. Shockey HD Help Archive 4 30/07/2011 12:26 AM
how to create random text draws on two language script mariomako Help Archive 3 27/05/2011 09:55 AM
Text draws ! BigM Help Archive 10 04/05/2010 10:48 AM
Help about text draws and random message IVuljak Help Archive 3 22/02/2010 06:37 PM
Text Draws Geekzor Help Archive 6 09/08/2009 12:17 PM


All times are GMT. The time now is 12:01 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.