Advertisement
Guest User

Untitled

a guest
Apr 11th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.83 KB | None | 0 0
  1. CMD:order(playerid, params[]) {
  2.  
  3. if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
  4. {
  5. new result[30];
  6. if(!PlayerToPoint(100.0, playerid, -2158.6482,642.3111,1052.3750)) return SendClientMessage(playerid, COLOR_GREY, "Nu esti in HQ!");
  7. if(PlayerHit[playerid] == -1) return SCM(playerid, COLOR_LGREEN, "Eroare: Poti lua arme doar atunci cand ai un contract!");
  8. if(sscanf(params, "s[30]", result)) {
  9. SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/order <id>");
  10. SendClientMessage(playerid, COLOR_WHITE, "1. Knife (10 $) | 2. SD-Pistol (100 $) | 3. Sniper (200 $)");
  11. return 1;
  12. }
  13. if(PlayerInfo[playerid][pGunLic] == 0) return SCM(playerid,-1,"Nu ai licenta de arme!");
  14. if(strcmp(result,"1",true) == 0) {
  15. if(GetPlayerCash(playerid) < 10) return 1;
  16. ServerWeapon(playerid, 4, 200);
  17. SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un cutit la pretul de 10$.");
  18. GivePlayerCash(playerid, -10);
  19. return 1;
  20. }
  21. else if(strcmp(result,"2",true) == 0) {
  22. if(GetPlayerCash(playerid) < 100) return 1;
  23. ServerWeapon(playerid, 23, 200);
  24. SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un SD-Pistol la pretul de 100$.");
  25. GivePlayerCash(playerid, -100);
  26. return 1;
  27. }
  28. else if(strcmp(result,"3",true) == 0) {
  29. if(GetPlayerCash(playerid) < 200) return 1;
  30. ServerWeapon(playerid, 34, 200);
  31. SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un Sniper la pretul de 200$.");
  32. GivePlayerCash(playerid, -200);
  33. return 1;
  34. }
  35. else return SendClientMessage(playerid, COLOR_GREY, "Invalid id!");
  36. }
  37. if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 ||
  38. PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
  39. {
  40. if(PlayerInfo[playerid][pGunLic] == 0) return SendClientMessage(playerid, COLOR_LGREEN, "Eroare: Nu ai licenta de arme. Cauta un instructor pentru a obtine licenta.");
  41. if(GetPlayerInterior(playerid) == 0) return SendClientMessage(playerid, COLOR_WHITE,"Nu esti in HQ.");
  42. if(!IsAtOrderPlace(playerid)) return 1;
  43. //if(InWar[PlayerInfo[playerid][pMember]] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Poti lua arme doar atunci cand mafia ta are un razboi!");
  44. new result[180];
  45. new x = PlayerInfo[playerid][pMember]-1;
  46. if(SafeInfo[x][sMaterials] < 1) return SCM(playerid, COLOR_CLIENT, "Nu sunt suficiente materiale in seif!");
  47. if(SafeInfo[x][sMoney] < 1) return SCM(playerid, COLOR_CLIENT, "Nu sunt suficienti bani in seif!");
  48. if(sscanf(params, "s[30]", result)) {
  49. SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/order <id>");
  50. SCM(playerid, COLOR_GRAD3, "1. Deagle - 200 ammo - 220$ - 200 mats");
  51. SCM(playerid, COLOR_GRAD3, "2. M4 - 600 ammo - 310$ - 320 mats");
  52. SCM(playerid, COLOR_GRAD3, "3. AK47 - 600 ammo - 300$ - 320 mats");
  53. SCM(playerid, COLOR_GRAD3, "4. Rifle - 300 ammo - 535$ - 400 mats");
  54. SCM(playerid, COLOR_GRAD3, "5. TEC9 - 400 ammo - 450$ - 370 mats");
  55. SCM(playerid, COLOR_GRAD3, "6. Combat Shotgun - 200 ammo - 530$ - 250 mats");
  56. return 1;
  57. }
  58. if(PlayerInfo[playerid][pGunLic] == 0) return SCM(playerid,-1,"Nu ai licenta de arme!");
  59. if(strcmp(result,"1",true) == 0) {
  60. ServerWeapon(playerid, 24, 200);
  61. SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un deagle la pretul de 220$.");
  62. SafeInfo[x][sMaterials] -= 200;
  63. SafeInfo[x][sMoney] -= 220;
  64. }
  65. else if(strcmp(result,"2",true) == 0) {
  66. ServerWeapon(playerid, 31, 600);
  67. SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un M4 la pretul de 310$.");
  68. SafeInfo[x][sMaterials] -= 320;
  69. SafeInfo[x][sMoney] -= 310;
  70. }
  71. else if(strcmp(result,"3",true) == 0) {
  72. ServerWeapon(playerid, 30,600);
  73. SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un AK47 la pretul de 300$.");
  74. SafeInfo[x][sMaterials] -= 320;
  75. SafeInfo[x][sMoney] -= 300;
  76. }
  77. else if(strcmp(result,"4",true) == 0) {
  78. ServerWeapon(playerid, 33, 300);
  79. SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un Rifle la pretul de 535$.");
  80. SafeInfo[x][sMaterials] -= 400;
  81. SafeInfo[x][sMoney] -= 535;
  82. }
  83. else if(strcmp(result,"5",true) == 0) {
  84. ServerWeapon(playerid, 32, 400);
  85. SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un TEC9 la pretul de 450$.");
  86. SafeInfo[x][sMaterials] -= 370;
  87. SafeInfo[x][sMoney] -= 450;
  88. }
  89. else if(strcmp(result,"6",true) == 0) {
  90. ServerWeapon(playerid, 27, 200);
  91. SendClientMessage(playerid, COLOR_MONEY, "Ti-ai cumparat un Combat Shotgun la pretul de 530$.");
  92. SafeInfo[x][sMaterials] -= 250;
  93. SafeInfo[x][sMoney] -= 530;
  94. }
  95. }
  96. else SendClientMessage(playerid, COLOR_GREY, "Nu esti membrul unei mafii.");
  97. return 1;
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement