SA-MP Forums Archive
Model Preview (Issue) - 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: Model Preview (Issue) (/showthread.php?tid=582439)



Model Preview (Issue) - zT KiNgKoNg - 20.07.2015

Hi Guys/Gals,

I've just run into an old issue of mine, where when setting the 'model' for a model preview textdraw, it hides itself upon the model being changed, or if it set while being created; I never resolved the issue, and since I've come back and started doing a little project in my spare time; I've run into the same issue.


Note: I've provided one of the 'Windows' where the model preview is created, all of the previews are exactly the same, so it will be useless asking for the others.

Code (http://prntscr.com/7uvsnn):
Код:
	TD_CharacterSelection[23][playerid] = TextDrawCreate(346.000000, 198.000000, "_");
	TextDrawLetterSize(TD_CharacterSelection[23][playerid], 0.000000, 4.937654);
	TextDrawTextSize(TD_CharacterSelection[23][playerid], 40, 40);
	TextDrawAlignment(TD_CharacterSelection[23][playerid], 1);
	TextDrawColor(TD_CharacterSelection[23][playerid], 0);
	//TextDrawUseBox(TD_CharacterSelection[23][playerid], true);
	//TextDrawBoxColor(TD_CharacterSelection[23][playerid], 102);
	TextDrawSetShadow(TD_CharacterSelection[23][playerid], 0);
	TextDrawSetOutline(TD_CharacterSelection[23][playerid], 0);
	TextDrawFont(TD_CharacterSelection[23][playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
	TextDrawSetPreviewModel(TD_CharacterSelection[23][playerid], 1);
Screenshot ( I marked the area they should appear):

http://prntscr.com/7uvub0


Re: Model Preview (Issue) - n0minal - 20.07.2015

It's not a samp issue but a scripting mistake, when you use preview model textdraws you must use box for better controls about the size of the textdraw, and once you use box you need to increase the box size to see it, I use preview models since it has been released and never found any issues like this with them.


Re: Model Preview (Issue) - zT KiNgKoNg - 20.07.2015

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
It's not a samp issue but a scripting mistake, when you use preview model textdraws you must use box for better controls about the size of the textdraw, and once you use box you need to increase the box size to see it, I use preview models since it has been released and never found any issues like this with them.
Hi Leon,

Ignore the commented out lines, I commented those lines out to see if it made a difference; but at so avail it didn't; anyway so what you're saying is I need set the size after setting to a preview model textdraw?

Issue solved, thanks leon.


Re: Model Preview (Issue) - zeax - 17.02.2016

Quote:
Originally Posted by zT KiNgKoNg
Посмотреть сообщение
Hi Leon,

Ignore the commented out lines, I commented those lines out to see if it made a difference; but at so avail it didn't; anyway so what you're saying is I need set the size after setting to a preview model textdraw?

Issue solved, thanks leon.




Re: Model Preview (Issue) - Chilli9434 - 17.02.2016

Quote:
Originally Posted by zeax
Посмотреть сообщение

mashallah