TextDrawSetPreviewModel not working
#1

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.000000165.000000"drugs");
    
TextDrawBackgroundColor(Textdraw1183952640);
    
TextDrawFont(Textdraw115);
    
TextDrawLetterSize(Textdraw110.5000001.000000);
    
TextDrawColor(Textdraw11, -1);
    
TextDrawSetOutline(Textdraw110);
    
TextDrawSetProportional(Textdraw111);
    
TextDrawSetShadow(Textdraw111);
    
TextDrawUseBox(Textdraw111);
    
TextDrawBoxColor(Textdraw11255);
    
TextDrawTextSize(Textdraw1137.00000041.000000);
    
TextDrawSetPreviewModel(Textdraw111576);
    
TextDrawSetPreviewRot(Textdraw110.0000000.000000, -44.0000001.000000);
    
TextDrawSetSelectable(Textdraw110);
    
//Supposed to display the gun
    
Textdraw12 TextDrawCreate(498.000000165.000000"gun");
    
TextDrawBackgroundColor(Textdraw120);
    
TextDrawFont(Textdraw125);
    
TextDrawLetterSize(Textdraw120.5000001.000000);
    
TextDrawColor(Textdraw12, -1);
    
TextDrawSetOutline(Textdraw120);
    
TextDrawSetProportional(Textdraw121);
    
TextDrawSetShadow(Textdraw121);
    
TextDrawUseBox(Textdraw121);
    
TextDrawBoxColor(Textdraw12255);
    
TextDrawTextSize(Textdraw1237.00000041.000000);
    
TextDrawSetPreviewModel(Textdraw12348);
    
TextDrawSetPreviewRot(Textdraw120.00.00.02.5);
    
TextDrawSetSelectable(Textdraw120); 

Link to the picture
Reply
#2

First create player textdraw, as it will be per player system, and be sure your model is correct.
Also how are you showing them?
Reply
#3

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.
Reply
#4

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, "_");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)