20.02.2017, 10:31
Now it's my time to ask for some little help coz I'm literally confused
so I have a code of playertextdraw
now I already set the model preview to 294 Wuzimu
Now I click another textdraw
and it does this
As you can see clearly on the code that it should change the preview model. I even tried to the extent to destroy the textdraw and recreate it, setting the variables into an indexing variable and slap in into PlayerTextDrawSetPreviewModel
Now what am I doing wrong
First it doesn't change it's preview model but it got confirmed that it got clicked coz when you try to click proceed.
This code here
The skin changes properly, and selects the group properly. But only the preview model does not work
and there are no error logs so there's no problem on the script either.
EDIT:
I got it working but if you have some suggestions please feel free to add it below coz maybe some would read this and you would be able to help.
The code above is already correct but the code is still incorrect and I am correcting it.
so I have a code of playertextdraw
PHP код:
GroupSelectionTD[playerid][7] = CreatePlayerTextDraw(playerid, 272.800018, 102.293334, "_");
PlayerTextDrawFont(playerid, GroupSelectionTD[playerid][7], TEXT_DRAW_FONT_MODEL_PREVIEW);
PlayerTextDrawUseBox(playerid, GroupSelectionTD[playerid][7], 1);
PlayerTextDrawBoxColor(playerid, GroupSelectionTD[playerid][7], 102);
PlayerTextDrawTextSize(playerid, GroupSelectionTD[playerid][7], 350, 100);
Now I click another textdraw
and it does this
PHP код:
ReloadGroupSelectionMenu(playerid)
{
new skinid;
skinid = GetPVarInt(playerid, "Modelid");
PlayerTextDrawDestroy(playerid, GroupSelectionTD[playerid][7]);
GroupSelectionTD[playerid][7] = CreatePlayerTextDraw(playerid, 272.800018, 102.293334, "_");
PlayerTextDrawFont(playerid, GroupSelectionTD[playerid][7], TEXT_DRAW_FONT_MODEL_PREVIEW);
PlayerTextDrawUseBox(playerid, GroupSelectionTD[playerid][7], 1);
PlayerTextDrawBoxColor(playerid, GroupSelectionTD[playerid][7], 102);
PlayerTextDrawTextSize(playerid, GroupSelectionTD[playerid][7], 350, 100);
PlayerTextDrawSetPreviewModel(playerid, GroupSelectionTD[playerid][7], skinid);
PlayerTextDrawShow(playerid, GroupSelectionTD[playerid][7]);
return 1;
}
Now what am I doing wrong
First it doesn't change it's preview model but it got confirmed that it got clicked coz when you try to click proceed.
This code here
PHP код:
GroupSelectionTD[playerid][9] = CreatePlayerTextDraw(playerid, 559.200134, 230.720077, "Proceed >>");
PlayerTextDrawLetterSize(playerid, GroupSelectionTD[playerid][9], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, GroupSelectionTD[playerid][9], 2);
PlayerTextDrawColor(playerid, GroupSelectionTD[playerid][9], -1);
PlayerTextDrawSetShadow(playerid, GroupSelectionTD[playerid][9], 0);
PlayerTextDrawSetOutline(playerid, GroupSelectionTD[playerid][9], 1);
PlayerTextDrawBackgroundColor(playerid, GroupSelectionTD[playerid][9], 51);
PlayerTextDrawFont(playerid, GroupSelectionTD[playerid][9], 2);
PlayerTextDrawSetProportional(playerid, GroupSelectionTD[playerid][9], 1);
PlayerTextDrawSetSelectable(playerid, GroupSelectionTD[playerid][9], true);
and there are no error logs so there's no problem on the script either.
EDIT:
I got it working but if you have some suggestions please feel free to add it below coz maybe some would read this and you would be able to help.
The code above is already correct but the code is still incorrect and I am correcting it.