TextDrawSetPreviewModel not working -
gilhrpenner - 01.02.2015
Hi there, I'm having some troubles with
TextDrawSetPreviewModel.
I'm making a inventory system and I would like to display the gun's image but it's not showing up, since this is my first time programming since the update I'm quite lost.
I have 3 slots for the inventory, the first one I'm displaying a drugs pack, the second one is the gun, which is not showing up, the 3 slot I just put a random ID just to show the question mark.
What am I doing wrong?
PHP код:
//Displays the drugs pack
Textdraw11 = TextDrawCreate(460.000000, 165.000000, "drugs");
TextDrawBackgroundColor(Textdraw11, 83952640);
TextDrawFont(Textdraw11, 5);
TextDrawLetterSize(Textdraw11, 0.500000, 1.000000);
TextDrawColor(Textdraw11, -1);
TextDrawSetOutline(Textdraw11, 0);
TextDrawSetProportional(Textdraw11, 1);
TextDrawSetShadow(Textdraw11, 1);
TextDrawUseBox(Textdraw11, 1);
TextDrawBoxColor(Textdraw11, 255);
TextDrawTextSize(Textdraw11, 37.000000, 41.000000);
TextDrawSetPreviewModel(Textdraw11, 1576);
TextDrawSetPreviewRot(Textdraw11, 0.000000, 0.000000, -44.000000, 1.000000);
TextDrawSetSelectable(Textdraw11, 0);
//Supposed to display the gun
Textdraw12 = TextDrawCreate(498.000000, 165.000000, "gun");
TextDrawBackgroundColor(Textdraw12, 0);
TextDrawFont(Textdraw12, 5);
TextDrawLetterSize(Textdraw12, 0.500000, 1.000000);
TextDrawColor(Textdraw12, -1);
TextDrawSetOutline(Textdraw12, 0);
TextDrawSetProportional(Textdraw12, 1);
TextDrawSetShadow(Textdraw12, 1);
TextDrawUseBox(Textdraw12, 1);
TextDrawBoxColor(Textdraw12, 255);
TextDrawTextSize(Textdraw12, 37.000000, 41.000000);
TextDrawSetPreviewModel(Textdraw12, 348);
TextDrawSetPreviewRot(Textdraw12, 0.0, 0.0, 0.0, 2.5);
TextDrawSetSelectable(Textdraw12, 0);
Link to the picture
Re: TextDrawSetPreviewModel not working -
ikey07 - 01.02.2015
First create player textdraw, as it will be per player system, and be sure your model is correct.
Also how are you showing them?
Re: TextDrawSetPreviewModel not working -
gilhrpenner - 01.02.2015
Since I'm just playing around and learning I'm using just the regular TextDraw, but yes, I'll definitely change it to PlayerTextDraw.
And I'm showing the text draw at OnPlayerConnect, again, just for trying and learning.
Re : TextDrawSetPreviewModel not working -
Dutheil - 01.02.2015
You must using the font : TEXT_DRAW_FONT_MODEL_PREVIEW.
pawn Код:
TextDrawFont(textdraw, TEXT_DRAW_FONT_MODEL_PREVIEW);
And your text must be just an underscore.
pawn Код:
Textdraw11 = TextDrawCreate(460.000000, 165.000000, "_");
Textdraw12 = TextDrawCreate(498.000000, 165.000000, "_");