Playertextdraw help
#1

Now it's my time to ask for some little help coz I'm literally confused

so I have a code of playertextdraw

PHP код:
    GroupSelectionTD[playerid][7] = CreatePlayerTextDraw(playerid272.800018102.293334"_");
    
PlayerTextDrawFont(playeridGroupSelectionTD[playerid][7], TEXT_DRAW_FONT_MODEL_PREVIEW);
    
PlayerTextDrawUseBox(playeridGroupSelectionTD[playerid][7], 1);
    
PlayerTextDrawBoxColor(playeridGroupSelectionTD[playerid][7], 102);
    
PlayerTextDrawTextSize(playeridGroupSelectionTD[playerid][7], 350100); 
now I already set the model preview to 294 Wuzimu

Now I click another textdraw

and it does this
PHP код:
ReloadGroupSelectionMenu(playerid)
{
    new 
skinid;
    
skinid GetPVarInt(playerid"Modelid");
    
PlayerTextDrawDestroy(playeridGroupSelectionTD[playerid][7]);
    
GroupSelectionTD[playerid][7] = CreatePlayerTextDraw(playerid272.800018102.293334"_");
    
PlayerTextDrawFont(playeridGroupSelectionTD[playerid][7], TEXT_DRAW_FONT_MODEL_PREVIEW);
    
PlayerTextDrawUseBox(playeridGroupSelectionTD[playerid][7], 1);
    
PlayerTextDrawBoxColor(playeridGroupSelectionTD[playerid][7], 102);
    
PlayerTextDrawTextSize(playeridGroupSelectionTD[playerid][7], 350100);
    
PlayerTextDrawSetPreviewModel(playeridGroupSelectionTD[playerid][7], skinid);
    
PlayerTextDrawShow(playeridGroupSelectionTD[playerid][7]);
    return 
1;

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
PHP код:
    GroupSelectionTD[playerid][9] = CreatePlayerTextDraw(playerid559.200134230.720077"Proceed >>");
    
PlayerTextDrawLetterSize(playeridGroupSelectionTD[playerid][9], 0.4499991.600000);
    
PlayerTextDrawAlignment(playeridGroupSelectionTD[playerid][9], 2);
    
PlayerTextDrawColor(playeridGroupSelectionTD[playerid][9], -1);
    
PlayerTextDrawSetShadow(playeridGroupSelectionTD[playerid][9], 0);
    
PlayerTextDrawSetOutline(playeridGroupSelectionTD[playerid][9], 1);
    
PlayerTextDrawBackgroundColor(playeridGroupSelectionTD[playerid][9], 51);
    
PlayerTextDrawFont(playeridGroupSelectionTD[playerid][9], 2);
    
PlayerTextDrawSetProportional(playeridGroupSelectionTD[playerid][9], 1);
    
PlayerTextDrawSetSelectable(playeridGroupSelectionTD[playerid][9], true); 
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)