11.02.2014, 09:32
Use switch within dialogs because it's faster and better to read.
Check this:
You can save the skin & positions with the other player's stats.
Check this:
pawn Код:
switch(dialogid)
{
case 1:
{
if(response)
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Choose a Race","White Males\nBlack Males\nOriental Males\nHispanic Males\nNative Males", "Select", "Back");
else
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Choose a Race","White Females\nBlack Females\nOriental Females\nHispanic Females\nNative Females", "Select", "Back");
}
case 2:
{
if(response)
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "White Males","White Male 1\nWhite Male 2\nWhite Male 3","Select","Back");
case 1: ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Black Males","Black Male 1\nBlack Male 2\nBlack Male 3","Select","Back");
case 2: ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Oriental Males","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
case 3: ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Hispanic Males","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
case 4: ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "Native Males","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
}
}
}
case 3:
{
if(response)
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "White Females","White Male 1\nWhite Male 2\nWhite Male 3","Select","Back");
case 1: ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Black Femles","Black Male 1\nBlack Male 2\nBlack Male 3","Select","Back");
case 2: ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Oriental Femles","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
case 3: ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Hispanic Femles","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
case 4: ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "Native Femles","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
}
}
}
case 4:
{
if(response)
{
switch(listitem)
{
case 0:
{
SetPlayerSkin(playerid,29);
ShowPlayerDialog(playerid, 14, DIALOG_STYLE_MSGBOX, "Skin Selection", "Choose this skin for this session?", "Yes", "No");
}
case 1:
{
return 1;
}
case 2:
{
return 1;
}
case 3:
{
return 1;
}
case 4:
{
return 1;
}
}
}
}
case 14:
{
if(response)
{
SpawnPlayer(playerid);
SetPlayerSkin(playerid, 29);
{
else
{
SetPlayerSkin(playerid,0);
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "White Males","White Male 1\nWhite Male 2\nWhite Male 3","Select","Back");
}
}
}