Preview model problem
#1

Alright so for some reason its setting CJ skin even tho I am checking the player skin in the textdraw...

It should show Player skin ID that he has but it shows CJ skin id

Код:
TextDrawSetPreviewModel(textdrawskin, GetPlayerSkin(playerid));
TextDrawShowForPlayer(playerid,textdrawskin);
Reply
#2

You should try doing this with PlayerTextDraws instead if you want to show specific information to a player (like this) since your currently using global textdraws.

Try changing GetPlayerSkin to a random number and tell me if that shows up, other than the CJ skin. If it changes, I suggest converting that text-draw to PlayerTextDraw.
Reply
#3

Here is the code what i use

new playerid;
dole7 = TextDrawCreate(443.199615, 375.573730, "New Textdraw");
TextDrawLetterSize(dole7, 0.449999, 1.600000);
TextDrawTextSize(dole7, 57.599990, 41.813346);
TextDrawAlignment(dole7, 1);
TextDrawColor(dole7, -1);
TextDrawUseBox(dole7, true);
TextDrawBoxColor(dole7, 0);
TextDrawSetShadow(dole7, 0);
TextDrawSetOutline(dole7, 1);
TextDrawBackgroundColor(dole7, 51);
TextDrawFont(dole7, 5);
TextDrawSetProportional(dole7, 1);
TextDrawSetPreviewModel(dole7, GetPlayerSkin(playerid));
TextDrawSetPreviewRot(dole7, 0.000000, 0.000000, 0.000000, 1.000000);
Reply
#4

That in the function ongamemodeinit?
Reply
#5

yes.
Reply
#6

pawn Код:
//Replace new Text:dole7 with:
new PlayerText:dole7[MAX_PLAYERS];

//Place this where you need the function to show up
dole7[playerid] = CreatePlayerTextDraw(443.199615, 375.573730, "New Textdraw");
PlayerTextDrawLetterSize(playerid, dole7[playerid], 0.449999, 1.600000);
PlayerTextDrawTextSize(playerid, dole7[playerid], 57.599990, 41.813346);
PlayerTextDrawAlignment(playerid, dole7[playerid], 1);
PlayerTextDrawColor(playerid, dole7[playerid], -1);
PlayerTextDrawUseBox(playerid, dole7[playerid], true);
PlayerTextDrawBoxColor(playerid, dole7[playerid], 0);
PlayerTextDrawSetShadow(playerid, dole7[playerid], 0);
PlayerTextDrawSetOutline(playerid,dole7[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, dole7[playerid], 51);
PlayerTextDrawFont(playerid, dole7[playeri d], 5);
PlayerTextDrawSetProportional(playerid, dole7[playerid], 1);
PlayerTextDrawSetPreviewModel(playerid, dole7[playerid], GetPlayerSkin(playerid));
PlayerTextDrawSetPreviewRot(playerid, dole7[playerid], 0.000000, 0.000000, 0.000000, 1.000000);
PlayerTextDrawShow(playerid, dole7[playerid]);

//Add this onplayerdisconnect
PlayerTextDrawDestroy(playerid, dole7[playerid);

//If you need to hide it any-where use
PlayerTextDrawHide(playerid, dole7[playerid]);

//or destory it so you can crate the textdraw again with out it conflicting .
PlayerTextDrawDestroy(playerid, dole7[playerid);
Also, How on the earth are you able to even compile your script with GetPlayerSkin ongamemodeinit?! That makes no sense whats so ever.
Reply
#7

Erors

C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(8723) : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(10511) : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(26577) : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(26619) : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(26691) : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(26743) : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(2678 : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(26833) : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(2687 : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(26923) : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(2696 : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(27013) : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(30326) : error 035: argument type mismatch (argument 2)
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(30355) : error 035: argument type mismatch (argument 2)
Reply
#8

Refresh:Erors fixed but again i have 1 eror but in this line everything is ok,i don't know what is problem


C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(42692) : warning 213: tag mismatch
C:\Users\osman_000\Desktop\Ultimate Evolution UER X2\gamemodes\UERX2.pwn(42692) : error 035: argument type mismatch (argument 3)
Line(42692) dole7[playerid] = CreatePlayerTextDraw(443.199615, 375.573730, "New Textdraw");
Reply
#9

pawn Код:
dole7[playerid] = CreatePlayerTextDraw(playerid, 443.199615, 375.573730, "New Textdraw");
Reply
#10

Resolved R+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)