link Textdraws (need help) - 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: link Textdraws (need help) (
/showthread.php?tid=624545)
link Textdraws (need help) -
Starters - 18.12.2016
Helo, i dont know how to link textdraws. Textdraw1, Textdraw2, Textdraw3, Textdraw4 to Textdraw.
for example
Код:
new Textdraw;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
public OnGameModeInit()
{
//Creating Textdraws
Textdraw1 = TextDrawCreate(150.0, 170.0,"Text1");
Textdraw2 = TextDrawCreate(200.0, 170.0,"Text2");
Textdraw3 = TextDrawCreate(250.0, 170.0,"Text3");
Textdraw4 = TextDrawCreate(300.0, 170.0,"Text4");
//I want these to apply to textdraw1,2,3,4
TextDrawTextSize(Textdraw, 180, 180);
TextDrawAlignment(Textdraw, 2);
return 1;
}
//also to apply these to texdraw1,2,3,4
TextDrawShowForPlayer(playerid, Textdraw);
TextDrawShowForPlayer(playerid, Textdraw);
Re: link Textdraws (need help) -
BiosMarcel - 18.12.2016
That doesnt work, but you can show more than one at a time
Re: link Textdraws (need help) -
nezo2001 - 18.12.2016
TextDrawTextSize(Textdraw
1, 180, 180);
Re: link Textdraws (need help) -
Starters - 18.12.2016
i want to show them all togather and hide them all togather, but i want to link them togather to to not repeat lines just changing one word... like: TextDrawShowForPlayer(playerid, Textdraw1); TextDrawShowForPlayer(playerid, Textdraw2);TextDrawShowForPlayer(playerid, Textdraw3); TextDrawShowForPlayer(playerid, Textdraw4); but all them with one TextDrawShowForPlayer(playerid, Textdraw);
Re: link Textdraws (need help) -
nezo2001 - 18.12.2016
PHP код:
stock showTextdraw(id) {
TextDrawShowForPlayer(id, Textdraw1);
TextDrawShowForPlayer(id, Textdraw2);
TextDrawShowForPlayer(id, Textdraw3);
TextDrawShowForPlayer(id, Textdraw4);
}
Use showTextdraw(playerid); to call it
Re: link Textdraws (need help) -
Starters - 18.12.2016
Quote:
Originally Posted by nezo2001
PHP код:
stock showTextdraw(id) {
TextDrawShowForPlayer(id, Textdraw1);
TextDrawShowForPlayer(id, Textdraw2);
TextDrawShowForPlayer(id, Textdraw3);
TextDrawShowForPlayer(id, Textdraw4);
}
Use showTextdraw(playerid); to call it
|
Thanx!