Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.28 KB | None | 0 0
  1. // # Definicoes #
  2. #include a_samp
  3. #define MAX_DROPS (5000) // Maximo de items spawandos + items dropados pelos jogadores!
  4. #define MAX_ITEM_NAME (24)
  5. #define _MapAndreas_Included
  6. #include <a_samp>
  7. #include <streamer>
  8. #include <foreach>
  9. #include <sscanf2>
  10.  
  11. // # Enumeradores #
  12.  
  13. enum Item_Data
  14. {
  15. Item_ID,
  16. Item_Obj,
  17. Item_Name[MAX_ITEM_NAME],
  18. Float:Item_RotX,
  19. Float:Item_RotY,
  20. Float:Item_RotZ,
  21. };
  22.  
  23. enum Drop_Data
  24. {
  25. DropItemID,
  26. DropObj,
  27. Text3D:DropLabel,
  28. Float:dPosX,
  29. Float:dPosY,
  30. Float:dPosZ,
  31. };
  32.  
  33. new DropInfo[MAX_DROPS][Drop_Data];
  34.  
  35. // # Arrays #
  36.  
  37. /* Agradecimento ao Marttins por procurar os objetos */
  38. new ItemInfo[][Item_Data] =
  39. {
  40. /* id, objeto, nome, rotacao x, rotacao y, rotacao z */
  41. /* ============ [ Mochilas ] ============ */
  42. {0, 3026, "Taloon Backpack", -88.399, 0.0, 0.0 },
  43. {1, 1310, "Hunting Backpack", -90.299, 0.0, 0.0 },
  44. {2, 19559, "Hiker Backpack", -91.799, 0.0, 0.0 },
  45. {3, 1550, "Drybag Backpack", 0.0, -94.899, 0.0 },
  46. /* ========== [ Items Medicos ] ========== */
  47. {4, 11738, "Medical Kit", 0.0, 0.0, 0.0 },
  48. {5, 11748, "Bandage", 0.0, 0.0, 0.0 },
  49. {6, 2752, "Morphine Injector", 0.0, 0.0, 0.0 },
  50. {7, 2709, "Painkiller", 0.0, 0.0, 0.0 },
  51. {8, 1580, "Blood Bag", 0.0, 0.0, 0.0 },
  52. /* ============= [ Bebidas ] ============= */
  53. {9, 19570, "Fresh Milk", 0.0, 0.0, 0.0 },
  54. {10, 2683, "Water Canteen", 0.0, 0.0, 0.0 },
  55. {11, 1546, "Sprunk Can", 0.0, 0.0, 0.0 },
  56. {12, 19823, "Whisky Bottle", 0.0, 0.0, 0.0 },
  57. {13, 19563, "Orange Juice", 0.0, 0.0, 0.0 },
  58. {14, 19564, "Apple Juice", 0.0, 0.0, 0.0 },
  59. {15, 19835, "Coffee", 0.0, 0.0, 0.0 },
  60. /* ============= [ Comidas ] ============= */
  61. {16, 19847, "Leg Ham", 0.0, 0.0, 0.0 },
  62. {17, 19883, "Bread Slice", 0.0, 0.0, 0.0 },
  63. {18, 2768, "Burger", 0.0, 0.0, 0.0 },
  64. {19, 19561, "Cereal Box", 0.0, 0.0, 0.0 },
  65. {20, 19580, "Pizza", 0.0, 0.0, 0.0 },
  66. {21, 2769, "Taco", 0.0, 0.0, 0.0 },
  67. {22, 19567, "Ice Cream", 0.0, 0.0, 0.0 },
  68. {23, 2858, "Chinese Food", 0.0, 0.0, 0.0 },
  69. {24, 19574, "Orange", 0.0, 0.0, 0.0 },
  70. {25, 19575, "Apple", 0.0, 0.0, 0.0 },
  71. {26, 19576, "Green Apple", 0.0, 0.0, 0.0 },
  72. {27, 19577, "Tomato", 0.0, 0.0, 0.0 },
  73. {28, 19578, "Banana", 0.0, 0.0, 0.0 },
  74. /* ============= [ Armas ] ============= */
  75. {29, 348, "Pistol .50", 90.0, 0.0, 0.0 },
  76. {30, 346, "Glock 19", 90.0, 0.0, 0.0 },
  77. {31, 347, "M9 SD", 90.0, 0.0, 0.0 },
  78. {32, 357, "Mosin 9130", 90.0, 0.0, 0.0 },
  79. {33, 358, "Hunting Rifle", 90.0, 0.0, 0.0 },
  80. {34, 356, "AR-15", 90.0, 0.0, 0.0 },
  81. {35, 355, "AKS-74U", 90.0, 0.0, 0.0 },
  82. {36, 349, "MP-133 Shotgun", 90.0, 0.0, 0.0 },
  83. {37, 350, "Sawed-off IZH-43", 90.0, 0.0, 0.0 },
  84. {38, 351, "Pump Shotgun", 90.0, 0.0, 0.0 },
  85. {39, 372, "CZ61 Skorpion", 90.0, 0.0, 0.0 },
  86. {40, 352, "PDW", 90.0, 0.0, 0.0 },
  87. {41, 353, "MP5-K", 90.0, 0.0, 0.0 },
  88. /* ============= [ Armas Brancas ] ============= */
  89. {42, 336, "Baseball Bat", 90.0, 0.0, 0.0 },
  90. {43, 339, "Sword", 90.0, 0.0, 0.0 },
  91. {44, 335, "Combat Knife", 90.0, 0.0, 0.0 },
  92. {45, 337, "Shovel", 90.0, 0.0, 0.0 },
  93. /* ============= [ Granadas ] ============= */
  94. {46, 342, "Frag Grenade", 0.0, 0.0, 0.0 },
  95. /* ============= [ Munições ] ============= */
  96. {47, 3013, "Assault Ammo", 0.0, 0.0, 0.0 },
  97. {48, 2043, "Shotgun Ammo", 0.0, 0.0, 0.0 },
  98. {49, 2042, "SMG Ammo", 0.0, 0.0, 0.0 },
  99. {50, 2037, "Pistol Ammo", 0.0, 0.0, 0.0 },
  100. {51, 2038, "Sniper Ammo", 0.0, 0.0, 0.0 },
  101. /* ============= [ Variados ] ============= */
  102. {52, 18875, "GPS", 0.0, 0.0, 0.0 },
  103. {53, 2386, "Clothing", 0.0, 0.0, 0.0 },
  104. {54, 1010, "Engine", 0.0, 0.0, 0.0 },
  105. {55, 19921, "Toolbox", 0.0, 0.0, 0.0 },
  106. {56, 2967, "Radio Device", 0.0, 0.0, 0.0 },
  107. {57, 19515, "Armour Vest", 90.0, 0.0, 0.0 },
  108. {58, 19472, "Gas Mask", 0.0, 0.0, 0.0 },
  109. {59, 19514, "Helmet", 0.0, 0.0, 0.0 },
  110. {60, 1650, "Fuel Canister", 90.0, 0.0, 0.0 },
  111. /* ============= [ Vazios ] ============= */
  112. {61, 2683, "Empty Water Canteen", 0.0, 0.0, 0.0 },
  113. {62, 1650, "Empty Fuel Canister", 90.0, 0.0, 0.0 }
  114. };
  115.  
  116.  
  117. // # Forwards #
  118.  
  119. forward Item_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
  120. forward Item_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
  121.  
  122. forward OnPlayerPickupItemFromDrop(playerid);
  123. forward OnPlayerUseItem(playerid, ItemName[]);
  124. forward OnPlayerDropItem(playerid, ItemName[]);
  125.  
  126. // # Callbacks #
  127.  
  128. public OnPlayerUseItem(playerid,ItemName[])
  129. {
  130. /* ============ [ Mochilas ] ============ */
  131. if(!strcmp(ItemName,"Taloon Backpack",true))
  132. {
  133. if(Player[playerid][pBackpack] > 10) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você já possui uma mochila maior.", "[INFO]: You already have a Larger Backpack!"));
  134. if(Player[playerid][pBackpack] == 10) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você já possui está mochila.", "[INFO]: You already have this Backpack!"));
  135. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  136. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~g~~h~Equiping....",1000,3);
  137. Player[playerid][pBackpack] = 10;
  138. SetPlayerObject(playerid);
  139. RemoveItem(playerid, ItemName, 1);
  140. return 0;
  141. }
  142.  
  143. if(!strcmp(ItemName,"Hunting Backpack",true))
  144. {
  145. if(Player[playerid][pBackpack] > 16) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você já possui uma mochila maior.", "[INFO]: You already have a Larger Backpack!"));
  146. if(Player[playerid][pBackpack] == 16) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você já possui está mochila.", "[INFO]: You already have this Backpack!"));
  147. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  148. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~g~~h~Equiping....",1000,3);
  149. Player[playerid][pBackpack] = 16;
  150. SetPlayerObject(playerid);
  151. RemoveItem(playerid, ItemName, 1);
  152. return 0;
  153. }
  154.  
  155. if(!strcmp(ItemName,"Hiker Backpack",true))
  156. {
  157. if(Player[playerid][pBackpack] > 24) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você já possui uma mochila maior.", "[INFO]: You already have a Larger Backpack!"));
  158. if(Player[playerid][pBackpack] == 24) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você já possui está mochila.", "[INFO]: You already have this Backpack!"));
  159. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  160. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~g~~h~Equiping....",1000,3);
  161. Player[playerid][pBackpack] = 24;
  162. SetPlayerObject(playerid);
  163. RemoveItem(playerid, ItemName, 1);
  164. return 0;
  165. }
  166.  
  167. if(!strcmp(ItemName,"Drybag Backpack",true))
  168. {
  169. if(Player[playerid][pBackpack] > 32) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você já possui uma mochila maior.", "[INFO]: You already have a Larger Backpack!"));
  170. if(Player[playerid][pBackpack] == 32) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você já possui está mochila.", "[INFO]: You already have this Backpack!"));
  171. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  172. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~g~~h~Equiping....",1000,3);
  173. Player[playerid][pBackpack] = 32;
  174. SetPlayerObject(playerid);
  175. RemoveItem(playerid, ItemName, 1);
  176. return 0;
  177. }
  178.  
  179. /* ========== [ Items Medicos ] ========== */
  180. if(!strcmp(ItemName,"Medical Kit",true))
  181. {
  182. if(Player[playerid][pQuebrado] == 1)
  183. {
  184. Player[playerid][pQuebrado] = 0;
  185. PlayerTextDrawHide(playerid, BrokenL[playerid]);
  186. }
  187.  
  188. if(pInfo[playerid][pSangrando] == 1)
  189. {
  190. pInfo[playerid][pSangrando] = 0;
  191. PlayerTextDrawHide(playerid, Bleed[playerid]);
  192. KillTimer(SangueTimer[playerid]);
  193. }
  194.  
  195. SetPlayerHealth(playerid, 100);
  196. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  197. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~r~~h~Healing....",1000,3);
  198. RemoveItem(playerid, ItemName, 1);
  199. }
  200.  
  201. if(!strcmp(ItemName,"Bandage",true))
  202. {
  203. if(pInfo[playerid][pSangrando] == 0) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está sangrando.", "[INFO]: You are not bleeding."));
  204.  
  205. pInfo[playerid][pSangrando] = 0;
  206. PlayerTextDrawHide(playerid, Bleed[playerid]);
  207. KillTimer(SangueTimer[playerid]);
  208.  
  209. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  210. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~r~~h~Healing....",1000,3);
  211. RemoveItem(playerid, ItemName, 1);
  212. }
  213.  
  214. if(!strcmp(ItemName,"Morphine Injector",true))
  215. {
  216. if(Player[playerid][pQuebrado] == 0) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Sua perna não está quebrada.", "[INFO]: Your leg is not broken."));
  217.  
  218. Player[playerid][pQuebrado] = 0;
  219. PlayerTextDrawHide(playerid, BrokenL[playerid]);
  220.  
  221. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  222. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~r~~h~Healing....",1000,3);
  223. RemoveItem(playerid, ItemName, 1);
  224. }
  225.  
  226. if(!strcmp(ItemName,"Painkiller",true))
  227. {
  228. SetPlayerDrunkLevel(playerid, 0);
  229. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  230. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~r~~h~Healing....",1000,3);
  231. RemoveItem(playerid, ItemName, 1);
  232. }
  233.  
  234. if(!strcmp(ItemName,"Blood Bag",true))
  235. {
  236. SetPlayerHealth(playerid, 100);
  237. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  238. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~r~~h~Healing....",1000,3);
  239. RemoveItem(playerid, ItemName, 1);
  240. }
  241.  
  242. /* ============= [ Bebidas ] ============= */
  243. if(!strcmp(ItemName,"Fresh Milk",true))
  244. {
  245. if(Player[playerid][pSede] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com sede.", "[INFO]: You are not thirsty."));
  246. Player[playerid][pSede] += 4;
  247. PlayerPlaySound(playerid, 42600, 0.0, 0.0, 0.0);
  248. ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.0,0,0,0,0,0,1);
  249. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~b~~h~Drinking....",1000,3);
  250. RemoveItem(playerid, ItemName, 1);
  251. }
  252.  
  253. if(!strcmp(ItemName,"Water Canteen",true))
  254. {
  255. if(Player[playerid][pSede] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com sede.", "[INFO]: You are not thirsty."));
  256. Player[playerid][pSede] += 8;
  257. PlayerPlaySound(playerid, 42600, 0.0, 0.0, 0.0);
  258. ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.0,0,0,0,0,0,1);
  259. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~b~~h~Drinking....",1000,3);
  260. AddItem(playerid, "Empty Water Canteen", 1);
  261. RemoveItem(playerid, ItemName, 1);
  262. }
  263.  
  264. if(!strcmp(ItemName,"Sprunk Can",true))
  265. {
  266. if(Player[playerid][pSede] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com sede.", "[INFO]: You are not thirsty."));
  267. Player[playerid][pSede] += 6;
  268. PlayerPlaySound(playerid, 42600, 0.0, 0.0, 0.0);
  269. ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.0,0,0,0,0,0,1);
  270. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~b~~h~Drinking....",1000,3);
  271. RemoveItem(playerid, ItemName, 1);
  272. }
  273.  
  274. if(!strcmp(ItemName,"Whisky Bottle",true))
  275. {
  276. if(Player[playerid][pSede] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com sede.", "[INFO]: You are not thirsty."));
  277. Player[playerid][pSede] += 4;
  278. PlayerPlaySound(playerid, 42600, 0.0, 0.0, 0.0);
  279. ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1,1);
  280. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~b~~h~Drinking....",1000,3);
  281. RemoveItem(playerid, ItemName, 1);
  282. }
  283.  
  284. if(!strcmp(ItemName,"Orange Juice",true))
  285. {
  286. if(Player[playerid][pSede] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com sede.", "[INFO]: You are not thirsty."));
  287. Player[playerid][pSede] += 3;
  288. PlayerPlaySound(playerid, 42600, 0.0, 0.0, 0.0);
  289. ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.0,0,0,0,0,0,1);
  290. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~b~~h~Drinking....",1000,3);
  291. RemoveItem(playerid, ItemName, 1);
  292. }
  293.  
  294. if(!strcmp(ItemName,"Apple Juice",true))
  295. {
  296. if(Player[playerid][pSede] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com sede.", "[INFO]: You are not thirsty."));
  297. Player[playerid][pSede] += 7;
  298. PlayerPlaySound(playerid, 42600, 0.0, 0.0, 0.0);
  299. ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.0,0,0,0,0,0,1);
  300. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~b~~h~Drinking....",1000,3);
  301. RemoveItem(playerid, ItemName, 1);
  302. }
  303.  
  304. if(!strcmp(ItemName,"Coffe Cup",true))
  305. {
  306. if(Player[playerid][pSede] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com sede.", "[INFO]: You are not thirsty."));
  307. Player[playerid][pSede] += 8;
  308. PlayerPlaySound(playerid, 42600, 0.0, 0.0, 0.0);
  309. ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.0,0,0,0,0,0,1);
  310. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~b~~h~Drinking....",1000,3);
  311. RemoveItem(playerid, ItemName, 1);
  312. }
  313.  
  314. /* ============= [ Comidas ] ============= */
  315. if(!strcmp(ItemName,"Leg Ham",true))
  316. {
  317. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  318. Player[playerid][pFome] += 6;
  319. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  320. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  321. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  322. RemoveItem(playerid, ItemName, 1);
  323. }
  324.  
  325. if(!strcmp(ItemName,"Bread Slice",true))
  326. {
  327. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  328. Player[playerid][pFome] += 2;
  329. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  330. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  331. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  332. RemoveItem(playerid, ItemName, 1);
  333. }
  334.  
  335. if(!strcmp(ItemName,"Burger",true))
  336. {
  337. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  338. Player[playerid][pFome] += 6;
  339. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  340. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  341. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  342. RemoveItem(playerid, ItemName, 1);
  343. }
  344.  
  345. if(!strcmp(ItemName,"Cereal Box",true))
  346. {
  347. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  348. Player[playerid][pFome] += 5;
  349. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  350. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  351. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  352. RemoveItem(playerid, ItemName, 1);
  353. }
  354.  
  355. if(!strcmp(ItemName,"Pizza",true))
  356. {
  357. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  358. Player[playerid][pFome] += 9;
  359. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  360. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  361. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  362. RemoveItem(playerid, ItemName, 1);
  363. }
  364.  
  365. if(!strcmp(ItemName,"Taco",true))
  366. {
  367. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  368. Player[playerid][pFome] += 3;
  369. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  370. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  371. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  372. RemoveItem(playerid, ItemName, 1);
  373. }
  374.  
  375. if(!strcmp(ItemName,"Ice Cream",true))
  376. {
  377. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  378. Player[playerid][pFome] += 5;
  379. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  380. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  381. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  382. RemoveItem(playerid, ItemName, 1);
  383. }
  384.  
  385. if(!strcmp(ItemName,"Chinese Food",true))
  386. {
  387. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  388. Player[playerid][pFome] += 4;
  389. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  390. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  391. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  392. RemoveItem(playerid, ItemName, 1);
  393. }
  394.  
  395. if(!strcmp(ItemName,"Orange",true))
  396. {
  397. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  398. Player[playerid][pFome] += 6;
  399. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  400. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  401. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  402. RemoveItem(playerid, ItemName, 1);
  403. }
  404.  
  405. if(!strcmp(ItemName,"Apple",true))
  406. {
  407. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  408. Player[playerid][pFome] += 3;
  409. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  410. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  411. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  412. RemoveItem(playerid, ItemName, 1);
  413. }
  414.  
  415. if(!strcmp(ItemName,"Green Apple",true))
  416. {
  417. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  418. Player[playerid][pFome] += 4;
  419. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  420. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  421. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  422. RemoveItem(playerid, ItemName, 1);
  423. }
  424.  
  425. if(!strcmp(ItemName,"Tomato",true))
  426. {
  427. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  428. Player[playerid][pFome] += 5;
  429. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  430. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  431. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  432. RemoveItem(playerid, ItemName, 1);
  433. }
  434.  
  435. if(!strcmp(ItemName,"Banana",true))
  436. {
  437. if(Player[playerid][pFome] >= 100) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[INFO]: Você não está com fome.", "[INFO]: You are not hungry."));
  438. Player[playerid][pFome] += 3;
  439. PlayerPlaySound(playerid, 42601, 0.0, 0.0, 0.0);
  440. ApplyAnimation(playerid,"FOOD","EAT_Burger", 4.0,0,0,0,0,0,1);
  441. GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~y~~h~Eating....",1000,3);
  442. RemoveItem(playerid, ItemName, 1);
  443. }
  444.  
  445. /* ============= [ Armas ] ============= */
  446. if(!strcmp(ItemName,"Pistol .50",true))
  447. {
  448. RemoveItem(playerid, ItemName, 1);
  449. }
  450.  
  451. if(!strcmp(ItemName,"Glock 19",true))
  452. {
  453. RemoveItem(playerid, ItemName, 1);
  454. }
  455.  
  456. if(!strcmp(ItemName,"M9 SD",true))
  457. {
  458. RemoveItem(playerid, ItemName, 1);
  459. }
  460.  
  461. if(!strcmp(ItemName,"Mosin 9130",true))
  462. {
  463. RemoveItem(playerid, ItemName, 1);
  464. }
  465.  
  466. if(!strcmp(ItemName,"Hunting Rifle",true))
  467. {
  468. RemoveItem(playerid, ItemName, 1);
  469. }
  470.  
  471. if(!strcmp(ItemName,"AR-15",true))
  472. {
  473. RemoveItem(playerid, ItemName, 1);
  474. }
  475.  
  476. if(!strcmp(ItemName,"AKS-74U",true))
  477. {
  478. RemoveItem(playerid, ItemName, 1);
  479. }
  480.  
  481. if(!strcmp(ItemName,"MP-133 Shotgun",true))
  482. {
  483. RemoveItem(playerid, ItemName, 1);
  484. }
  485.  
  486. if(!strcmp(ItemName,"Sawed-off IZH-43",true))
  487. {
  488. RemoveItem(playerid, ItemName, 1);
  489. }
  490.  
  491. if(!strcmp(ItemName,"Pump Shotgun",true))
  492. {
  493. RemoveItem(playerid, ItemName, 1);
  494. }
  495.  
  496. if(!strcmp(ItemName,"CZ61 Skorpion",true))
  497. {
  498. RemoveItem(playerid, ItemName, 1);
  499. }
  500.  
  501. if(!strcmp(ItemName,"PDW",true))
  502. {
  503. RemoveItem(playerid, ItemName, 1);
  504. }
  505.  
  506. if(!strcmp(ItemName,"MP5-K",true))
  507. {
  508. RemoveItem(playerid, ItemName, 1);
  509. }
  510.  
  511. /* ============= [ Armas Brancas ] ============= */
  512. if(!strcmp(ItemName,"Baseball Bat",true))
  513. {
  514. GivePlayerWeapon(playerid, 5, 1);
  515. RemoveItem(playerid, ItemName, 1);
  516. }
  517.  
  518. if(!strcmp(ItemName,"Sword",true))
  519. {
  520. RemoveItem(playerid, ItemName, 1);
  521. }
  522.  
  523. if(!strcmp(ItemName,"Combat Knife",true))
  524. {
  525. GivePlayerWeapon(playerid, 4, 1);
  526. RemoveItem(playerid, ItemName, 1);
  527. }
  528.  
  529. if(!strcmp(ItemName,"Shovel",true))
  530. {
  531. GivePlayerWeapon(playerid, 6, 1);
  532. RemoveItem(playerid, ItemName, 1);
  533. }
  534.  
  535. /* ============= [ Granadas ] ============= */
  536. if(!strcmp(ItemName,"Frag Grenade",true))
  537. {
  538. RemoveItem(playerid, ItemName, 1);
  539. }
  540.  
  541. /* ============= [ Munições ] ============= */
  542. if(!strcmp(ItemName,"Assault Ammo",true))
  543. {
  544. RemoveItem(playerid, ItemName, 1);
  545. }
  546.  
  547. if(!strcmp(ItemName,"Shotgun Ammo",true))
  548. {
  549. RemoveItem(playerid, ItemName, 1);
  550. }
  551.  
  552. if(!strcmp(ItemName,"SMG Ammo",true))
  553. {
  554. RemoveItem(playerid, ItemName, 1);
  555. }
  556.  
  557. if(!strcmp(ItemName,"Pistol Ammo",true))
  558. {
  559. RemoveItem(playerid, ItemName, 1);
  560. }
  561.  
  562. if(!strcmp(ItemName,"Sniper Ammo",true))
  563. {
  564. RemoveItem(playerid, ItemName, 1);
  565. }
  566.  
  567. /* ============= [ Variados ] ============= */
  568. if(!strcmp(ItemName,"GPS",true))
  569. {
  570. RemoveItem(playerid, ItemName, 1);
  571. }
  572.  
  573. if(!strcmp(ItemName,"Clothing",true))
  574. {
  575. RemoveItem(playerid, ItemName, 1);
  576. }
  577.  
  578. if(!strcmp(ItemName,"Engine",true))
  579. {
  580. RemoveItem(playerid, ItemName, 1);
  581. }
  582.  
  583. if(!strcmp(ItemName,"Toolbox",true))
  584. {
  585. RemoveItem(playerid, ItemName, 1);
  586. }
  587.  
  588. if(!strcmp(ItemName,"Radio Device",true))
  589. {
  590. RemoveItem(playerid, ItemName, 1);
  591. }
  592.  
  593. if(!strcmp(ItemName,"Armour Vest",true))
  594. {
  595. RemoveItem(playerid, ItemName, 1);
  596. }
  597.  
  598. if(!strcmp(ItemName,"Gas Mask",true))
  599. {
  600. RemoveItem(playerid, ItemName, 1);
  601. }
  602.  
  603. if(!strcmp(ItemName,"Helmet",true))
  604. {
  605. RemoveItem(playerid, ItemName, 1);
  606. }
  607.  
  608. if(!strcmp(ItemName,"Fuel Canister",true))
  609. {
  610. RemoveItem(playerid, ItemName, 1);
  611. }
  612.  
  613. /* ============= [ Vazios ] ============= */
  614. if(!strcmp(ItemName,"Empty Water Canteen",true))
  615. {
  616. RemoveItem(playerid, ItemName, 1);
  617. }
  618.  
  619. if(!strcmp(ItemName,"Empty Fuel Canister",true))
  620. {
  621. RemoveItem(playerid, ItemName, 1);
  622. }
  623. return 1; // Retornar verdadeiro = Voltar o Inventario apos usar o Item, Retornar falso = Fechar Inventario apos usar o item
  624. }
  625.  
  626. public OnPlayerDropItem(playerid, ItemName[])
  627. {
  628. new Float:X, Float:Y, Float:Z;
  629. GetPlayerPos(playerid, X, Y, Z);
  630.  
  631. SetPlayerPos(playerid, X+0.1, Y, Z), SetCameraBehindPlayer(playerid); // Fix no bug do item nao aparecer no chao quando dropado, teleportando o jogador +1 faz o objeto aparecer
  632.  
  633. GetXYInFrontOfPlayer(playerid, X, Y, 1.0);
  634.  
  635. /* ============ [ Mochilas ] ============ */
  636. if(!strcmp(ItemName,"Taloon Backpack",true))
  637. {
  638. RemoveItem(playerid, ItemName, 1);
  639. CreateDrop(0, X, Y, Z);
  640. }
  641.  
  642. if(!strcmp(ItemName,"Hunting Backpack",true))
  643. {
  644. RemoveItem(playerid, ItemName, 1);
  645. CreateDrop(1, X, Y, Z);
  646. }
  647.  
  648. if(!strcmp(ItemName,"Hiker Backpack",true))
  649. {
  650. RemoveItem(playerid, ItemName, 1);
  651. CreateDrop(2, X, Y, Z);
  652. }
  653.  
  654. if(!strcmp(ItemName,"Drybag Backpack",true))
  655. {
  656. RemoveItem(playerid, ItemName, 1);
  657. CreateDrop(3, X, Y, Z);
  658. }
  659.  
  660. /* ========== [ Items Medicos ] ========== */
  661. if(!strcmp(ItemName,"Medical Kit",true))
  662. {
  663. RemoveItem(playerid, ItemName, 1);
  664. CreateDrop(4, X, Y, Z);
  665. }
  666.  
  667. if(!strcmp(ItemName,"Bandage",true))
  668. {
  669. RemoveItem(playerid, ItemName, 1);
  670. CreateDrop(5, X, Y, Z);
  671. }
  672.  
  673. if(!strcmp(ItemName,"Morphine Injector",true))
  674. {
  675. RemoveItem(playerid, ItemName, 1);
  676. CreateDrop(6, X, Y, Z);
  677. }
  678.  
  679. if(!strcmp(ItemName,"Painkiller",true))
  680. {
  681. RemoveItem(playerid, ItemName, 1);
  682. CreateDrop(7, X, Y, Z);
  683. }
  684.  
  685. if(!strcmp(ItemName,"Blood Bag",true))
  686. {
  687. RemoveItem(playerid, ItemName, 1);
  688. CreateDrop(8, X, Y, Z);
  689. }
  690.  
  691. /* ============= [ Bebidas ] ============= */
  692. if(!strcmp(ItemName,"Fresh Milk",true))
  693. {
  694. RemoveItem(playerid, ItemName, 1);
  695. CreateDrop(9, X, Y, Z);
  696. }
  697.  
  698. if(!strcmp(ItemName,"Water Canteen",true))
  699. {
  700. RemoveItem(playerid, ItemName, 1);
  701. CreateDrop(10, X, Y, Z);
  702. }
  703.  
  704. if(!strcmp(ItemName,"Sprunk Can",true))
  705. {
  706. RemoveItem(playerid, ItemName, 1);
  707. CreateDrop(11, X, Y, Z);
  708. }
  709.  
  710. if(!strcmp(ItemName,"Whisky Bottle",true))
  711. {
  712. RemoveItem(playerid, ItemName, 1);
  713. CreateDrop(12, X, Y, Z);
  714. }
  715.  
  716. if(!strcmp(ItemName,"Orange Juice",true))
  717. {
  718. RemoveItem(playerid, ItemName, 1);
  719. CreateDrop(13, X, Y, Z);
  720. }
  721.  
  722. if(!strcmp(ItemName,"Apple Juice",true))
  723. {
  724. RemoveItem(playerid, ItemName, 1);
  725. CreateDrop(14, X, Y, Z);
  726. }
  727.  
  728. if(!strcmp(ItemName,"Coffe Cup",true))
  729. {
  730. RemoveItem(playerid, ItemName, 1);
  731. CreateDrop(15, X, Y, Z);
  732. }
  733.  
  734. /* ============= [ Comidas ] ============= */
  735. if(!strcmp(ItemName,"Leg Ham",true))
  736. {
  737. RemoveItem(playerid, ItemName, 1);
  738. CreateDrop(16, X, Y, Z);
  739. }
  740.  
  741. if(!strcmp(ItemName,"Bread Slice",true))
  742. {
  743. RemoveItem(playerid, ItemName, 1);
  744. CreateDrop(17, X, Y, Z);
  745. }
  746.  
  747. if(!strcmp(ItemName,"Burger",true))
  748. {
  749. RemoveItem(playerid, ItemName, 1);
  750. CreateDrop(18, X, Y, Z);
  751. }
  752.  
  753. if(!strcmp(ItemName,"Cereal Box",true))
  754. {
  755. RemoveItem(playerid, ItemName, 1);
  756. CreateDrop(19, X, Y, Z);
  757. }
  758.  
  759. if(!strcmp(ItemName,"Pizza",true))
  760. {
  761. RemoveItem(playerid, ItemName, 1);
  762. CreateDrop(20, X, Y, Z);
  763. }
  764.  
  765. if(!strcmp(ItemName,"Taco",true))
  766. {
  767. RemoveItem(playerid, ItemName, 1);
  768. CreateDrop(21, X, Y, Z);
  769. }
  770.  
  771. if(!strcmp(ItemName,"Ice Cream",true))
  772. {
  773. RemoveItem(playerid, ItemName, 1);
  774. CreateDrop(22, X, Y, Z);
  775. }
  776.  
  777. if(!strcmp(ItemName,"Chinese Food",true))
  778. {
  779. RemoveItem(playerid, ItemName, 1);
  780. CreateDrop(23, X, Y, Z);
  781. }
  782.  
  783. if(!strcmp(ItemName,"Orange",true))
  784. {
  785. RemoveItem(playerid, ItemName, 1);
  786. CreateDrop(24, X, Y, Z);
  787. }
  788.  
  789. if(!strcmp(ItemName,"Apple",true))
  790. {
  791. RemoveItem(playerid, ItemName, 1);
  792. CreateDrop(25, X, Y, Z);
  793. }
  794.  
  795. if(!strcmp(ItemName,"Green Apple",true))
  796. {
  797. RemoveItem(playerid, ItemName, 1);
  798. CreateDrop(26, X, Y, Z);
  799. }
  800.  
  801. if(!strcmp(ItemName,"Tomato",true))
  802. {
  803. RemoveItem(playerid, ItemName, 1);
  804. CreateDrop(27, X, Y, Z);
  805. }
  806.  
  807. if(!strcmp(ItemName,"Banana",true))
  808. {
  809. RemoveItem(playerid, ItemName, 1);
  810. CreateDrop(28, X, Y, Z);
  811. }
  812.  
  813. /* ============= [ Armas ] ============= */
  814. if(!strcmp(ItemName,"Pistol .50",true))
  815. {
  816. RemoveItem(playerid, ItemName, 1);
  817. CreateDrop(29, X, Y, Z);
  818. }
  819.  
  820. if(!strcmp(ItemName,"Glock 19",true))
  821. {
  822. RemoveItem(playerid, ItemName, 1);
  823. CreateDrop(30, X, Y, Z);
  824. }
  825.  
  826. if(!strcmp(ItemName,"M9 SD",true))
  827. {
  828. RemoveItem(playerid, ItemName, 1);
  829. CreateDrop(31, X, Y, Z);
  830. }
  831.  
  832. if(!strcmp(ItemName,"Mosin 9130",true))
  833. {
  834. RemoveItem(playerid, ItemName, 1);
  835. CreateDrop(32, X, Y, Z);
  836. }
  837.  
  838. if(!strcmp(ItemName,"Hunting Rifle",true))
  839. {
  840. RemoveItem(playerid, ItemName, 1);
  841. CreateDrop(33, X, Y, Z);
  842. }
  843.  
  844. if(!strcmp(ItemName,"AR-15",true))
  845. {
  846. RemoveItem(playerid, ItemName, 1);
  847. CreateDrop(34, X, Y, Z);
  848. }
  849.  
  850. if(!strcmp(ItemName,"AKS-74U",true))
  851. {
  852. RemoveItem(playerid, ItemName, 1);
  853. CreateDrop(35, X, Y, Z);
  854. }
  855.  
  856. if(!strcmp(ItemName,"MP-133 Shotgun",true))
  857. {
  858. RemoveItem(playerid, ItemName, 1);
  859. CreateDrop(36, X, Y, Z);
  860. }
  861.  
  862. if(!strcmp(ItemName,"Sawed-off IZH-43",true))
  863. {
  864. RemoveItem(playerid, ItemName, 1);
  865. CreateDrop(37, X, Y, Z);
  866. }
  867.  
  868. if(!strcmp(ItemName,"Pump Shotgun",true))
  869. {
  870. RemoveItem(playerid, ItemName, 1);
  871. CreateDrop(38, X, Y, Z);
  872. }
  873.  
  874. if(!strcmp(ItemName,"CZ61 Skorpion",true))
  875. {
  876. RemoveItem(playerid, ItemName, 1);
  877. CreateDrop(39, X, Y, Z);
  878. }
  879.  
  880. if(!strcmp(ItemName,"PDW",true))
  881. {
  882. RemoveItem(playerid, ItemName, 1);
  883. CreateDrop(40, X, Y, Z);
  884. }
  885.  
  886. if(!strcmp(ItemName,"MP5-K",true))
  887. {
  888. RemoveItem(playerid, ItemName, 1);
  889. CreateDrop(41, X, Y, Z);
  890. }
  891.  
  892. /* ============= [ Armas Brancas ] ============= */
  893. if(!strcmp(ItemName,"Baseball Bat",true))
  894. {
  895. RemoveItem(playerid, ItemName, 1);
  896. CreateDrop(42, X, Y, Z);
  897. }
  898.  
  899. if(!strcmp(ItemName,"Sword",true))
  900. {
  901. RemoveItem(playerid, ItemName, 1);
  902. CreateDrop(43, X, Y, Z);
  903. }
  904.  
  905. if(!strcmp(ItemName,"Combat Knife",true))
  906. {
  907. RemoveItem(playerid, ItemName, 1);
  908. CreateDrop(44, X, Y, Z);
  909. }
  910.  
  911. if(!strcmp(ItemName,"Shovel",true))
  912. {
  913. RemoveItem(playerid, ItemName, 1);
  914. CreateDrop(45, X, Y, Z);
  915. }
  916.  
  917. /* ============= [ Granadas ] ============= */
  918. if(!strcmp(ItemName,"Frag Grenade",true))
  919. {
  920. RemoveItem(playerid, ItemName, 1);
  921. CreateDrop(46, X, Y, Z);
  922. }
  923.  
  924. /* ============= [ Munições ] ============= */
  925. if(!strcmp(ItemName,"Assault Ammo",true))
  926. {
  927. RemoveItem(playerid, ItemName, 1);
  928. CreateDrop(47, X, Y, Z);
  929. }
  930.  
  931. if(!strcmp(ItemName,"Shotgun Ammo",true))
  932. {
  933. RemoveItem(playerid, ItemName, 1);
  934. CreateDrop(48, X, Y, Z);
  935. }
  936.  
  937. if(!strcmp(ItemName,"SMG Ammo",true))
  938. {
  939. RemoveItem(playerid, ItemName, 1);
  940. CreateDrop(49, X, Y, Z);
  941. }
  942.  
  943. if(!strcmp(ItemName,"Pistol Ammo",true))
  944. {
  945. RemoveItem(playerid, ItemName, 1);
  946. CreateDrop(50, X, Y, Z);
  947. }
  948.  
  949. if(!strcmp(ItemName,"Sniper Ammo",true))
  950. {
  951. RemoveItem(playerid, ItemName, 1);
  952. CreateDrop(51, X, Y, Z);
  953. }
  954.  
  955. /* ============= [ Variados ] ============= */
  956. if(!strcmp(ItemName,"GPS",true))
  957. {
  958. RemoveItem(playerid, ItemName, 1);
  959. CreateDrop(52, X, Y, Z);
  960. }
  961.  
  962. if(!strcmp(ItemName,"Clothing",true))
  963. {
  964. RemoveItem(playerid, ItemName, 1);
  965. CreateDrop(53, X, Y, Z);
  966. }
  967.  
  968. if(!strcmp(ItemName,"Engine",true))
  969. {
  970. RemoveItem(playerid, ItemName, 1);
  971. CreateDrop(54, X, Y, Z);
  972. }
  973.  
  974. if(!strcmp(ItemName,"Toolbox",true))
  975. {
  976. RemoveItem(playerid, ItemName, 1);
  977. CreateDrop(55, X, Y, Z);
  978. }
  979.  
  980. if(!strcmp(ItemName,"Radio Device",true))
  981. {
  982. RemoveItem(playerid, ItemName, 1);
  983. CreateDrop(56, X, Y, Z);
  984. }
  985.  
  986. if(!strcmp(ItemName,"Armour Vest",true))
  987. {
  988. RemoveItem(playerid, ItemName, 1);
  989. CreateDrop(57, X, Y, Z);
  990. }
  991.  
  992. if(!strcmp(ItemName,"Gas Mask",true))
  993. {
  994. RemoveItem(playerid, ItemName, 1);
  995. CreateDrop(58, X, Y, Z);
  996. }
  997.  
  998. if(!strcmp(ItemName,"Helmet",true))
  999. {
  1000. RemoveItem(playerid, ItemName, 1);
  1001. CreateDrop(59, X, Y, Z);
  1002. }
  1003.  
  1004. if(!strcmp(ItemName,"Fuel Canister",true))
  1005. {
  1006. RemoveItem(playerid, ItemName, 1);
  1007. CreateDrop(60, X, Y, Z);
  1008. }
  1009.  
  1010. /* ============= [ Vazios ] ============= */
  1011. if(!strcmp(ItemName,"Empty Water Canteen",true))
  1012. {
  1013. RemoveItem(playerid, ItemName, 1);
  1014. CreateDrop(61, X, Y, Z);
  1015. }
  1016.  
  1017. if(!strcmp(ItemName,"Empty Fuel Canister",true))
  1018. {
  1019. RemoveItem(playerid, ItemName, 1);
  1020. CreateDrop(62, X, Y, Z);
  1021. }
  1022. return 1;
  1023. }
  1024.  
  1025. stock ForceDrop(playerid)
  1026. {
  1027. new Float:X, Float:Y, Float:Z;
  1028. GetPlayerPos(playerid, X, Y, Z);
  1029.  
  1030. for(new i; i < 99; i++)
  1031. {
  1032. if(PlayerHasItem(playerid, ItemInfo[i][Item_Name]))
  1033. {
  1034. CreateDrop(ItemInfo[i][Item_ID], X+random(3), Y+random(5), Z);
  1035. }
  1036. }
  1037. return 1;
  1038. }
  1039.  
  1040. public OnPlayerPickupItemFromDrop(playerid)
  1041. {
  1042. for(new i; i < MAX_DROPS; i++)
  1043. {
  1044. if(IsPlayerInRangeOfPoint(playerid, 1.5, DropInfo[i][dPosX], DropInfo[i][dPosY], DropInfo[i][dPosZ]))
  1045. {
  1046. new str[80],
  1047. itemid = DropInfo[i][DropItemID];
  1048.  
  1049. format(str, sizeof(str), "~w~(~y~%s~w~)~n~ added to your inventory.", ItemInfo[itemid][Item_Name]);
  1050. GameTextForPlayer(playerid,str,2500,4);
  1051. AddItem(playerid, ItemInfo[itemid][Item_Name], 1);
  1052. DestroyDrop(i);
  1053. return 1;
  1054. }
  1055. }
  1056. return 1;
  1057. }
  1058.  
  1059. public Item_OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1060. {
  1061. if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  1062. {
  1063. if(PRESSED(KEY_CROUCH))
  1064. {
  1065. for(new i; i < MAX_DROPS; i++)
  1066. {
  1067. if(IsPlayerInRangeOfPoint(playerid, 1.5, DropInfo[i][dPosX], DropInfo[i][dPosY], DropInfo[i][dPosZ]))
  1068. {
  1069. if(GetPlayerState(playerid) != SPECIAL_ACTION_DUCK) return SendClientMessage(playerid, COR_CINZA, Translate(pInfo[playerid][pIdioma], "[LOOT]: Você precisa estar agaixado para pegar este item.", "[LOOT]: You need to be crouched to pick up this item."));
  1070.  
  1071. new str[80],
  1072. itemid = DropInfo[i][DropItemID];
  1073.  
  1074. format(str, sizeof(str), "{FFFFFF}# {27E6E6}%s {FFFFFF}#", ItemInfo[itemid][Item_Name]);
  1075.  
  1076. if(pInfo[playerid][pIdioma] == 1) ShowPlayerDialog(playerid, D_PegarItem, DIALOG_STYLE_MSGBOX, str, "{FFFFFF}Você deseja adicionar este item ao seu inventário ?", "Pegar", "Fechar");
  1077. else ShowPlayerDialog(playerid, D_PegarItem, DIALOG_STYLE_MSGBOX, str, "{FFFFFF}You want to add this item to your inventory ?", "Take", "Close");
  1078. }
  1079. }
  1080. }
  1081. if(PRESSED(KEY_YES)) ShowInventory(playerid);
  1082. }
  1083. return 1;
  1084. }
  1085.  
  1086. public Item_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1087. {
  1088. switch(dialogid)
  1089. {
  1090. case D_PegarItem:
  1091. {
  1092. if(response)
  1093. {
  1094. // Se os slots usados for igual aos slots totais manda a msg
  1095. if(Player[playerid][pSlots] == Player[playerid][pBackpack]) return GameTextForPlayer(playerid,"~r~Inventory is Full",1000,4);
  1096. OnPlayerPickupItemFromDrop(playerid);
  1097. }
  1098. }
  1099. }
  1100. return 1;
  1101. }
  1102.  
  1103. stock DestroyDrop(dropid)
  1104. {
  1105. DropInfo[dropid][dPosX] = 0.0;
  1106. DropInfo[dropid][dPosY] = 0.0;
  1107. DropInfo[dropid][dPosZ] = 0.0;
  1108.  
  1109. DropInfo[dropid][DropItemID] = -1;
  1110.  
  1111. DestroyDynamicObject(DropInfo[dropid][DropObj]);
  1112. DestroyDynamic3DTextLabel(DropInfo[dropid][DropLabel]);
  1113. return 1;
  1114. }
  1115.  
  1116. stock CreateDrop(itemid, Float:X, Float:Y, Float:Z)
  1117. {
  1118. if(itemid != -1)
  1119. {
  1120. for(new i; i < MAX_DROPS; i++)
  1121. {
  1122. if(DropInfo[i][dPosX] == 0.0 && DropInfo[i][dPosY] == 0.0 && DropInfo[i][dPosZ] == 0.0)
  1123. {
  1124. new str[100];
  1125.  
  1126. DropInfo[i][dPosX] = X, DropInfo[i][dPosY] = Y, DropInfo[i][dPosZ] = Z-0.92;
  1127.  
  1128. DropInfo[i][DropItemID] = itemid;
  1129.  
  1130. format(str, sizeof(str), "{FFFFFF}[{27E6E6}%s{FFFFFF}]\nPress [{27E6E6}C{FFFFFF}] {FFFFFF}to Pickup.", ItemInfo[itemid][Item_Name]);
  1131. DropInfo[i][DropLabel] = CreateDynamic3DTextLabel(str, -1, DropInfo[i][dPosX], DropInfo[i][dPosY], DropInfo[i][dPosZ], 1.5);
  1132. DropInfo[i][DropObj] = CreateDynamicObject(ItemInfo[itemid][Item_Obj], DropInfo[i][dPosX], DropInfo[i][dPosY], DropInfo[i][dPosZ], ItemInfo[itemid][Item_RotX], ItemInfo[itemid][Item_RotY], ItemInfo[itemid][Item_RotZ]);
  1133. return 1;
  1134. }
  1135. }
  1136. }
  1137. return 0;
  1138. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement