16.04.2016, 15:24
make another dialog let it be its id skin selection
first define it @ top of the script
now on this part
now on ondialogresponse
i personally dont tested it but it works as you want
first define it @ top of the script
PHP Code:
#define DIALOG_SKIN 456 //change the no according to your wish
PHP Code:
if(classid == 0) {
SetPlayerSkin(playerid, 287);
GameTextForPlayer(playerid,"~G~Green",1000,4);
SetPlayerColor(playerid, GREEN_COLOR);
gTeam[playerid] = 0;
ShowPlayerDialog(playerid,DIALOG_SKIN,DIALOG_STYLE_LIST,"Select Skin","Skin 1 for class 0 \nSkin2 for class 0");//name it as your own wish but remember this is only for this class
}
if(classid == 1) {
SetPlayerSkin(playerid, 124);
GameTextForPlayer(playerid,"~Y~Yellow",1000,4);
SetPlayerColor(playerid, YELLOW_COLOR);
gTeam[playerid] = 2;
ShowPlayerDialog(playerid,DIALOG_SKIN,DIALOG_STYLE_LIST,"Select Skin","Skin for class 1 \nSkin 2 class 1");//name it as your own wish but remember this is only for this class
}
//do same for rest..................
PHP Code:
if(dialogid == DIALOG_SKIN)
{
if(response)
{
if( gTeam[playerid] == 0)//for the team 1
{
switch(listitem)
{
case 0 : return SetPlayerSkin(playerid,skinidhere);
case 1:return SetPlayerSkin(playerid,skinidhere);
}
}
if( gTeam[playerid] == 1)//for the team 2
{
switch(listitem)
{
case 0 : return SetPlayerSkin(playerid,skinidhere);
case 1:return SetPlayerSkin(playerid,skinidhere);
}
}
}
}