Advertisement
Guest User

Untitled

a guest
May 8th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.45 KB | None | 0 0
  1.  
  2. for(new x = 1; x <= 12; x++){
  3.  
  4. if(playertextid == moPrev[playerid][x]) {
  5. if(Inventario[playerid] == 2) x = x+12;
  6. if(Inventario[playerid] == 3) x = x+24;
  7. if(Inventario[playerid] == 4) x = x+36;
  8. if(x != MAX_ITEMS) {
  9. if(ArmasGuardadas[playerid][x] < 1 && ItemID[playerid][x] == 0){
  10. //dialogGuardar(playerid);
  11. Selected[playerid][0] = 0;
  12. Selected[playerid][1] = 0;
  13. Selected[playerid][2] = x;
  14.  
  15. setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);
  16. ///SendClientMessage(playerid, COLOR_LIGHTRED, "* Não tem uma arma nesse slot!");
  17. PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  18. return 1;
  19. }
  20. /*if(ItemID[playerid][x] == 1252 && PlayerInfo[playerid][pExplosivos] < 1)
  21. {
  22. ItemID[playerid][x] = 0;
  23. }*/
  24. if(ItemID[playerid][x] > 0) {
  25.  
  26. Selected[playerid][0] = ItemID[playerid][x];
  27. if(IsAItem(playerid,Selected[playerid][0],0))
  28. Selected[playerid][1] = 1;
  29. else
  30. Selected[playerid][1] = 0;
  31. /*if(ItemID[playerid][x] == 1252)
  32. {
  33. Selected[playerid][1] = PlayerInfo[playerid][pExplosivos];
  34. }*/
  35. Selected[playerid][2] = x;
  36.  
  37. RotateTipItem(playerid,x);
  38.  
  39. setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);
  40.  
  41. PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
  42. return 1;
  43. }
  44. else {
  45. PlayerTextDrawSetPreviewRot(playerid, moEquipPrev[playerid], 180.000000, 160.000000, 360.000000, 2.099999);
  46. PlayerTextDrawSetPreviewModel(playerid, moEquipPrev[playerid], getidxModelSlot(playerid, x));
  47. PlayerTextDrawShow(playerid, moEquipPrev[playerid]);
  48. Selected[playerid][0] = ArmasGuardadas[playerid][x];
  49. if(IsAItem(playerid,Selected[playerid][0],0)) {
  50. Selected[playerid][0] = ArmasGuardadas[playerid][x];
  51. Selected[playerid][1] = BalasGuardadas[playerid][x];
  52. Selected[playerid][2] = x;
  53. }
  54.  
  55. setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);
  56.  
  57. PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
  58. return 1;
  59. }
  60. }
  61. }
  62. }
  63.  
  64. if(playertextid == moInfo[playerid]){
  65.  
  66. //nova info do item em breve
  67. }
  68.  
  69. else if(playertextid == moUse[playerid]) {
  70. ShowPlayerDialog(playerid, Dialog_Mouse, DIALOG_STYLE_LIST, \
  71. "{FFFFFF}Opçoes do Item",
  72. "Usar/Guardar\n\
  73. Dropar",
  74. "Selecionar", "Cancelar");
  75.  
  76. }
  77. else if(playertextid == moHelp[playerid]){
  78.  
  79. dialogHelp(playerid);
  80. }
  81. else if(playertextid == moListBox1[playerid]){
  82. if(PlayerInfo[playerid][pMochila] >= 1) {
  83. PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
  84. atualizarMochila(playerid,1);
  85. }
  86. }
  87. else if(playertextid == moListBox2[playerid]){
  88. if(PlayerInfo[playerid][pMochila] > 1) {
  89. PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
  90. atualizarMochila(playerid,2);
  91. }
  92. else {
  93. SendClientMessage(playerid, COLOR_GRAD4, "Sua Mochila deve ser Média para usar Este Inventório");
  94. }
  95. }
  96. else if(playertextid == moListBox3[playerid]){
  97. if(PlayerInfo[playerid][pMochila] > 2) {
  98. PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
  99. atualizarMochila(playerid,3);
  100. }
  101. else
  102. SendClientMessage(playerid, COLOR_GRAD4, "Sua Mochila deve ser Grande para usar Este Inventório");
  103. }
  104. else if(playertextid == moListBox4[playerid]){
  105. if(PlayerInfo[playerid][pMochila] > 3) {
  106. PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
  107. atualizarMochila(playerid,4);
  108. }
  109. else
  110. SendClientMessage(playerid, COLOR_GRAD4, "Sua Mochila deve ser Gigante para usar Este Inventório");
  111. }
  112.  
  113. else if(playertextid == moExit[playerid]){
  114. HideMochila(playerid);
  115. }
  116. }
  117. if(GetPVarInt(playerid, "vportamala")){
  118.  
  119. for(new x = 1; x != MAX_TRUNK_SLOTS; x++){
  120.  
  121. if(playertextid == pmPrev[playerid][x]){
  122.  
  123. if(vehTrunk[VeiculoPortaM[playerid]][x] < 1) {
  124. dialogGuardarPM(playerid);
  125. Selected[playerid][2] = x;
  126. ///SendClientMessage(playerid, COLOR_LIGHTRED, "* Não tem uma arma nesse slot!");
  127. PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  128. return 1;
  129. }
  130.  
  131. PlayerTextDrawSetPreviewModel(playerid, pmEquipPrev[playerid], getidxPMModelSlot(VeiculoPortaM[playerid], x));
  132. PlayerTextDrawShow(playerid, pmEquipPrev[playerid]);
  133.  
  134. Selected[playerid][0] = vehTrunk[VeiculoPortaM[playerid]][x];
  135. Selected[playerid][1] = vehTrunkAmmo[VeiculoPortaM[playerid]][x];
  136. Selected[playerid][2] = x;
  137.  
  138. setweaponpmNome(playerid, Selected[playerid][0], Selected[playerid][1]);
  139.  
  140. PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
  141. return 1;
  142. }
  143. }
  144. if(playertextid == pmPrev[playerid][8]) {
  145. PlayerTextDrawSetPreviewModel(playerid, pmEquipPrev[playerid], 1242);
  146. PlayerTextDrawShow(playerid, pmEquipPrev[playerid]);
  147.  
  148. Selected[playerid][0] = VeiculoPortaM[playerid];
  149. setItenpmNome(playerid, 8, Selected[playerid][0]);
  150. Selected[playerid][2] = 8;
  151. PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
  152. }
  153. if(playertextid == pmPrev[playerid][9])
  154. {
  155. PlayerTextDrawSetPreviewModel(playerid, pmEquipPrev[playerid], 1279);
  156. PlayerTextDrawShow(playerid, pmEquipPrev[playerid]);
  157.  
  158. Selected[playerid][0] = VeiculoPortaM[playerid];
  159. setItenpmNome(playerid, 9, Selected[playerid][0]);
  160. Selected[playerid][2] = 9;
  161. PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
  162. }
  163. if(playertextid == pmPrev[playerid][10])
  164. {
  165. PlayerTextDrawSetPreviewModel(playerid, pmEquipPrev[playerid], 1579);
  166. PlayerTextDrawShow(playerid, pmEquipPrev[playerid]);
  167.  
  168. Selected[playerid][0] = VeiculoPortaM[playerid];
  169. setItenpmNome(playerid, 10, Selected[playerid][0]);
  170. Selected[playerid][2] = 10;
  171. PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
  172. }
  173. if(playertextid == pmDescart[playerid])
  174. {
  175. new thestring[128];
  176. new result = VeiculoPortaM[playerid];
  177. if(Selected[playerid][2] == 8)
  178. {
  179. if(GetPlayerArmourEx(playerid) > 0)
  180. {
  181. if(vehTrunkArmour[result] >= 500.000) return SendClientMessage(playerid, COLOR_GRAD1, " Seu Porta-malas só suporta 5 Coletes!");
  182. vehTrunkArmour[result] += GetPlayerArmourEx(playerid);
  183. SetPlayerArmour(playerid, 0);
  184. format(thestring, sizeof(thestring), "%s tirou o colete e colocou no porta-malas do carro.", NomePlayer(playerid));
  185. SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  186. setItenpmNome(playerid, 8, result);
  187. return 1;
  188. }
  189. else
  190. return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhum colete ");
  191. }
  192. else if(Selected[playerid][2] == 9)
  193. {
  194. if(PlayerInfo[playerid][pDrogas] != 0)
  195. {
  196. vehTrunkDroga[result] += PlayerInfo[playerid][pDrogas];
  197. PlayerInfo[playerid][pDrogas] = 0;
  198. format(thestring, sizeof(thestring), "%s colocou todas sua Maconha no porta-malas do carro.", NomePlayer(playerid));
  199. SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  200. setItenpmNome(playerid, 9, result);
  201. return 1;
  202. }
  203. else
  204. return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhuma droga para por no porta-malas.");
  205.  
  206. }
  207. else if(Selected[playerid][2] == 10)
  208. {
  209. if(PlayerInfo[playerid][pMats] != 0)
  210. {
  211. vehTrunkMaterial[result] += PlayerInfo[playerid][pMats];
  212. PlayerInfo[playerid][pMats] = 0;
  213.  
  214. format(thestring, sizeof(thestring), "%s colocou todos seus materiais no porta-malas do carro.", NomePlayer(playerid));
  215. SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  216. setItenpmNome(playerid, 10, result);
  217. return 1;
  218. }
  219. else
  220. return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhum material para por no porta-malas.");
  221. }
  222. }
  223. else if(playertextid == pmEquip[playerid])
  224. {
  225. new thestring[128];
  226. new result = VeiculoPortaM[playerid];
  227. if(Selected[playerid][2] == 8)
  228. {
  229. if(vehTrunkArmour[result] >= 100.000)
  230. {
  231. vehTrunkArmour[result] -= 100.000;
  232. SetPlayerArmour(playerid, 100);
  233. format(thestring, sizeof(thestring), "%s Pegou um colete que estava no porta-malas do carro.", NomePlayer(playerid));
  234. SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  235. setItenpmNome(playerid, 8, result);
  236. return 1;
  237. }
  238. else
  239. return SendClientMessage(playerid, COLOR_GRAD1, " Seu Porta-malas está sem Colete suficiente para lhe dar.");
  240. }
  241. else if(Selected[playerid][2] == 9)
  242. {
  243. if(vehTrunkDroga[result] > 0)
  244. {
  245. PlayerInfo[playerid][pDrogas] += vehTrunkDroga[result];
  246. vehTrunkDroga[result] = 0;
  247. format(thestring, sizeof(thestring), "%s pegou toda sua Maconha no porta-malas do carro.", NomePlayer(playerid));
  248. SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  249. setItenpmNome(playerid, 9, result);
  250. return 1;
  251. }
  252. else
  253. return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhuma droga para pegar no porta-malas.");
  254. }
  255. else if(Selected[playerid][2] == 10) {
  256. if(vehTrunkMaterial[result] > 0) {
  257.  
  258. PlayerInfo[playerid][pMats] += vehTrunkMaterial[result];
  259. vehTrunkMaterial[result] = 0;
  260.  
  261. format(thestring, sizeof(thestring), "%s pegou todo seus material no porta-malas do carro.", NomePlayer(playerid));
  262. SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  263. setItenpmNome(playerid, 10, result);
  264. return 1;
  265. }
  266. else
  267. return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhum material para pegar no porta-malas.");
  268. }
  269. else if(Selected[playerid][0])
  270. {
  271. new string[85];
  272.  
  273. GivePlayerWeapon(playerid, Selected[playerid][0], Selected[playerid][1]);
  274.  
  275. format(string, sizeof string, "Você pegou uma arma %s com %d balas!",NomeArma(Selected[playerid][0]),vehTrunkAmmo[VeiculoPortaM[playerid]][Selected[playerid][2]]);
  276. SendClientMessage(playerid, COLOR_R, string);
  277. Sound(playerid, 36401, 30.0);
  278. format(string, sizeof(string), "* %s pegou uma arma do Porta Malas", NomeArma(Selected[playerid][0]));
  279. SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  280.  
  281. vehTrunk[VeiculoPortaM[playerid]][Selected[playerid][2]] = 0;
  282. vehTrunkAmmo[VeiculoPortaM[playerid]][Selected[playerid][2]] = 0;
  283.  
  284. atualizarPortaMala(playerid);
  285.  
  286. Selected[playerid][0] = 0;
  287. Selected[playerid][1] = 0;
  288. Selected[playerid][2] = 0;
  289.  
  290. setweaponpmNome(playerid, 0, 0);
  291. }
  292. else
  293. {
  294. SendClientMessage(playerid, COLOR_LIGHTRED, "* Você ainda não selecionou uma arma!");
  295. PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  296. }
  297. }
  298.  
  299. else if(playertextid == pmHelp[playerid]){
  300.  
  301. dialogHelp(playerid);
  302. }
  303.  
  304. else if(playertextid == pmExit[playerid]){
  305.  
  306. HidePortaMala(playerid);
  307. }
  308. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement