Hello everyone, i am using TDE TextDraw Editor to create textdraws. i created a textdraw in it. so now, i am wondering that how to use it in PlayerTextDrawShow? cuz it is creating txds under same variable TDEditor_PTD[MAX_PLAYERS][4].
PHP код:
//Player TextDraws:
new Text:TDEditor_PTD[MAX_PLAYERS][4];
TDEditor_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 162.799987, 136.986572, "box");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][0], 0.000000, 20.079992);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][0], 490.000000, 0.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][0], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][0], 255);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][0], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][0], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0);
PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][0], true);
TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 412.200012, 136.333358, "");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][1], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][1], 79.000000, 100.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][1], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][1], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][1], 5);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawSetPreviewModel(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawSetPreviewRot(playerid, TDEditor_PTD[playerid][1], 0.000000, 0.000000, 0.000000, 1.000000);
TDEditor_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 162.000076, 141.466629, "Name");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][12], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][12], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][12], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][12], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][12], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][12], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][12], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][12], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][12], 0);
TDEditor_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 216.676406, 142.143295, "NAMEHERE");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][13], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][13], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][13], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][13], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][13], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][13], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][13], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][13], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][13], 0);
//Total textdraws exported: 4 (0 global textdraws /14 player textdraws) ~ 30/4/2016 ~ 13:44:25
TDEditor V1.16 by adri1
Also, why when i press Delete button, in place of deleting, it is duplicating the textdraw?
Well SA:MP has 2 types of textdraws. Global ones, the ones that r the same for every player on th esrver, and player ones, the ones uniq for every player. U r creating global ones, and try to use function that is intended to show player ones. So, u either want to swtich to player text draws, whic r more suitable to u scrip, atleast of waht I can see, or use TextDrawShowForPlayer function instead of PlayerTextDrawShow.
hey mate, i guess you didnt see but i am making Player Textdraws. now my doubt is how to show it to player, as each text draw has same name with diffrent arreys. like new TDE_test[MAX_PLAYERS][4] means i can use that variable for 4 times starting from 0 to 3. so if i want to show it to player, what do i have to do.