Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.76 KB | None | 0 0
  1. public Police_ammunation(playerid, menu_id)
  2. {
  3. new
  4. string[200];
  5.  
  6. switch(menu_id)
  7. {
  8. case 0:
  9. {
  10. format(string, sizeof(string),"Prendre un gilet (%d)\n\
  11. Armes non létales\n\
  12. Armes type DEAGLE\n\
  13. Armes type SHOTGUN\n\
  14. Armes type MP5\n\
  15. Armes type M4\n\
  16. Armes type RIFLE/SNIPER",
  17. Job_infos[JOB_LSPD_ID][j_Amount][0]);
  18. return Dialog(playerid, DIALOG_POL_AMMU, DIALOG_STYLE_TABLIST, "Police/Armurerie", string, "Ok", "Retour");
  19. }
  20. case 1: // Gilets
  21. {
  22. format(string, sizeof(string),"> "HEX_GREY"Gilets: "HEX_WHITE"%d\nGilet kevlar basique\nGilet kevlar tactique \"SWAT\" noir\nGilet kevlar tactique gris\nGilet kevlar tactique\"POLICE\" noir", Job_infos[JOB_LSPD_ID][j_Amount][0]);
  23. return Dialog(playerid, DIALOG_POL_AMMU_ARMOR, DIALOG_STYLE_TABLIST, "Police/Armurerie", string, "Ok", "Retour");
  24. }
  25. case 2: // Armes non létales
  26. {
  27. format(string, sizeof(string),"%d\tTazer\n\
  28. %d\tBeanbag\n\
  29. %d\tMatraque\n\
  30. %d\tCaméra\n\
  31. %d\tGazeuze\n\
  32. %d\tRadar\n\
  33. %d\nGrenade fumigène",
  34. Job_infos[JOB_LSPD_ID][j_Amount][1],
  35. Job_infos[JOB_LSPD_ID][j_Amount][2],
  36. Job_infos[JOB_LSPD_ID][j_Amount][3],
  37. Job_infos[JOB_LSPD_ID][j_Amount][4],
  38. Job_infos[JOB_LSPD_ID][j_Amount][5],
  39. Job_infos[JOB_LSPD_ID][j_Amount][14],
  40. Job_infos[JOB_LSPD_ID][j_Amount][20]);
  41. return Dialog(playerid, DIALOG_POL_AMMU_1, DIALOG_STYLE_TABLIST, "Police/Armurerie", string, "Ok", "Retour");
  42. }
  43. case 3: // Type DEAGLE
  44. {
  45. format(string, sizeof(string),""HEX_GREY"[Prendre un chargeur (%d)]\t\n\
  46. %d\tUSP\n\
  47. %d\tGlock\n\
  48. %d\tSW38\n\
  49. %d\tSig Sauer",
  50. Job_infos[JOB_LSPD_ID][j_Ammo][0],
  51. Job_infos[JOB_LSPD_ID][j_Amount][6],
  52. Job_infos[JOB_LSPD_ID][j_Amount][7],
  53. Job_infos[JOB_LSPD_ID][j_Amount][15],
  54. Job_infos[JOB_LSPD_ID][j_Amount][16]);
  55. return Dialog(playerid, DIALOG_POL_AMMU_2, DIALOG_STYLE_TABLIST, "Police/Armurerie", string, "Ok", "Retour");
  56. }
  57. case 4: // Type SHOTGUN
  58. {
  59. format(string, sizeof(string),""HEX_GREY"[Prendre un chargeur (%d)]\t\n\
  60. %d\tBennelli M3\n\
  61. %d\tRemington 870",
  62. Job_infos[JOB_LSPD_ID][j_Ammo][1],
  63. Job_infos[JOB_LSPD_ID][j_Amount][8],
  64. Job_infos[JOB_LSPD_ID][j_Amount][9]);
  65. return Dialog(playerid, DIALOG_POL_AMMU_3, DIALOG_STYLE_TABLIST, "Police/Armurerie", string, "Ok", "Retour");
  66. }
  67. case 5: // Type MP5
  68. {
  69. format(string, sizeof(string),""HEX_GREY"[Prendre un chargeur (%d)]\t\n\
  70. %d\tP90\n\
  71. %d\tUMP",
  72. Job_infos[JOB_LSPD_ID][j_Ammo][2],
  73. Job_infos[JOB_LSPD_ID][j_Amount][10],
  74. Job_infos[JOB_LSPD_ID][j_Amount][11]);
  75. return Dialog(playerid, DIALOG_POL_AMMU_4, DIALOG_STYLE_TABLIST, "Police/Armurerie", string, "Ok", "Retour");
  76. }
  77. case 6: // Type M4
  78. {
  79. format(string, sizeof(string),""HEX_GREY"[Prendre un chargeur (%d)]\t\n\
  80. %d\tM422\n\
  81. %d\tM4A2",
  82. Job_infos[JOB_LSPD_ID][j_Ammo][3],
  83. Job_infos[JOB_LSPD_ID][j_Amount][12],
  84. Job_infos[JOB_LSPD_ID][j_Amount][13]);
  85. return Dialog(playerid, DIALOG_POL_AMMU_5, DIALOG_STYLE_TABLIST, "Police/Armurerie", string, "Ok", "Retour");
  86. }
  87. case 7: // Type SNIPER/RIFLE
  88. {
  89. format(string, sizeof(string),""HEX_GREY"[Prendre un chargeur (%d)]\t\n\
  90. %d\tRugermini (rifle)\n\
  91. %d\tPSG1 (sniper)\n\
  92. %d\tBarret M82 (sniper)",
  93. Job_infos[JOB_LSPD_ID][j_Ammo][4],
  94. Job_infos[JOB_LSPD_ID][j_Amount][17],
  95. Job_infos[JOB_LSPD_ID][j_Amount][18],
  96. Job_infos[JOB_LSPD_ID][j_Amount][19]);
  97. return Dialog(playerid, DIALOG_POL_AMMU_6, DIALOG_STYLE_TABLIST, "Police/Armurerie", string, "Ok", "Retour");
  98. }
  99.  
  100. }
  101. return true;
  102. }
  103.  
  104. public Police_stock(playerid, menu_id)
  105. {
  106. new
  107. string[512],
  108. slot;
  109.  
  110. switch(menu_id)
  111. {
  112. case 0:
  113. {
  114. return Dialog(playerid, DIALOG_POL_STORE, DIALOG_STYLE_LIST, "Police/Store", ""HEX_GREY"[Ranger un objet dans le store]\nMatériel individuel\nMatériel routier", "Ok", "Retour");
  115. }
  116. // Rendre un objet
  117. case 1:
  118. {
  119. if(!Player_infos[playerid][p_Slot][SLOT_HANDS])
  120. return errorMessage(playerid, "Vous n'avez rien en main.");
  121.  
  122. switch(Player_infos[playerid][p_Slot][SLOT_HANDS])
  123. {
  124. case OBJECT_ID_ROAD_SIGN_1: slot = 0;
  125. case OBJECT_ID_CONE: slot = 1;
  126. case OBJECT_ID_ROAD_BARRIER_1: slot = 2;
  127. case OBJECT_ID_ROAD_BARRIER_2: slot = 3;
  128. case OBJECT_ID_ROAD_SIGN_2: slot = 4;
  129. case OBJECT_ID_POLICE_CAP: slot = 5;
  130. case OBJECT_ID_POLICE_MOTOR: slot = 6;
  131. case OBJECT_ID_POLICE_HAT_1: slot = 7;
  132. case OBJECT_ID_POLICE_HAT_2: slot = 8;
  133. case OBJECT_ID_POLICE_HOLSTER: slot = 9;
  134. case OBJECT_ID_POLICE_SWAT: slot = 10;
  135. case OBJECT_ID_POLICE_SHIELD: slot = 11;
  136. case OBJECT_ID_POLICE_HAT_VISOR: slot = 12;
  137. case OBJECT_ID_LAMP: slot = 13;
  138. case OBJECT_ID_ORANGE_VEST: slot = 14;
  139. case OBJECT_ID_SPIKE: slot = 15;
  140. case CUSTOM_ID_GAZ_MASK: slot = 16;
  141. case CUSTOM_ID_SWAT_HELMET: slot = 17;
  142. case CUSTOM_ID_RIOT_HELMET: slot = 18;
  143. default: return errorMessage(playerid, "Cet objet ne peut pas être ranger dans le store.");
  144. }
  145. Job_infos[JOB_LSPD_ID][j_Store][slot]++;
  146. format(string, sizeof(string),"Vous avez rangé un(e) %s dans le store.",Object_get_name(Player_infos[playerid][p_Slot][SLOT_HANDS]));
  147. Message(playerid, CIM3, string);
  148. Player_remove_object(playerid, SLOT_HANDS);
  149. Job_update(JOB_LSPD_ID);
  150. Police_stock(playerid, 0);
  151.  
  152. format(string, sizeof(string),"[STOCK] %s a rangé un(e) %s dans le store", GetLogName(playerid), Object_get_name(Player_infos[playerid][p_Slot][SLOT_HANDS]));
  153. Job_log(string, JOB_LSPD_ID);
  154.  
  155. }
  156. // Matériel individuel
  157. case 2:
  158. {
  159.  
  160. format(string, sizeof(string),"%d\tCasquette\n\
  161. %d\tCasque de motard\n\
  162. %d\tChapeau marron\n\
  163. %d\tChapeau noir\n\
  164. %d\tHolster\n\
  165. %d\tCasque SWAT (1)\n\
  166. %d\tBouclier anti-émeute\n\
  167. %d\tChapeau à visière\n\
  168. %d\tLampe torche\n\
  169. %d\tGilet orange\n\
  170. %d\tCasque SWAT (2)\n\
  171. %d\tMasque à gaz\n\
  172. %d\tCasque anti-émeute",
  173. Job_infos[JOB_LSPD_ID][j_Store][5],
  174. Job_infos[JOB_LSPD_ID][j_Store][6],
  175. Job_infos[JOB_LSPD_ID][j_Store][7],
  176. Job_infos[JOB_LSPD_ID][j_Store][8],
  177. Job_infos[JOB_LSPD_ID][j_Store][9],
  178. Job_infos[JOB_LSPD_ID][j_Store][10],
  179. Job_infos[JOB_LSPD_ID][j_Store][11],
  180. Job_infos[JOB_LSPD_ID][j_Store][12],
  181. Job_infos[JOB_LSPD_ID][j_Store][13],
  182. Job_infos[JOB_LSPD_ID][j_Store][14],
  183. Job_infos[JOB_LSPD_ID][j_Store][17],
  184. Job_infos[JOB_LSPD_ID][j_Store][16],
  185. Job_infos[JOB_LSPD_ID][j_Store][18]);
  186. return Dialog(playerid, DIALOG_POL_STORE_2, DIALOG_STYLE_TABLIST, "Police/Store/Matériel individuel", string, "Ok", "Retour");
  187. }
  188. // Matériel routier
  189. case 3:
  190. {
  191. format(string, sizeof(string),"%d\tPanneau routier\n\
  192. %d\tCône\n\
  193. %d\tBarrière routière (1)\n\
  194. %d\tBarrière routière (2)\n\
  195. %d\tPanneau routier \"route fermée\"\n\
  196. %d\tHerse",
  197. Job_infos[JOB_LSPD_ID][j_Store][0],
  198. Job_infos[JOB_LSPD_ID][j_Store][1],
  199. Job_infos[JOB_LSPD_ID][j_Store][2],
  200. Job_infos[JOB_LSPD_ID][j_Store][3],
  201. Job_infos[JOB_LSPD_ID][j_Store][4],
  202. Job_infos[JOB_LSPD_ID][j_Store][15]);
  203. return Dialog(playerid, DIALOG_POL_STORE_3, DIALOG_STYLE_TABLIST, "Police/Store/Matériel routier", string, "Ok", "Retour");
  204. }
  205. }
  206. return true;
  207. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement