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



PlayerTextDrawSetPreviewModel problem. - mirou123 - 21.03.2015

Hello everyone. I am trying to work on some textdraws for my server but I am having a weird issue that I can't seem to be able to fix. For some reason all the player models appear to be kind of inside out?
This is a screenshot that I took of the issue. It is a big dark but I hope you can see the problem:

This is my code
Код:
// Under OnPlayerConnect.
PStatTD[0] = CreatePlayerTextDraw(playerid, 441.250000, 141.750000, "Skin");
PlayerTextDrawTextSize(playerid, PStatTD[0], 121.875000, 184.916687);
PlayerTextDrawBackgroundColor(playerid, PStatTD[0], 0x00000055);
PlayerTextDrawFont(playerid, PStatTD[0], 5);
// When I actually need them to see it
PlayerTextDrawSetPreviewModel(playerid, PStatTD[0], PlayerVar[player][Skin]);
PlayerTextDrawShow(player, PStatTD[0]);
Notes:
It happens with every skin even the ones that are not modded.
I tried it with and without a background.
I tried it with many different angles.


Re: PlayerTextDrawSetPreviewModel problem. - mirou123 - 23.03.2015

I really need an answer or at least someone tell me if this happened with them before.


Re: PlayerTextDrawSetPreviewModel problem. - SickAttack - 23.03.2015

Try this:
pawn Код:
new Text:Textdraw0,
Text:Textdraw1;

// Under OnGameModeInit():
Textdraw0 = TextDrawCreate(140.000000, 140.000000, "Character");
TextDrawBackgroundColor(Textdraw0, -256);
TextDrawFont(Textdraw0, 5);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, -256);
TextDrawTextSize(Textdraw0, 160.000000, 180.000000);
TextDrawSetPreviewModel(Textdraw0, 12);
TextDrawSetPreviewRot(Textdraw0, 0.000000, 0.000000, 0.000000, 1.000000);
TextDrawSetSelectable(Textdraw0, 0);

Textdraw1 = TextDrawCreate(320.000000, 140.000000, "Character");
TextDrawBackgroundColor(Textdraw1, 80);
TextDrawFont(Textdraw1, 5);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, -256);
TextDrawTextSize(Textdraw1, 160.000000, 180.000000);
TextDrawSetPreviewModel(Textdraw1, 12);
TextDrawSetPreviewRot(Textdraw1, 0.000000, 0.000000, 0.000000, 1.000000);
TextDrawSetSelectable(Textdraw1, 0);
Preview:



Re: PlayerTextDrawSetPreviewModel problem. - mirou123 - 23.03.2015

Thanks for trying to help but that doesn't help me at all. I do have some other privew models and they work just fine. The problem is only present with that textdraw.


Re: PlayerTextDrawSetPreviewModel problem. - Jimmy0wns - 23.03.2015

Have you tried loading the box before the preview model? So it becomes:
pawn Код:
PlayerTextDrawShow(player, PStatTD[0]);
PlayerTextDrawSetPreviewModel(playerid, PStatTD[0], PlayerVar[player][Skin]);
I don't have a lot of experience with textdraws so correct me if I'm wrong.


Re: PlayerTextDrawSetPreviewModel problem. - mirou123 - 23.03.2015

I just tried it but it did not work. It didn't set it to the correct model and it still looked inside out. Should I post this in bugs section?