PreviewModel don't update ?
#1

Hi,
I need you guys because I have a problem. I've created a register script in textdraw and when the player select his sex (female/man) the previewmodel skin should be automaticly changed by a default skin but nothing happen :/

There is my dialog response when the player select female or male

Quote:

if(dialogid == DIALOG_SEXE)
{
if(response)
{
if(listitem == 0)
{
PlayerInfo[playerid][pSex]=1;SetPlayerSkin(playerid, 26);PlayerInfo[playerid][pChar] = 26;
format(MessageInscri, sizeof(MessageInscri), "Sexe: Homme");
PlayerTextDrawSetString(playerid, Creationperso[playerid][12], MessageInscri);
PlayerTextDrawSetPreviewModel(playerid, Creationperso[playerid][7], 26);
PlayerTextDrawShow(playerid, Creationperso[playerid][12]);
SelectTextDraw(playerid, 0x0080FF);
}
else if(listitem == 1)
{
PlayerInfo[playerid][pSex]=2;SetPlayerSkin(playerid, 29;PlayerInfo[playerid][pChar] = 298;
format(MessageInscri, sizeof(MessageInscri), "Sexe: Femme");
PlayerTextDrawSetString(playerid, Creationperso[playerid][12], MessageInscri);
PlayerTextDrawSetPreviewModel(playerid, Creationperso[playerid][7], 29;
PlayerTextDrawShow(playerid, Creationperso[playerid][12]);
SelectTextDraw(playerid, 0x0080FF);
}
}
}

Here is my textdraw code :

Quote:

Creationperso[i][7] = CreatePlayerTextDraw(i, 186.333297, 139.568893, "");
PlayerTextDrawTextSize(i, Creationperso[i][7], 93.000000, 115.000000);
PlayerTextDrawAlignment(i, Creationperso[i][7], 1);
PlayerTextDrawColor(i, Creationperso[i][7], -1);
PlayerTextDrawSetShadow(i, Creationperso[i][7], 0);
PlayerTextDrawBackgroundColor(i, Creationperso[i][7], 1090519040);
PlayerTextDrawFont(i, Creationperso[i][7], 5);
PlayerTextDrawSetProportional(i, Creationperso[i][7], 0);
PlayerTextDrawSetSelectable(i, Creationperso[i][7], true);
PlayerTextDrawSetPreviewModel(i, Creationperso[i][7], 189);
PlayerTextDrawSetPreviewRot(i, Creationperso[i][7], 0.000000, 0.000000, 0.000000, 1.000000);

Reply
#2

have you tried to do that when you hit the skin to set it for you?
Reply
#3

Try to re-show the textdraw to the player.
PHP код:
if(dialogid == DIALOG_SEXE)
{
    if(
response)
    {
        if(
listitem == 0)
        {
            
PlayerInfo[playerid][pSex]=1;SetPlayerSkin(playerid26);PlayerInfo[playerid][pChar] = 26;
            
format(MessageInscrisizeof(MessageInscri), "Sexe: Homme");
            
PlayerTextDrawSetString(playeridCreationperso[playerid][12], MessageInscri);
            
PlayerTextDrawSetPreviewModel(playeridCreationperso[playerid][7], 26);
            
PlayerTextDrawShow(playeridCreationperso[playerid][7]);
            
PlayerTextDrawShow(playeridCreationperso[playerid][12]);
            
SelectTextDraw(playerid0x0080FF);
        }
        else if(
listitem == 1)
        {
            
PlayerInfo[playerid][pSex]=2;SetPlayerSkin(playerid29;PlayerInfo[playerid][pChar] = 298;
            
format(MessageInscrisizeof(MessageInscri), "Sexe: Femme");
            
PlayerTextDrawSetString(playeridCreationperso[playerid][12], MessageInscri);
            
PlayerTextDrawSetPreviewModel(playeridCreationperso[playerid][7], 29;
            
PlayerTextDrawShow(playeridCreationperso[playerid][7]);
            
PlayerTextDrawShow(playeridCreationperso[playerid][12]);
            
SelectTextDraw(playerid0x0080FF);
        }
    }

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)