25.06.2013, 12:01
pawn Код:
if(dialogid == 2)// They pressed the first button.
{
if(response)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
switch(listitem)
{
case 0:// Mafias
{
SetPlayerSkin(playerid,x);
GivePlayerWeapon(playerid,x,9999);
GivePlayerWeapon(playerid,x,9999);
GivePlayerWeapon(playerid,x,9999);
SetPlayerPos(playerid,x,y,z);
}
case 1: // Triads
{
SetPlayerSkin(playerid,x);
GivePlayerWeapon(playerid,x,9999);
GivePlayerWeapon(playerid,x,9999);
GivePlayerWeapon(playerid,x,9999);
SetPlayerPos(playerid,x,y,z);
}
case 2: // Russian Mafia
{
SetPlayerSkin(playerid,x);
GivePlayerWeapon(playerid,x,9999);
GivePlayerWeapon(playerid,x,9999);
GivePlayerWeapon(playerid,x,9999);
SetPlayerPos(playerid,x,y,z);
}
case 3://Italian Mafia
{
SetPlayerPos(playerid,x,y,z);
SetPlayerSkin(playerid,x);
GivePlayerWeapon(playerid,x,9999);
GivePlayerWeapon(playerid,x,9999);
GivePlayerWeapon(playerid,x,9999);
}
}
return 1;
}
}
Change
pawn Код:
if (strcmp("/mafia", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Mafias", "Triads \nRussian Mafia \nItalian Mafia", "OK","Cancel");
return 1;
}
pawn Код:
if (strcmp("/mafia", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Mafias", "Triads \nRussian Mafia \nItalian Mafia", "OK","Cancel");
return 1;
}