SA-MP Forums Archive
Textdraw Problem [again:|] - 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: Textdraw Problem [again:|] (/showthread.php?tid=660598)



Textdraw Problem [again:|] - PoniStar - 07.11.2018

guys i have another problem , i do this :

TextDrawSetPreviewModel(Text1, GetPlayerSkin(Winner));

but it just show CJ skin whats the problem ? (Winner = playerid on somewhere)


Re: Textdraw Problem [again:|] - jasperschellekens - 07.11.2018

Can u show some code? You probably just made a mistake somewhere.


Re: Textdraw Problem [again:|] - PoniStar - 08.11.2018

winner code :

new Winner;

dcmd_ticket ...
{
...
if(tickett[playerid] == winticket)
{
...
Winner = playerid;
return 1;
}
...


Re: Textdraw Problem [again:|] - lollypap54 - 08.11.2018

1) I think you need to reshow this textdraw after you change the model(hide and show again)(but idk if you really need to do this, just try it)
2) If problem still exists, try printing Winner var before model change: printf(“Winner:%d”, Winner);, see if it’s correct


Re: Textdraw Problem [again:|] - PoniStar - 08.11.2018

i checked that , Winner is right and it should work i dont know why its just show CJ skin , if i do this :
TextDrawSetPreviewModel(Text1, 230); //For EXP skin ID : 230
it shows right but on GetPlayerSkin Just show cj skin !


Re: Textdraw Problem [again:|] - PoniStar - 08.11.2018

guys this is the Text1 textdraw codes maybe you can find the problem here :


Text1= TextDrawCreate(555.200317, 200.106643, "LD_SPAC:white");
TextDrawLetterSize(Text1, -0.231199, 0.60479;
TextDrawTextSize(Text1, 125.599998, 113.493309);
TextDrawAlignment(Text1, 1);
TextDrawColor(Text1, -1);
TextDrawUseBox(Text1, true);
TextDrawBoxColor(Text1, 0x00000000);
TextDrawBackgroundColor(Text1, 0x00000000);
TextDrawSetShadow(Text1, 0);
TextDrawSetOutline(Text1, 0);
TextDrawFont(Text1, 5);
TextDrawSetPreviewModel(Text1, GetPlayerSkin(Winner));
TextDrawSetPreviewRot(Text1, 0.000000, 0.000000, -25.000000, 1.000000);


Re: Textdraw Problem [again:|] - v1k1nG - 08.11.2018

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

new Winner;

dcmd_ticket ...
{
...
if(tickett[playerid] == winticket)
{
...
Winner = playerid;
return 1;
}
...
How should this be helpful? This is nothing


Re: Textdraw Problem [again:|] - PoniStar - 08.11.2018

Quote:
Originally Posted by v1k1nG
Посмотреть сообщение
How should this be helpful? This is nothing
im saying the problem is not related to "Winner" Winner is the winner ID so used that like this : GetPlayerSkin[Winner] , its fine and i printed it the id was 230 (for exp) but it just show CJ skin !


Re: Textdraw Problem [again:|] - v1k1nG - 09.11.2018

Quote:
Originally Posted by PoniStar
Посмотреть сообщение
im saying the problem is not related to "Winner" Winner is the winner ID so used that like this : GetPlayerSkin[Winner] , its fine and i printed it the id was 230 (for exp) but it just show CJ skin !
Which skin ID is CJ's? `0`.
This means that your
PHP код:
TextDrawSetPreviewModel(Text1GetPlayerSkin(Winner)); 
is setting skin id `0` for model preview. If you say the skin was `230` the problem could be related to variable Winner indeed or there is something else we cannot see from here.
If you are trying to get some serious help please consider that we need to read your code to tell you where the problem may be.


Re: Textdraw Problem [again:|] - PoniStar - 09.11.2018

Quote:
Originally Posted by v1k1nG
Посмотреть сообщение
Which skin ID is CJ's? `0`.
This means that your
PHP код:
TextDrawSetPreviewModel(Text1GetPlayerSkin(Winner)); 
is setting skin id `0` for model preview. If you say the skin was `230` the problem could be related to variable Winner indeed or there is something else we cannot see from here.
If you are trying to get some serious help please consider that we need to read your code to tell you where the problem may be.
Код:
DELETED : )
can you fix this now ?