SA-MP Forums Archive
TextDraw collide !!!! pleaseeee help please !! - 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: TextDraw collide !!!! pleaseeee help please !! (/showthread.php?tid=263644)



TextDraw collide !!!! pleaseeee help please !! - tal_peretz - 22.06.2011

I try to explain you the problam -

If I create Text draws in OnPlayerConnect -

PHP код:
    Check1[playerid] = TextDrawCreate(384.000000145.000000"Welcom To The Server");
    
TextDrawAlignment(Check1[playerid], 2);
    
TextDrawBackgroundColor(Check1[playerid], -1);
    
TextDrawFont(Check1[playerid], 2);
    
TextDrawLetterSize(Check1[playerid], 0.8000004.000000);
    
TextDrawColor(Check1[playerid], 255);
    
TextDrawSetOutline(Check1[playerid], 1);
    
TextDrawSetProportional(Check1[playerid], 1); 
And i destroy Check2[playerid], and then create this -

PHP код:
    Check2[playerid] = TextDrawCreate(288420"checking1");
    
TextDrawAlignment(Check2[playerid], 2);
    
TextDrawFont(Check2[playerid], 1);
    
TextDrawLetterSize(Check2[playerid], 25.025.0);
    
TextDrawColor(Check2[playerid], black);
    
TextDrawSetProportional(Check2[playerid], 1);
    
TextDrawUseBox(Check2[playerid], 1);
    
TextDrawBackgroundColor(Check2[playerid],black);
    
TextDrawBoxColor(Check2[playerid],black); 
and i do -

PHP код:
TextDrawHideForPlayer(playerid,Check1[playerid]); 
it's like i do -

PHP код:
TextDrawHideForPlayer(playerid,Check2[playerid]); 
and textdraw that i don't want disappear.


What can I do ? How can I do that the text draw not get the ID of each other ??

Please I beg you try to help, I opened about it alot of threads !



Re: TextDraw collide !!!! pleaseeee help please !! - tal_peretz - 23.06.2011

please help


Re: TextDraw collide !!!! pleaseeee help please !! - serman - 23.06.2011

i didnt understand your problem

tell me where you want to destroy Textdraw


Re: TextDraw collide !!!! pleaseeee help please !! - shitbird - 23.06.2011

pawn Код:
for OnPlayerSpawn(playerid):
TextDrawHideForPlayer(); // Let's hide the first one.
TextDrawShowForPlayer(); // Show the last one.



Re: TextDraw collide !!!! pleaseeee help please !! - tal_peretz - 23.06.2011

The id of the textdraw replace each other... because I remove one, create other, and still use the first one.


Re: TextDraw collide !!!! pleaseeee help please !! - =WoR=Varth - 23.06.2011

I also have experienced the same thing.
Then I just destroy them instead hide them. Try that.


Re: TextDraw collide !!!! pleaseeee help please !! - tal_peretz - 23.06.2011

Are you sure? I think it's happn because I destroy instead to hide.......

So are you suggest me to use only with destroy and when i want it again to create the textdraw again? nice idea !


Re: TextDraw collide !!!! pleaseeee help please !! - =WoR=Varth - 23.06.2011

Quote:
Originally Posted by tal_peretz
Посмотреть сообщение
Are you sure? I think it's happn because I destroy instead to hide.......

So are you suggest me to use only with destroy and when i want it again to create the textdraw again? nice idea !
If you're not using them, destroy them.
Then create them again if you're going to use them.
Just like my speedo and fuel. If I hide them they collide each other, but if I destroy them, they work fine.


Re: TextDraw collide !!!! pleaseeee help please !! - tal_peretz - 23.06.2011

I have speedo with Bar and if I always destroy and create the TextDraw it's not could make lags or crashes for player?


Re: TextDraw collide !!!! pleaseeee help please !! - [TS]Ricky - 23.06.2011

OnPlayerConnect(playerid)

Код:
name of texdraw(definitions) = TextDrawCreate(518.000000,5.000000,"Server");
 * * * *TextDrawAlignment(Server,1); //alongment
	TextDrawBackgroundColor(Server,0x000000ff); //backdround color
	TextDrawFont(Server,2); //font
	TextDrawLetterSize(stadapiseutextdrawu,0.577777, 1.777777);
	TextDrawColor(Server,0xffffffff); // color
	TextDrawSetProportional(Server,1);
just change with your cors and id fonts...etc