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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Text Draws (
/showthread.php?tid=90560)
Text Draws -
Geekzor - 08.08.2009
ok i get nice Program / script for making Text Draws

but when i script them i have problem ... all work fine no errors or warnings but when i connect to the server my textdraw show for less than 1 second and deasapear so fast ... -.- i wanna this textdraw when player connect for 5 sec or somewhere there ... how i can make that ?
here is my script:
// Top Of My Script
Код:
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
Than OnGameModeInit
Код:
Textdraw0 = TextDrawCreate(291.000000,31.000000,"LOL");
Textdraw1 = TextDrawCreate(202.000000,40.000000,"WELCOME!");
Textdraw2 = TextDrawCreate(131.000000,61.000000,"Revolution Server (0.2X)");
TextDrawUseBox(Textdraw0,1);
TextDrawBoxColor(Textdraw0,0x000000ff);
TextDrawTextSize(Textdraw0,0.000000,477.000000);
TextDrawAlignment(Textdraw0,2);
TextDrawAlignment(Textdraw1,0);
TextDrawAlignment(Textdraw2,0);
TextDrawBackgroundColor(Textdraw0,0x000000ff);
TextDrawBackgroundColor(Textdraw1,0x0000ffff);
TextDrawBackgroundColor(Textdraw2,0x0000ffff);
TextDrawFont(Textdraw0,3);
TextDrawLetterSize(Textdraw0,1.000000,47.000000);
TextDrawFont(Textdraw1,3);
TextDrawLetterSize(Textdraw1,1.100000,1.000000);
TextDrawFont(Textdraw2,3);
TextDrawLetterSize(Textdraw2,0.699999,2.000000);
TextDrawColor(Textdraw0,0x000000ff);
TextDrawColor(Textdraw1,0xffffffff);
TextDrawColor(Textdraw2,0xffffffff);
TextDrawSetOutline(Textdraw0,1);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetOutline(Textdraw2,1);
TextDrawSetProportional(Textdraw0,1);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetProportional(Textdraw2,1);
TextDrawSetShadow(Textdraw0,1);
TextDrawSetShadow(Textdraw1,1);
TextDrawSetShadow(Textdraw2,1);
and than i try under OnPlayerConnect With This:
Код:
TextDrawShowForPlayer(playerid,Text:Textdraw0);
TextDrawShowForPlayer(playerid,Text:Textdraw1);
TextDrawShowForPlayer(playerid,Text:Textdraw2);
TextDrawDestroy(Textdraw0);
TextDrawDestroy(Textdraw1);
TextDrawDestroy(Textdraw2);
what is the problem ? anyone can help please ?
ty for any help
now i go sleep
Re: Text Draws -
paytas - 08.08.2009
You destroy them so they disappear -.-
Re: Text Draws -
ev0lution - 08.08.2009
OnPlayerConnect:
Код:
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
Don't know why you destroyed them after, then they would disappear right after they were shown.
Re: Text Draws -
Geekzor - 08.08.2009
yeah but if i make this they wont disapear lol they are all time on my screen ...or mybe i am wrong i will check this topic tomorow now i really must go ...
ty for help
Re: Text Draws -
Jefff - 08.08.2009
connect
Код:
TextDrawShowForPlayer(playerid,Text:Textdraw0);
TextDrawShowForPlayer(playerid,Text:Textdraw1);
TextDrawShowForPlayer(playerid,Text:Textdraw2);
SetTimerEx("HideTD", yourTime, false, "d", playerid);
somewhere
Код:
forward HideTD(playerid);
public HideTD(playerid){
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
return 1;
}
Re: Text Draws -
Sergei - 08.08.2009
Make them hide on 'OnPlayerRequestSpawn' for example.
Re: Text Draws -
Geekzor - 09.08.2009
ty folks