PDA

View Full Version : link Textdraws (need help)


Starters
18/12/2016, 02:42 PM
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);

BiosMarcel
18/12/2016, 02:43 PM
That doesnt work, but you can show more than one at a time

nezo2001
18/12/2016, 02:44 PM
TextDrawTextSize(Textdraw1, 180, 180);

Starters
18/12/2016, 02:50 PM
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);

nezo2001
18/12/2016, 02:54 PM
stock showTextdraw(id) {
TextDrawShowForPlayer(id, Textdraw1);
TextDrawShowForPlayer(id, Textdraw2);
TextDrawShowForPlayer(id, Textdraw3);
TextDrawShowForPlayer(id, Textdraw4);
}
Use showTextdraw(playerid); to call it

Starters
18/12/2016, 03:24 PM
stock showTextdraw(id) {
TextDrawShowForPlayer(id, Textdraw1);
TextDrawShowForPlayer(id, Textdraw2);
TextDrawShowForPlayer(id, Textdraw3);
TextDrawShowForPlayer(id, Textdraw4);
}
Use showTextdraw(playerid); to call it

Thanx!