SA-MP Forums Archive
Displaying an Image from a MYSQL Field? - 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: Displaying an Image from a MYSQL Field? (/showthread.php?tid=412044)



Displaying an Image from a MYSQL Field? - acade - 31.01.2013

Hello, I was wondering, I'm displaying a Vehicle Model or Skin Model and it's showing the ID, Ex: Vehicle Model: 560.

How would I get it so instead of showing 560 it would show a picture of a sultan for example?

Thank you


Re: Displaying an Image from a MYSQL Field? - iGetty - 31.01.2013

You'd need to use the new TextDraw functions of the 0.3x, then read it from the database and set these up:

pawn Код:
TextDrawFont(playerid, txtSprite, TEXT_DRAW_FONT_MODEL_PREVIEW);
native TextDrawSetPreviewModel(Text:text, modelindex);
native TextDrawSetPreviewRot(Text:text, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fZoom = 1.0);