Need Help with a [FS]
#1

me and my friend are working on a [FS] about changing skins with a command
any way, i made an array to store the skin ids
Quote:

new Skins[217][1] = {
{264},
{286},{287},{228},{113},{120},{147},{294},{227},{6 1},{171},
{247},
{248},{100},{256},{263},{262},{261},{260},{259},{2 58},{257},{256},{255},
{253},{252},{251},{249},{246},{245},{244},{243},{2 42},{241},{240},{239},
{238},{237},{236},{235},{234},{233},{232},{231},{2 30},{229},
{226},{225},{173},{174},{175},{224},{223},{222},{2 21},{220},{219},{218},
{217},{216},{215},{214},{213},{212},{211},{210},{2 09},
{207},{206},{205},{204},{203},{202},{201},{200},{1 99},{198},{197},{196},
{195},{194},{193},{192},{191},{190},{189},{185},{1 84},{183},
{182},{181},{180},{179},{178},{176},{172},{170},{1 68},{167},{162},
{161},{160},{159},{158},{157},{156},{155},{154},{1 53},{152},{151},
{146},{145},{144},{143},{142},{141},{140},{139},{1 38},{137},{136},{135},
{134},{133},{132},{131},{130},{129},{128},{254},{9 9},{97},{96},{95},{94},
{92},{90},{89},{88},{87},{85},{84},{83},{82},{81}, {80},{79},{78},{77},{76},
{75},{73},{72},{69},{68},{67},{66},{64},{63},{62}, {58},{57},{56},{55},
{54},{53},{52},{51},{50},{49},{45},{44},{43},{41}, {39},{38},{37},{36},{35},
{34},{33},{32},{31},{30},{29},{28},{27},{26},{25}, {24},{23},{22},{21},{20},
{19},{18},{17},{16},{15},{14},{13},{12},{11},{10}, {1},{2},
{290},//ROSE
{291},//PAUL
{292},//CESAR
{293},//OGLOC
{187},
{296},//JIZZY
{297},//MADDOGG
{298},//CAT
{299}//ZERO
};

and every thing is cool and made a cmd with a dialog input to make the players write the skin they want and press ok so the skin is changed
and here is the cmd
Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/skins", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 11, DIALOG_STYLE_INPUT, "Skins Screen","Choose any skin you want", "Change" , "Quit");
return 1;
}
return 0;

}

Now i need to make {OnDialogResponse} i need to make it if the player entered the skin number and press ok the dialog assign the array and change the skin please fast
Reply
#2

I Really need help please
Reply
#3

This would involve a ton of
if(inputtext == 'skinid')
{

So,

if(inputtext == '1')
{
SetPlayerSkin(playerid, 1);
SendClientMessage(playerid, COLOR_WHITE, "You've changed your skin to ID 1!");
}

There is another way, but I don't know how to say it.
Reply
#4

We really need help.
Reply
#5

Please do not spam
pawn Код:
new Skins[217][1] = {
{264},
{286},{287},{228},{113},{120},{147},{294},{227},{6 1},{171},
{247},
{248},{100},{256},{263},{262},{261},{260},{259},{2 58},{257},{256},{255},
{253},{252},{251},{249},{246},{245},{244},{243},{2 42},{241},{240},{239},
{238},{237},{236},{235},{234},{233},{232},{231},{2 30},{229},
{226},{225},{173},{174},{175},{224},{223},{222},{2 21},{220},{219},{218},
{217},{216},{215},{214},{213},{212},{211},{210},{2 09},
{207},{206},{205},{204},{203},{202},{201},{200},{1 99},{198},{197},{196},
{195},{194},{193},{192},{191},{190},{189},{185},{1 84},{183},
{182},{181},{180},{179},{178},{176},{172},{170},{1 68},{167},{162},
{161},{160},{159},{158},{157},{156},{155},{154},{1 53},{152},{151},
{146},{145},{144},{143},{142},{141},{140},{139},{1 38},{137},{136},{135},
{134},{133},{132},{131},{130},{129},{128},{254},{9 9},{97},{96},{95},{94},
{92},{90},{89},{88},{87},{85},{84},{83},{82},{81}, {80},{79},{78},{77},{76},
{75},{73},{72},{69},{68},{67},{66},{64},{63},{62}, {58},{57},{56},{55},
{54},{53},{52},{51},{50},{49},{45},{44},{43},{41}, {39},{38},{37},{36},{35},
{34},{33},{32},{31},{30},{29},{28},{27},{26},{25}, {24},{23},{22},{21},{20},
{19},{18},{17},{16},{15},{14},{13},{12},{11},{10}, {1},{2},
{290},//ROSE
{291},//PAUL
{292},//CESAR
{293},//OGLOC
{187},
{296},//JIZZY
{297},//MADDOGG
{298},//CAT
{299}//ZERO
};

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/skins", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 11, DIALOG_STYLE_INPUT, "Skins Screen","Choose any skin you want", "Change" , "Quit");
return 1;
}
return 0;

}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
switch(dialogid)
{
 case 11:
 {
   if(!response)
    return;
   new skin = strval(inputtext);
   for(new s=0;s<sizeof(Skins);s++)
   {
    if(Skins[s][0] ==s)
    {
       SendClientMessage(playerid, COLOR_WHITE, "You've changed your skin!");
       setPlayerSkin(playerid, skin);
    }
    else
      SendClientMessage(playerid, COLOR_WHITE, "invalid ID!");
   }
 }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)