getting a modelindex ID in PlayerTextDrawSetPreviewModel?
#1

I'm confused. How can I get modelindex ID(third parameter) here?
pawn Код:
PlayerTextDrawSetPreviewModel(playerid, tID[playerid][9], 28);
        PlayerTextDrawSetPreviewModel(playerid, tID[playerid][10], 101);
        PlayerTextDrawSetPreviewModel(playerid, tID[playerid][11], 179);
        PlayerTextDrawSetPreviewModel(playerid, tID[playerid][12], 183);

//onplayerclickplayertextdraw
SetPlayerSkin(playerid, /*modelindex?*/);
Reply
#2

You need to save it into a variable I guess.
Reply
#3

That's for sure, but I don't know how.
Reply
#4

skin[playerid] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, skin[playerid]);
Reply
#5

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
skin[playerid] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, skin[playerid]);
Clearly, you did not understand what he wants.
Reply
#6

Are you referring to the last parameter of the tID array? If so, you will need to loop through the array and check if the clicked TD is equal to the value of the array with each index.
Reply
#7

modelindex for PlayerTextDrawSetPreviewModel
PlayerTextDrawSetPreviewModel(playerid, text, modelindex)
How can I store 'modelindex' into a variable so later I can use it to set player's skin when they click tID[playerid][xx] textdraw?
Reply
#8

You can do it the same way you're storing the TD's ID into the tID array.

pawn Код:
modelIndexes[MAX_PLAYERS][MAX_INDEXES];

tID[playerid][0] = CreateText(...);
modelIndexes[playerid][0] = value;
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)