[Help?] Create Circling textdraw in one loop. [Not Solved]
#1

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,
Reply
#2

joining the question
________
Interracial video
Reply
#3

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?
Reply
#4

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,
Reply
#5

12 hours past; >>

* Bump *
Reply
#6

12+ hours past; >>

* Bump *

Ah comon :/
Reply
#7

12+ hours past; >>

* Bump *

Third time lucky time I hope now :/
Reply
#8

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]);
	}
Reply
#9

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 ;/
Reply
#10

Are you even calling TextDrawShowForPlayer??
Reply
#11

Yep.
Reply
#12

+12 hours past; Bump.
Reply
#13

24 hours past bump.

4th time bump xD
Reply
#14

Someone?

I really need this, too.
Reply
#15

Yeah me too I'm searching 5 days
Reply
#16

12 hour's past. Bump!!!!


Seriously :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)