SA-MP Forums Archive
Textdraw only work for id 0 - 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)
+--- Thread: Textdraw only work for id 0 (/showthread.php?tid=609466)



Textdraw only work for id 0 - alexanderjb918 - 12.06.2016

Код:
for(new i; i < MAX_PLAYERS; i++)
	{
	Health[i] = TextDrawCreate(566.000000, 67.000000, "100%");
	TextDrawBackgroundColor(Health[i], 255);
	TextDrawFont(Health[i], 1);
	TextDrawLetterSize(Health[i], 0.219999, 0.899999);
	TextDrawColor(Health[i], -1);
	TextDrawSetOutline(Health[i], 1);
	TextDrawSetProportional(Health[i], 1);

	Armour[i] = TextDrawCreate(566.000000, 44.000000, "100%");
	TextDrawBackgroundColor(Armour[i], 255);
	TextDrawFont(Armour[i], 1);
	TextDrawLetterSize(Armour[i], 0.219999, 0.899999);
	TextDrawColor(Armour[i], -1);
	TextDrawSetOutline(Armour[i], 1);
	TextDrawSetProportional(Armour[i], 1);
	}



Re: Textdraw only work for id 0 - F1N4L - 12.06.2016

Create PlayerTextdraw and not used loop for this case because you are creating multiples TextDraws in your server.
Or use TextDrawShowForPlayer, or PlayerTextDraawShowForPlayer (define the variable to PlayerText)


Re: Textdraw only work for id 0 - Smileys - 13.06.2016

pawn Код:
Health[i] = TextDrawCreate(566.000000, 67.000000, "100%");
    TextDrawBackgroundColor(Health[i], 255);
    TextDrawFont(Health[i], 1);
    TextDrawLetterSize(Health[i], 0.219999, 0.899999);
    TextDrawColor(Health[i], -1);
    TextDrawSetOutline(Health[i], 1);
    TextDrawSetProportional(Health[i], 1);

    Armour[i] = TextDrawCreate(566.000000, 44.000000, "100%");
    TextDrawBackgroundColor(Armour[i], 255);
    TextDrawFont(Armour[i], 1);
    TextDrawLetterSize(Armour[i], 0.219999, 0.899999);
    TextDrawColor(Armour[i], -1);
    TextDrawSetOutline(Armour[i], 1);
    TextDrawSetProportional(Armour[i], 1);
and when you wish to show it:
https://sampwiki.blast.hk/wiki/TextDrawShowForPlayer