Guest User

Untitled

a guest
Jul 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. if(dialogid == 107)//Planet Pizza
  2. {
  3. if(response)
  4. {
  5. new Negocio = PlayerInfo[playerid][pMenuNegocio];
  6. new sendername[MAX_PLAYER_NAME];
  7. GetPlayerName(playerid, sendername, sizeof(sendername));
  8. new string[256];
  9. new Float:health;
  10. GetPlayerHealth(playerid, health);
  11. if(listitem == 0)
  12. {
  13. if(NegocioInfo[Negocio][nProd] >= 4)
  14. {
  15. NegocioInfo[Negocio][nProd] = NegocioInfo[Negocio][nProd]-4;
  16. NegocioInfo[Negocio][nCajaFuerte] += 20;
  17. SetPlayerHealth(playerid, health + 75);
  18. SendClientMessage(playerid, COLOR_GRAD2, "Has comprado una Pizza de Jamón y Queso por 20$");
  19. Dinero(playerid, -20);
  20. format(string, sizeof(string), "* %s coge su su bandeja de la encimera.", sendername);
  21. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  22. return 1;
  23. }
  24. else
  25. {
  26. SendClientMessage(playerid, COLOR_GRAD2, "Sin existencias");
  27. }
  28. }
  29. if(listitem == 1)
  30. {
  31. if(NegocioInfo[Negocio][nProd] >= 4)
  32. {
  33. NegocioInfo[Negocio][nProd] = NegocioInfo[Negocio][nProd]-4;
  34. NegocioInfo[Negocio][nCajaFuerte] += 20;
  35. SetPlayerHealth(playerid, health + 75);
  36. SendClientMessage(playerid, COLOR_GRAD2, "Has comprado una Pizza de 4 Quesos por 20$");
  37. Dinero(playerid, -20);
  38. format(string, sizeof(string), "* %s coge su su bandeja de la encimera.", sendername);
  39. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  40. return 1;
  41. }
  42. else
  43. {
  44. SendClientMessage(playerid, COLOR_GRAD2, "Sin existencias");
  45. }
  46. }
  47. if(listitem == 2)
  48. {
  49. if(NegocioInfo[Negocio][nProd] >= 4)
  50. {
  51. NegocioInfo[Negocio][nProd] = NegocioInfo[Negocio][nProd]-4;
  52. NegocioInfo[Negocio][nCajaFuerte] += 20;
  53. SetPlayerHealth(playerid, health + 75);
  54. SendClientMessage(playerid, COLOR_GRAD2, "Has comprado una Pizza Barbacoa por 20$");
  55. Dinero(playerid, -20);
  56. format(string, sizeof(string), "* %s coge su su bandeja de la encimera.", sendername);
  57. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  58. return 1;
  59. }
  60. else
  61. {
  62. SendClientMessage(playerid, COLOR_GRAD2, "Sin existencias");
  63. }
  64. }
  65. if(listitem == 3)
  66. {
  67. if(NegocioInfo[Negocio][nProd] >= 4)
  68. {
  69. NegocioInfo[Negocio][nProd] = NegocioInfo[Negocio][nProd]-4;
  70. NegocioInfo[Negocio][nCajaFuerte] += 20;
  71. SetPlayerHealth(playerid, health + 75);
  72. SendClientMessage(playerid, COLOR_GRAD2, "Has comprado una Pizza de Mozzarella por 20$");
  73. Dinero(playerid, -20);
  74. format(string, sizeof(string), "* %s coge su su bandeja de la encimera.", sendername);
  75. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  76. return 1;
  77. }
  78. else
  79. {
  80. SendClientMessage(playerid, COLOR_GRAD2, "Sin existencias");
  81. }
  82. }
  83. SetTimerEx("VidaBien", 1000, 0, "d", playerid);
  84. GuardarNegocio(Negocio);
  85. }
  86. }
Add Comment
Please, Sign In to add comment