pawn Код:
case AMMUNATION_MENU:
{
if(response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid,AMMUNATION_MENU_DEF,DIALOG_STYLE_LIST,"Defensa person","Spray - (5$)\nPuсo americano - (25$)\nNavaja - (45$)\nCanй - (15$)\nBate - (75$)","Comprar","Atras");
}
case 1:
{
ShowPlayerDialog(playerid,AMMUNATION_MENU_PIS,DIALOG_STYLE_LIST,"Pistolas","9mm :20: - (220$)\nDesert Eagle :10: - (300$)","Aceptar","Atras");
}
case 2:
{
ShowPlayerDialog(playerid,AMMUNATION_MENU_AME,DIALOG_STYLE_LIST,"Fusiles","MP5 :100: - (799$)\nM4 :150: - (1099$)\nAK-47 :250: - (1400$)","Aceptar","Atras");
}
case 3:
{
ShowPlayerDialog(playerid,AMMUNATION_MENU_ESC,DIALOG_STYLE_LIST,"Escopetas","Escopeta Caza :20: - (399$)\nShotgun :15: - (499$)","Aceptar","Atras");
}
case 4:
{
ShowPlayerDialog(playerid,AMMUNATION_MENU_PRO,DIALOG_STYLE_LIST,"Protecciуn","Chaleco - (400$)","Aceptar","Atras");
}
case 5:
{
ShowPlayerDialog(playerid,AMMUNATION_MENU_LEC,DIALOG_STYLE_LIST,"Lecciones","Ammunation's Weapon Guide (55$)\nGuнa Desert Eagle(45$)\nLecciуn Shotgun I(65$)\nLecciуn Shotgun II(75$)\nSubFusil-MP5 Guнa Toma I(82$)\nSubFusil-MP5 Guнa Toma II(89$)\nRifles de Asalto AK47-M4 I(70$)\nRifles de Asalto AK47-M4 II(99$)\nRifles de Asalto AK47-M4 III(129$)","Aceptar","Atras");
}
} return 1;
}
}
case AMMUNATION_MENU_DEF:
{
if(response)
{
if(PlayerInfo[playerid][pLevel] < 2)
{
Message(playerid, COLOR_GRAD2, " Debes ser mayor de nivel 2 para comprar armas.");
return 1;
}
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 2);
Bought(playerid, 2);
SendClientMessage(playerid, COLOR_YELLOW, "Se le ha realizado un descuento por tener Licencia de Armas.");
SafeGivePlayerWeapon(playerid, 41, 500);
}
else
{
Till(17, 5);
Bought(playerid, 5);
SafeGivePlayerWeapon(playerid, 41, 500);
}
}
case 1:
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 15);
Bought(playerid, 15);
SendClientMessage(playerid, COLOR_YELLOW, "Se le ha realizado un descuento por tener Licencia de Armas.");
SafeGivePlayerWeapon(playerid, 1, 1);
}
else
{
Till(17, 25);
Bought(playerid, 25);
SafeGivePlayerWeapon(playerid, 1,1);
}
}
case 2:
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 25);
Bought(playerid, 25);
SendClientMessage(playerid, COLOR_YELLOW, "Se le ha realizado un descuento por tener Licencia de Armas.");
SafeGivePlayerWeapon(playerid, 4,1);
}
else
{
Till(17, 40);
Bought(playerid, 40);
SafeGivePlayerWeapon(playerid, 4,1);
}
}
case 3:
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 5);
Bought(playerid, 5);
SendClientMessage(playerid, COLOR_YELLOW, "Se le ha realizado un descuento por tener Licencia de Armas.");
SafeGivePlayerWeapon(playerid, 15,1);
}
else
{
Till(17, 15);
Bought(playerid, 15);
SafeGivePlayerWeapon(playerid, 15,1);
}
}
case 4:
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 45);
Bought(playerid, 45);
SendClientMessage(playerid, COLOR_YELLOW, "Se le ha realizado un descuento por tener Licencia de Armas.");
SafeGivePlayerWeapon(playerid, 5,1);
}
else
{
Till(17, 60);
Bought(playerid, 60);
SafeGivePlayerWeapon(playerid, 5,1);
}
}
} return 1;
}
else ShowAmmunation(playerid);
}
case AMMUNATION_MENU_PIS:
{
if(response)
{
if(PlayerInfo[playerid][pLevel] < 2) return Message(playerid, COLOR_GRAD2, " Debes ser mayor a nivel 2 para comprar armas.");
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 70);
Bought(playerid, 140);
SendClientMessage(playerid, COLOR_YELLOW, "Se le ha realizado un descuento por tener Licencia de Armas.");
SafeGivePlayerWeapon(playerid, 22, 20);
}
else
{
Till(17, 110);
Bought(playerid, 220);
SafeGivePlayerWeapon(playerid,22,20);
}
}
case 1:
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 100);
Bought(playerid, 200);
SendClientMessage(playerid, COLOR_YELLOW, "Se le ha realizado un descuento por tener Licencia de Armas.");
SafeGivePlayerWeapon(playerid, 24,10);
}
else
{
Till(17, 100);
Bought(playerid, 300);
SafeGivePlayerWeapon(playerid, 24,10);
}
}
} return 1;
}
else ShowAmmunation(playerid);
}
case AMMUNATION_MENU_AME:
{
if(response)
{
if(PlayerInfo[playerid][pLevel] < 2) return Message(playerid, COLOR_GRAD2, " Debes ser mayor a nivel 2 para comprar armas.");
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 180);
Bought(playerid, 580);
SendClientMessage(playerid, COLOR_YELLOW, "Se te ha descontado el 30%% por tener la licencia de armas.");
SafeGivePlayerWeapon(playerid, 29,100);
}
else
{
Till(17, 199);
Bought(playerid, 799);
SafeGivePlayerWeapon(playerid, 29,100);
}
}
case 1:
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 180);
Bought(playerid, 780);
SendClientMessage(playerid, COLOR_YELLOW, "Se te ha descontado el 30%% por tener la licencia de armas.");
SafeGivePlayerWeapon(playerid, 31,150);
}
else
{
Till(17, 199);
Bought(playerid, 1099);
SafeGivePlayerWeapon(playerid, 31,150);
}
}
case 2:
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 100);
Bought(playerid, 1000);
SendClientMessage(playerid, COLOR_YELLOW, "Se te ha descontado el 30%% por tener la licencia de armas.");
SafeGivePlayerWeapon(playerid, 30,250);
}
else
{
Till(17, 400);
Bought(playerid, 1400);
SafeGivePlayerWeapon(playerid, 30,250);
}
}
} return 1;
}
else ShowAmmunation(playerid);
}
case AMMUNATION_MENU_ESC:
{
if(response)
{
if(PlayerInfo[playerid][pLevel] < 2) return Message(playerid, COLOR_GRAD2, " Debes ser mayor a nivel 2 para comprar armas.");
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 120);
Bought(playerid, 270);
SendClientMessage(playerid, COLOR_YELLOW, "Se te ha descontado el 30%% por tener la licencia de armas.");
SafeGivePlayerWeapon(playerid, 33,20);
}
else
{
Till(17, 199);
Bought(playerid, 399);
SafeGivePlayerWeapon(playerid, 33,20);
}
}
case 1:
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 110);
Bought(playerid, 310);
SendClientMessage(playerid, COLOR_YELLOW, "Se te ha descontado el 30%% por tener la licencia de armas.");
SafeGivePlayerWeapon(playerid, 25,15);
}
else
{
Till(17, 199);
Bought(playerid, 499);
SafeGivePlayerWeapon(playerid, 25,15);
}
}
} return 1;
}
else ShowAmmunation(playerid);
}
case AMMUNATION_MENU_PRO:
{
if(response)
{
if(PlayerInfo[playerid][pGunLic] == 1)
{
Till(17, 100);
Bought(playerid, 300);
SendClientMessage(playerid, COLOR_YELLOW, "Se te ha descontado el 30%% por tener la licencia de armas.");
SetPlayerArmour(playerid, 100);
return 1;
}
else
{
Till(17, 100);
Bought(playerid, 400);
SetPlayerArmour(playerid, 100);
return 1;
}
}
else ShowAmmunation(playerid);
}
case AMMUNATION_MENU_LEC:
{
if(response)
{
switch(listitem)
{
case 0:
{
Till(17, 55);
Bought(playerid, 55);
Message(playerid, COLOR_WHITE, "Has comprado Ammunation's Weapon Guide, ve donde Raul Blanco.");
PlayerInfo[playerid][pLeccion] = 10;
return 1;
}
case 1:
{
Till(17, 45);
Bought(playerid, 45);
Message(playerid, COLOR_WHITE, "Has comprado Guнa Desert Eagle, ve donde Raul Blanco.");
PlayerInfo[playerid][pLeccion] = 15;
return 1;
}
case 2:
{
Till(17, 60);
Bought(playerid, 60);
Message(playerid, COLOR_WHITE, "Has comprado Lecciуn Shotgun I, ve donde Raul Blanco.");
PlayerInfo[playerid][pLeccion] = 20;
return 1;
}
case 3:
{
Till(17, 75);
Bought(playerid, 75);
Message(playerid, COLOR_WHITE, "Has comprado Lecciуn Shotgun II, ve donde Raul Blanco.");
PlayerInfo[playerid][pLeccion] = 21;
return 1;
}
case 4:
{
Till(17, 82);
Bought(playerid, 82);
Message(playerid, COLOR_WHITE, "Has comprado SubFusil-MP5 Guнa Toma I, ve donde Raul Blanco.");
PlayerInfo[playerid][pLeccion] = 30
return 1;
}
case 5:
{
Till(17, 89);
Bought(playerid, 89);
Message(playerid, COLOR_WHITE, "Has comprado SubFusil-MP5 Guнa Toma II, ve donde Raul Blanco.");
PlayerInfo[playerid][pLeccion] = 31;
return 1;
}
case 6:
{
Till(17, 95);
Bought(playerid, 95);
Message(playerid, COLOR_WHITE, "Has comprado Rifles de Asalto AK47-M4 I, ve donde Raul Blanco.");
PlayerInfo[playerid][pLeccion] = 40;
return 1;
}
case 7:
{
Till(17, 99);
Bought(playerid, 99);
Message(playerid, COLOR_WHITE, "Has comprado Rifles de Asalto AK47-M4 II, ve donde Raul Blanco.");
PlayerInfo[playerid][pLeccion] = 41;
return 1;
}
case 8:
{
Till(17, 129);
Bought(playerid, 129);
Message(playerid, COLOR_WHITE, "Has comprado Rifles de Asalto AK47-M4 III, ve donde Raul Blanco.");
PlayerInfo[playerid][pLeccion] = 42;
return 1;
}
}
}
else ShowAmmunation(playerid);
}