SA-MP Forums Archive
How? - 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: How? (/showthread.php?tid=94923)



How? - Bored123 - 01.09.2009

How can I mak a textdraw changing ever 5 sec like "HI world" and in 5 sec "bye World"
Please writ me the cod.
This is the textdraw,
Hi = TextDrawCreate(1.000000,434.000000,"Hi world");
TextDrawAlignment(Hi,0);
TextDrawBackgroundColor(Hi,0x00000099);
TextDrawFont(Hi,1);
TextDrawLetterSize(Hi,0.500000,1.500000);
TextDrawColor(Hi,0xFFFFFFAA);
TextDrawSetOutline(Hi,1);
TextDrawSetProportional(Hi,1);
TextDrawSetShadow(Hi,1);


Re: How? - Bored123 - 01.09.2009

Help ples.


Re: How? - Clavius - 01.09.2009

You have to use a timer , set it for 5 seconds (5000 miliseconds), make it point to a new function you make that looks like this:

pawn Код:
// put this somewhere (like to the top):
forward TextDrawSetStringFunc(Text:text, const string[]);
// bottom:
public TextDrawSetStringFunc(Text:text, const string[])
{
    TextDrawSetString(text, string);
}
You need to use SetTimerEx to set the timer.


Re: How? - Bored123 - 01.09.2009

I dont undarstand it
pls write it exactly..with the code i gave.



Re: How? - Bored123 - 01.09.2009

halp pls pls


Re: How? - Correlli - 01.09.2009

Stop bumping, you got your answer already.


Re: How? - Bored123 - 01.09.2009

Quote:
Originally Posted by Don Correlli
Stop bumping, you got your answer already.
But I don't understand it,so pls write it exactly wit the textdraw I gave.



Re: How? - kevinsoftware - 01.09.2009

Just learn pawn ^^


Re: How? - Zeex - 01.09.2009

Quote:
Originally Posted by player007
You have to use a timer , set it for 5 seconds (5000 miliseconds), make it point to a new function you make that looks like this:

pawn Код:
// put this somewhere (like to the top):
forward TextDrawSetStringFunc(Text:text, const string[]);
// bottom:
public TextDrawSetStringFunc(Text:text, const string[])
{
    TextDrawSetString(text, string);
}
You need to use SetTimerEx to set the timer.
timers don't work with strings


Re: How? - Bored123 - 01.09.2009

Quote:
Originally Posted by ZeeX
Quote:
Originally Posted by player007
You have to use a timer , set it for 5 seconds (5000 miliseconds), make it point to a new function you make that looks like this:

pawn Код:
// put this somewhere (like to the top):
forward TextDrawSetStringFunc(Text:text, const string[]);
// bottom:
public TextDrawSetStringFunc(Text:text, const string[])
{
    TextDrawSetString(text, string);
}
You need to use SetTimerEx to set the timer.
timers don't work with strings
than how to mak?Pls somebody write it how to make it with my textdraw