SA-MP Forums Archive
[Help?] Create Circling textdraw in one loop. [Not Solved] - 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: [Help?] Create Circling textdraw in one loop. [Not Solved] (/showthread.php?tid=128393)



[Help?] Create Circling textdraw in one loop. [Not Solved] - RyDeR` - 17.02.2010

Hi; I try to create a circle with one textdraw (0) like this:


This is almost a circle lol, it's made with paint i'll make this in pawn with textdraws.. But it fails

This is my textdraw:
Код:
Textdraw0 = TextDrawCreate(509.000000, 344.000000, "0");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
This is what I tried:

Код:
	new
		Float:v;

	while(v < 360.0)
 	{
		Textdraw0 = TextDrawCreate(5 * (509.0 + floatcos(v, degrees)), 5* (344.0 + floatsin(v, degrees)), "0");
		v += (360.0 / (5 * 1.09));
	}
	
	TextDrawBackgroundColor(Textdraw0, 255);
	TextDrawFont(Textdraw0, 1);
	TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
	TextDrawColor(Textdraw0, -1);
	TextDrawSetOutline(Textdraw0, 0);
	TextDrawSetProportional(Textdraw0, 1);
	TextDrawSetShadow(Textdraw0, 1);
But I still only see one textdraw.

Anyone can make a new one or correct the one I made?


Regards,



Re: [Help?] Create Circling textdraw in one loop. - aircombat - 17.02.2010

joining the question
________
Interracial video


Re: [Help?] Create Circling textdraw in one loop. - Joe Staff - 17.02.2010

You're creating a bunch of textdraws with the same variable. You have to use different variables to show it properly (in that method)

Text:Circle[50];
Circle[0]=TextDrawCreate(...);
Circle[1]=TextDrawCreate(...);


This wouldn't have something to do with a speedometer or a clock would it?


Re: [Help?] Create Circling textdraw in one loop. - RyDeR` - 17.02.2010

Quote:
Originally Posted by Joe Staff
This wouldn't have something to do with a speedometer or a clock would it?
Kinda.
_________________________________________________
First of all thanks, I tried but then I have to create each time a new textdraw and put it in the right coordinates. Can you edit my example or make with the textdraw above?

Regards,


Re: [Help?] Create Circling textdraw in one loop. [Not Solved - Go In!!!] - RyDeR` - 18.02.2010

12 hours past; >>

* Bump *


Re: [Help?] Create Circling textdraw in one loop. [Not Solved - Go In!!!] - RyDeR` - 19.02.2010

12+ hours past; >>

* Bump *

Ah comon :/


Re: [Help?] Create Circling textdraw in one loop. [Not Solved] - RyDeR` - 20.02.2010

12+ hours past; >>

* Bump *

Third time lucky time I hope now :/


Re: [Help?] Create Circling textdraw in one loop. [Not Solved] - iron_war_lord - 20.02.2010

Just a quickie code:
You missed: Arrays, and the show in what you tried
Код:
new
		Float:v;

	for(new i; i<20; i++)
 	{
 	  if(v <= 360)
 	  {
			Text:Textdraw[i] = TextDrawCreate(5 * (509.0 + floatcos(v, degrees)), 5* (344.0 + floatsin(v, degrees)), "0");
			TextDrawBackgroundColor(Textdraw[i], 255);
			TextDrawFont(Textdraw[i], 1);
			TextDrawLetterSize(Textdraw[i], 0.500000, 1.000000);
			TextDrawColor(Textdraw[i], -1);
			TextDrawSetOutline(Textdraw[i], 0);
			TextDrawSetProportional(Textdraw[i], 1);
			TextDrawSetShadow(Textdraw[i], 1);
			v += (360.0 / (5 * 1.09));
		}
	}
	// Show them
	// Under a command or callback that must have playerid in it's params
	for(new i; i<10; i++)
	{
		TextDrawShowForPlayer(playerid, Textdraw[i]);
	}



Re: [Help?] Create Circling textdraw in one loop. [Not Solved] - RyDeR` - 20.02.2010

First thanks but it don't work, can't see anything. My example doesn't work so if you edit it will surely not work ;/


Re: [Help?] Create Circling textdraw in one loop. [Not Solved] - iron_war_lord - 20.02.2010

Are you even calling TextDrawShowForPlayer??


Re: [Help?] Create Circling textdraw in one loop. [Not Solved] - RyDeR` - 20.02.2010

Yep.


Re: [Help?] Create Circling textdraw in one loop. [Not Solved] - RyDeR` - 21.02.2010

+12 hours past; Bump.


Re: [Help?] Create Circling textdraw in one loop. [Not Solved] - RyDeR` - 22.02.2010

24 hours past bump.

4th time bump xD



Re: [Help?] Create Circling textdraw in one loop. [Not Solved] - Razvann - 22.02.2010

Someone?

I really need this, too.


Re: [Help?] Create Circling textdraw in one loop. [Not Solved] - RyDeR` - 22.02.2010

Yeah me too I'm searching 5 days


Re: [Help?] Create Circling textdraw in one loop. [Not Solved] - RyDeR` - 23.02.2010

12 hour's past. Bump!!!!


Seriously :/