SA-MP Forums Archive
PlayerTextDrawSetPreviewModel. - 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: PlayerTextDrawSetPreviewModel. (/showthread.php?tid=429857)



PlayerTextDrawSetPreviewModel. - [D]ry[D]esert - 11.04.2013

Hello everyone.
I've made textdraw which gonna be display player's skin. and its not selectable.
the problem is that i skin wont be shown.
Here is the code:
pawn Код:
new PlayerText:Inverntory1[MAX_PLAYERS];

                //OnPlayerConnect

                Inverntory1[playerid] = CreatePlayerTextDraw(playerid, 102.500000, 83.416671, " ");
        PlayerTextDrawLetterSize(playerid, Inverntory1[playerid], 0.000000, 0.000000);
        PlayerTextDrawTextSize(playerid, Inverntory1[playerid], 88.125000, 157.500000);
        PlayerTextDrawAlignment(playerid, Inverntory1[playerid], 1);
        PlayerTextDrawColor(playerid, Inverntory1[playerid], -2139062017);
        PlayerTextDrawSetShadow(playerid, Inverntory1[playerid], 0);
        PlayerTextDrawSetOutline(playerid, Inverntory1[playerid], 0);
        PlayerTextDrawFont(playerid, Inverntory1[playerid], 4);

//And here after player type the command.
PlayerTextDrawSetPreviewModel(playerid,Inverntory1[playerid], GetPlayerSkin(playerid));
PlayerTextDrawShow(playerid,Inverntory1[playerid]);
Thanks for reading, i hop you can solve this for me.


Re: PlayerTextDrawSetPreviewModel. - Faisal_khan - 11.04.2013

You will have to play with the Letter and Text size, even I had problems so I extracted this from a script made for 0.3x features:
pawn Код:
prevtd = CreatePlayerTextDraw(playerid, 20, 142.000000, "_");
        PlayerTextDrawAlignment(playerid, prevtd, 2);
        PlayerTextDrawBackgroundColor(playerid, prevtd, 0x00000000);
        PlayerTextDrawFont(playerid, prevtd, TEXT_DRAW_FONT_MODEL_PREVIEW);
        PlayerTextDrawLetterSize(playerid, prevtd, 0.360000, 17.000000);
        PlayerTextDrawColor(playerid, prevtd, -1);
        PlayerTextDrawSetOutline(playerid, prevtd, 0);
        PlayerTextDrawSetProportional(playerid, prevtd, 1);
        PlayerTextDrawSetShadow(playerid, prevtd, 1);
        PlayerTextDrawUseBox(playerid, prevtd, 1);
        PlayerTextDrawBoxColor(playerid, prevtd, 0x00000000);
        PlayerTextDrawTextSize(playerid, prevtd, 170.000000, 170.000000);
        PlayerTextDrawSetPreviewModel(playerid, prevtd, 287);
EDIT:
I went through your code. You must have this TEXT_DRAW_FONT_MODEL_PREVIEW for the Font
Like:
pawn Код:
PlayerTextDrawFont(playerid, prevtd, TEXT_DRAW_FONT_MODEL_PREVIEW);