SA-MP Forums Archive
Selection Skin - 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: Selection Skin (/showthread.php?tid=660781)



Selection Skin - kevi11 - 13.11.2018

Hi guys i'm new in the world of scripting, now i have problem with this script, when i write on the game /duty and select "skin" don't it appears.. sorry for my bad english

This is the script:

PHP код:
case DIALOG_ARMADIETTO:
        {
            if (!
response) return 1;
              switch (
listitem)
        {
            case 
0: //Entra in servizio e seleziona divisa
            
{
                
ShowPlayerDialog(playerid, DIALOG_SCELTA_LSPD, DIALOG_STYLE_LIST, "ARMADIETTO LSPD:", "Seleziona Divisa\nBorghese", "Conferma", "Esci");
                
SCM(playerid, -1, "Hai aperto l'armadietto!");
            }
            
            case 
1: // Chiudi Armadietto
            
{
                if(
Player[playerid][FactionDuty] == 1) return SCM(playerid, -1, "Sei uscito dal servizio e hai chiuso l'armadietto!");
                
Player[playerid][FactionDuty] = 0;
                
ResetPlayerWeapons(playerid);
            }
            case 
2: // Seleziona Divisa (LSPD)
            
{
                if(
Player[playerid][FactionDuty] == 0) return SCM(playerid, -1, "Non sei in servizio!");
                
Player[playerid][FactionDuty] = 0;
                
ShowModelSelectionMenu(playerid, "Seleziona Divisa LSPD", LSPD_SELECTION_SKIN, LspdSkins, sizeof(LspdSkins), 0.0, 0.0, 0.0);
                
SCM(playerid, -1, "Hai preso la divisa dall'armadietto e sei andato in servizio!");
                
Player[playerid][FactionDuty] = 1;
            }
            
            case 
3: // Borghese
            
{
                if(
Player[playerid][FactionDuty] == 0) return SCM(playerid, -1, "Non sei in servizio!");
                
Player[playerid][FactionDuty] = 0;
                
ShowModelSelectionMenu(playerid, "Entra in servizio come borghese", BORGHESE_SELECTION_SKIN, LspdSkinBorghese, sizeof(LspdSkinBorghese), 0.0, 0.0, 0.0);
                
SCM(playerid, -1, "Hai preso dei vestiti dall'armadietto e sei in borghese!");
                
Player[playerid][FactionDuty] = 1;
            }
        }
        }
        default: return 
0;
    }
    return 
1;
} 
I JUST ADDED ALL SKIN IN THE NEW, DEFINE ETC... IT DON'T APPEARS

PHP код:
public OnModelSelectionResponse(playerid, extraid, index, modelid, response)
{
    if ((
response) && (extraid == LSPD_SELECTION_SKIN))
    {
        
SetPlayerSkin(playerid, modelid);
        
SCM(playerid, COLOR_GREEN, "Skin settata!");
        
ShowPlayerDialog(playerid, DIALOG_SCELTA_LSPD, DIALOG_STYLE_LIST, "ARMADIETTO LSPD", "Seleziona Skin\nChiudi Armadietto", "Conferma", "Esci");
    }
    if ((
response) && (extraid == BORGHESE_SELECTION_SKIN))
    {
        
SetPlayerSkin(playerid, modelid);
        
SCM(playerid, COLOR_GREEN, "Skin settata!");
        
ShowPlayerDialog(playerid, DIALOG_SCELTA_BORGHESE, DIALOG_STYLE_LIST, "ARMADIETTO LSPD(BORGHESE)", "Seleziona Skin\nChiudi Armadietto", "Conferma", "Esci");
    }
    return 
1;
}Â