Advertisement
Guest User

Untitled

a guest
Apr 18th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 84.79 KB | None | 0 0
  1. /*
  2. Project V-Inventory Viet Nam Version
  3. Create by Nhat
  4. -ShowInventory(playerid); // Show Inventory cho nguoi choi
  5. -HideInventory(playerid);
  6. -AddInventoryItem(playerid,modelid,amount); // them vao inventory 1 item voi so luong = amount
  7. -RemoveInventoryItem(playerid,clickslot,slotuse,note[]); // clickslot = slot item , note se hien tren textdraw inventory[9]
  8. -RemoveItem(playerid,modelid,amount); // xoa 1 item voi so luong , neu so luong xoa nho hon so luong item co thi se tru neu khong se xoa luon item
  9. -ResetInventory(playerid); // xoa het moi item
  10. -GetPlayerItemAmount(playerid,modelid); // kiem tra xem nguoi choi co item do hay khong va so luong
  11. -GetItemName(modelid,amount); // de kiem tra item name ( them vao stock getitemname)
  12. -GetItemSlotUse(modelid); // Slot can de chua item
  13. -CreateItem(Model,Amount,usetext,useitemrot,Float:X, Float:Y, Float:Z,world, interior);
  14. -SetItemRot(objectid,modelid);
  15. -DestroyItem(itemid);
  16. -PickupItem(playerid);
  17. */
  18. /*=========INCLUDE====================*/
  19. #include <a_samp>
  20. #include <zcmd>
  21. #include <sscanf2>
  22. #include <streamer>
  23. /*=========DEFINE====================*/
  24. #define MAX_INVENTOY_SLOTS 50
  25. #define MAX_DROP_ITEMS 100
  26. #define DIALOG_ADDITEM 13337
  27. /*=========KEY====================*/
  28. #define KEY_PICKUPITEM 2
  29. #define KEY_OPENINV 65536
  30. #define MAX_RECORDS (999)
  31. #define MAX_KEY_LENGTH (32)
  32. #define MAX_VAL_LENGTH (256)
  33. #define MAX_RECORD_LENGTH (MAX_KEY_LENGTH + MAX_VAL_LENGTH + 2)
  34.  
  35. #define __isnull(%0) (%0[0] == 0||(%0[0] == 1&&%0[1] == 0))
  36. #define __strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2)
  37. #define file_IncVal(%1,%2) file_SetVal(%1, file_GetVal(%1) + %2)
  38.  
  39. enum
  40. {
  41. WINDOWS,
  42. LINUX
  43. }
  44.  
  45.  
  46. static
  47. File: ini_CurrentFile,
  48. ini_Temp[MAX_RECORD_LENGTH],
  49. ini_OsLineEndLen = 2,
  50. ini_OsLineEndChar[5],
  51. bool: ini_FileOpen,
  52. ini_KeyData[MAX_RECORDS][MAX_KEY_LENGTH],
  53. ini_ValData[MAX_RECORDS][MAX_VAL_LENGTH];
  54. /*=========NEW-ENUM====================*/
  55. new Text:Textdraw0;
  56. new PlayerText:Inventory[14]= {PlayerText:INVALID_TEXT_DRAW, ...};
  57. new PlayerText:InvItem[50]= {PlayerText:INVALID_TEXT_DRAW, ...};
  58. enum vinfo
  59. {
  60. MSlot,
  61. Slotu,
  62. iSlot[MAX_INVENTOY_SLOTS],
  63. iAmount[MAX_INVENTOY_SLOTS],
  64. }
  65. new InvInfo[MAX_PLAYERS][vinfo];
  66. enum ItemData
  67. {
  68. ItemID,
  69. ItemModel,
  70. ItemAmount,
  71. ItemObject,
  72. Text3D:ItemLabel,
  73. Float:ItemPosX,
  74. Float:ItemPosY,
  75. Float:ItemPosZ,
  76. Float:ItemRotX,
  77. Float:ItemRotY,
  78. Float:ItemRotZ,
  79. ItemVWorld,
  80. ItemInterior,
  81. };
  82. new ItemInfo[MAX_DROP_ITEMS][ItemData];
  83. /*=========FORWARD====================*/
  84. forward OnPlayerUseItem(playerid,modelid,amount,clickslot);
  85.  
  86. public OnFilterScriptInit()
  87. {
  88. print("\n--------------------------------------");
  89. print(" Vinpure Inventory Project LOADED");
  90. print("--------------------------------------\n");
  91. return 1;
  92. }
  93.  
  94. public OnFilterScriptExit()
  95. {
  96. print("\n--------------------------------------");
  97. print(" Vinpure Inventory Project UNLOADED");
  98. print("--------------------------------------\n");
  99. return 1;
  100. }
  101.  
  102. CMD:inv(playerid,params[])
  103. {
  104. ShowInventory(playerid);
  105. TextDrawHideForPlayer(playerid, Textdraw0);
  106. return 1;
  107. }
  108. CMD:getitem(playerid,params[])
  109. {
  110. new s[128];
  111. format(s,sizeof(s),"Item M4 %d",GetPlayerItemAmount(playerid,GetWeaponModel(31)));
  112. SendClientMessage(playerid,-1,s);
  113. return 1;
  114. }
  115. CMD:remove(playerid,params[])
  116. {
  117. RemoveItem(playerid,GetWeaponModel(31),5);
  118. return 1;
  119. }
  120. CMD:setslot(playerid,params[])
  121. {
  122. new id,slot;
  123. if(sscanf(params,"dd",id,slot)) return SendClientMessage(playerid,-1,"/setslot [playerid] [slot]");
  124. if(!IsPlayerConnected(id))return SendClientMessage(playerid,-1,"Player not Connected");
  125. if(slot < 0 || slot > 50)return SendClientMessage(playerid,-1,"Slot 1-50");
  126. InvInfo[id][MSlot] = slot;
  127. return 1;
  128. }
  129. CMD:giveweapon(playerid,params[])
  130. {
  131. new id,type,ammo;
  132. if(sscanf(params, "ddd",id,type,ammo)) return SendClientMessage(playerid,-1,"USAGE:/giveweapon [playerid] [weapon] [ammo]");
  133. if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Player not connect");
  134. GivePlayerWeapon(id,type,ammo);
  135. return 1;
  136. }
  137. CMD:setskin(playerid,params[])
  138. {
  139. new id,skinid;
  140. if(sscanf(params,"dd",id,skinid)) return SendClientMessage(playerid,-1,"/setskin [id] [skinid]");
  141. if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Player not connect");
  142. if(skinid < 1|| skinid >299) return SendClientMessage(playerid,-1,"skinid:1->299");
  143. SetPlayerSkin(id,skinid);
  144. return 1;
  145. }
  146. public OnPlayerConnect(playerid)
  147. {
  148. LoadInventoryTextDraw(playerid);
  149. LoadInventory(playerid);
  150. TextDrawShowForPlayer(playerid, Textdraw0); // < -- Faz o TextDraw aparecer!
  151. return 1;
  152. }
  153.  
  154. public OnPlayerDisconnect(playerid, reason)
  155. {
  156. TextDrawShowForPlayer(playerid, Textdraw0); // < -- Faz o TextDraw aparecer!
  157. SaveInventory(playerid);
  158. for(new i =0;i<MAX_INVENTOY_SLOTS;i++) PlayerTextDrawDestroy(playerid,InvItem[i]);
  159. for(new i=0;i<14;i++) PlayerTextDrawDestroy(playerid,Inventory[i]);
  160. return 1;
  161. }
  162.  
  163. public OnPlayerSpawn(playerid)
  164. {
  165. return 1;
  166. }
  167. public OnPlayerUseItem(playerid,modelid,amount,clickslot)
  168. {
  169. if(modelid > 320 && modelid <= 372)
  170. {
  171. new weaponid =GetModelWeapon(modelid);
  172. GivePlayerWeapon(playerid,weaponid,amount);
  173. SetPVarInt(playerid,"WeaponVar2",0);
  174. RemoveInventoryItem(playerid,clickslot,GetItemSlotUse(modelid),"Trang Bi");
  175. }
  176. return 1;
  177. }
  178.  
  179.  
  180.  
  181. public OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
  182. {
  183. for(new i=0;i<MAX_DROP_ITEMS;i++)
  184. {
  185. if(objectid == ItemInfo[i][ItemID] || objectid == ItemInfo[i][ItemObject])
  186. {
  187. if(IsPlayerInRangeOfPoint(playerid,3,ItemInfo[i][ItemPosX],ItemInfo[i][ItemPosY],ItemInfo[i][ItemPosZ]))
  188. {
  189. SetPVarInt(playerid,"LootModel",ItemInfo[i][ItemModel]);
  190. SetPVarInt(playerid,"LootAmount",ItemInfo[i][ItemAmount]);
  191. SetPVarInt(playerid,"LootID",ItemInfo[i][ItemID]);
  192. new string[128];
  193. format(string,sizeof(string),"%s\nSlotuse :%d",GetItemName(ItemInfo[i][ItemModel],ItemInfo[i][ItemAmount]),GetItemSlotUse(ItemInfo[i][ItemModel]));
  194. ShowPlayerDialog(playerid,DIALOG_ADDITEM,0,"LOOTING",string,"Loot","Close");
  195. }
  196. else
  197. {
  198. SendClientMessage(playerid,-1,"You not near item");
  199. }
  200. }
  201. }
  202. return 1;
  203. }
  204. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  205. {
  206. if(dialogid == DIALOG_ADDITEM)
  207. {
  208. if(!response)
  209. {
  210. SetPVarInt(playerid,"LootModel",0);
  211. SetPVarInt(playerid,"LootAmount",0);
  212. SetPVarInt(playerid,"LootID",-1);
  213. ShowInventory(playerid);
  214. }
  215. else
  216. {
  217. if(InvInfo[playerid][Slotu] == InvInfo[playerid][MSlot]) return SendClientMessage(playerid,-1,"Tui do da day");
  218. new freeslot = InvInfo[playerid][MSlot]-InvInfo[playerid][Slotu];
  219. if(freeslot < GetItemSlotUse(GetPVarInt(playerid,"IModelid"))) return SendClientMessage(playerid,-1,"Tui do da day");
  220. DestroyItem(GetPVarInt(playerid,"LootID"));
  221. AddInventoryItem(playerid,GetPVarInt(playerid,"LootModel"),GetPVarInt(playerid,"LootAmount"));
  222. ShowInventory(playerid);
  223. SetPVarInt(playerid,"LootModel",0);
  224. SetPVarInt(playerid,"LootAmount",0);
  225. SetPVarInt(playerid,"LootID",-1);
  226. }
  227. }
  228. return 1;
  229. }
  230. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  231. {
  232. if(clickedid == Text:INVALID_TEXT_DRAW)
  233. {
  234. if(GetPVarInt(playerid,"ShowInventory") == 1)
  235. {
  236. HideInventory(playerid);
  237. //TextDrawHideForPlayer(playerid, Textdraw0);
  238. TextDrawShowForPlayer(playerid, Textdraw0); // < -- Faz o TextDraw aparecer!
  239. }
  240. }
  241. return 1;
  242. }
  243. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  244. {
  245. if(GetPVarInt(playerid,"ShowInventory") == 1)
  246. {
  247. for(new i = 0 ;i<InvInfo[playerid][MSlot];i++)
  248. {
  249. if(playertextid == InvItem[i])
  250. {
  251. if(InvInfo[playerid][iSlot][i] != 0)
  252. {
  253. new s[128];
  254. format(s,sizeof(s),"%d:%s",i,GetItemName(InvInfo[playerid][iSlot][i],InvInfo[playerid][iAmount][i]));
  255. PlayerTextDrawSetString(playerid,Inventory[9],s);
  256. PlayerTextDrawShow(playerid,Inventory[9]);
  257. format(s,sizeof(s),"SlotUse:%d",GetItemSlotUse(InvInfo[playerid][iSlot][i]));
  258. PlayerTextDrawSetString(playerid,Inventory[10],s);
  259. PlayerTextDrawShow(playerid,Inventory[10]);
  260. SetPVarInt(playerid,"IModelid",InvInfo[playerid][iSlot][i]);
  261. SetPVarInt(playerid,"IAmount",InvInfo[playerid][iAmount][i]);
  262. SetPVarInt(playerid,"IClickSlot",i);
  263. SetPVarInt(playerid,"WeaponAdd",0);
  264.  
  265. }
  266. }
  267. }
  268. if(playertextid == Inventory[12])
  269. {
  270. HideInventory(playerid);
  271. SelectObject(playerid);
  272. return 1;
  273. }
  274. if(playertextid == Inventory[5])
  275. {
  276. if(GetPlayerWeapon(playerid) != 0)
  277. {
  278. SetPVarInt(playerid,"IAModelid",GetWeaponModel(GetPlayerWeapon(playerid)));
  279. SetPVarInt(playerid,"IAAmount",GetPlayerAmmo(playerid));
  280. SetPVarInt(playerid,"IModelid",0);
  281. SetPVarInt(playerid,"WeaponAdd",1);
  282. new string[128];
  283. format(string,sizeof(string),"%s",GetItemName(GetWeaponModel(GetPlayerWeapon(playerid)),GetPlayerAmmo(playerid)));
  284. PlayerTextDrawSetString(playerid,Inventory[9],string);
  285. PlayerTextDrawShow(playerid,Inventory[9]);
  286. }
  287. }
  288. if(playertextid == Inventory[11])
  289. {
  290. if(GetPVarInt(playerid,"IAModelid") != 0 || GetPVarInt(playerid,"AddItem")!= 0)
  291. {
  292. if(GetPVarInt(playerid,"WeaponAdd") == 1)
  293. {
  294. if(InvInfo[playerid][Slotu] == InvInfo[playerid][MSlot])
  295. {
  296. PlayerTextDrawSetString(playerid,Inventory[9],"A bolsta ta cheia");
  297. PlayerTextDrawShow(playerid,Inventory[9]);
  298. return 1;
  299. }
  300. new freeslot = InvInfo[playerid][MSlot]-InvInfo[playerid][Slotu];
  301. if(freeslot < GetItemSlotUse(GetPVarInt(playerid,"IModelid")))
  302. {
  303. PlayerTextDrawSetString(playerid,Inventory[9],"A bolsta ta cheia");
  304. PlayerTextDrawShow(playerid,Inventory[9]);
  305. return 1;
  306. }
  307. AddInventoryItem(playerid,GetPVarInt(playerid,"IAModelid"),GetPVarInt(playerid,"IAAmount"));
  308. RemovePlayerWeapon(playerid,GetModelWeapon(GetPVarInt(playerid,"IAModelid")));
  309. ShowInventory(playerid);
  310. SetPVarInt(playerid,"WeaponAdd",0);
  311. PlayerTextDrawSetString(playerid,Inventory[9],"Item");
  312. PlayerTextDrawShow(playerid,Inventory[9]);
  313. }
  314. }
  315. else
  316. {
  317. PlayerTextDrawSetString(playerid,Inventory[9],"Selecione Um Item");
  318. PlayerTextDrawShow(playerid,Inventory[9]);
  319. }
  320. }
  321. if(playertextid == Inventory[4])
  322. {
  323. if(GetPVarInt(playerid,"IModelid") != 0)
  324. {
  325. CallLocalFunction("OnPlayerUseItem","dddd",playerid,GetPVarInt(playerid,"IModelid"),GetPVarInt(playerid,"IAmount"),GetPVarInt(playerid,"IClickSlot"));
  326. SetPVarInt(playerid,"WeaponAdd",0);
  327. }
  328. else
  329. {
  330. PlayerTextDrawSetString(playerid,Inventory[9],"Selecione Um Item);
  331. PlayerTextDrawShow(playerid,Inventory[9]);
  332. }
  333. }
  334. if(playertextid == Inventory[7])
  335. {
  336. if(GetPVarInt(playerid,"IModelid") != 0)
  337. {
  338. new Float:x,Float:y,Float:z;
  339. GetPlayerPos(playerid,x,y,z);
  340. CreateItem(GetPVarInt(playerid,"IModelid"),GetPVarInt(playerid,"IAmount"),1,1,x,y,z-0.8,0,0);
  341. RemoveInventoryItem(playerid,GetPVarInt(playerid,"IClickSlot"),GetItemSlotUse(GetPVarInt(playerid,"IModelid")),"Drop Item");
  342. HideInventory(playerid);
  343. }
  344. else if(GetPVarInt(playerid,"WeaponAdd") == 1)
  345. {
  346. new Float:x,Float:y,Float:z;
  347. GetPlayerPos(playerid,x,y,z);
  348. CreateItem(GetPVarInt(playerid,"IAModelid"),GetPVarInt(playerid,"IAAmount"),1,1,x,y,z-0.8,0,0);
  349. RemovePlayerWeapon(playerid,GetModelWeapon(GetPVarInt(playerid,"IAModelid")));
  350. ShowInventory(playerid);
  351. }
  352. else
  353. {
  354. PlayerTextDrawSetString(playerid,Inventory[9],"Vui long chon Item");
  355. PlayerTextDrawShow(playerid,Inventory[9]);
  356. }
  357. }
  358. }
  359. return 1;
  360. }
  361. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  362. {
  363. if(newkeys == KEY_PICKUPITEM) // key N
  364. {
  365. PickupItem(playerid);
  366. }
  367. if(newkeys == KEY_OPENINV)
  368. {
  369. ShowInventory(playerid);
  370. TextDrawHideForPlayer(playerid, Textdraw0);
  371. }
  372. return 1;
  373. }
  374. public OnPlayerUpdate(playerid)
  375. {
  376. SetPVarInt(playerid,"WeaponVar",GetPlayerWeapon(playerid));
  377. if(GetPVarInt(playerid,"ShowInventory") == 1)
  378. {
  379. if(GetPVarInt(playerid,"WeaponVar2") != GetPVarInt(playerid,"WeaponVar"))
  380. {
  381. if(GetPlayerWeapon(playerid) == 0)
  382. {
  383. PlayerTextDrawHide(playerid,Inventory[5]);
  384. }
  385. else
  386. {
  387. PlayerTextDrawSetPreviewModel(playerid,Inventory[5],GetWeaponModel(GetPVarInt(playerid,"WeaponVar")));
  388. PlayerTextDrawShow(playerid,Inventory[5]);
  389. SetPVarInt(playerid,"WeaponVar2",GetPVarInt(playerid,"WeaponVar"));
  390. }
  391. }
  392.  
  393. }
  394. }
  395. /////////////STOCK
  396. stock ShowInventory(playerid)
  397. {
  398. for(new i =0;i<InvInfo[playerid][MSlot];i++)
  399. {
  400. if(InvInfo[playerid][iSlot][i] != 0)
  401. {
  402. PlayerTextDrawSetPreviewModel(playerid, InvItem[i],InvInfo[playerid][iSlot][i]);
  403. PlayerTextDrawShow(playerid,InvItem[i]);
  404. }
  405. else
  406. {
  407. PlayerTextDrawHide(playerid,InvItem[i]);
  408. }
  409. }
  410. switch(InvInfo[playerid][MSlot])
  411. {
  412. case 0:PlayerTextDrawSetString(playerid,Inventory[13],"Project V Inventory");
  413. case 1..15:PlayerTextDrawSetString(playerid,Inventory[13],"Smersh Backpack");
  414. case 16..35:PlayerTextDrawSetString(playerid,Inventory[13],"Hunting Backpack");
  415. case 36..50:PlayerTextDrawSetString(playerid,Inventory[13],"Mountain Backpack");
  416. }
  417. PlayerTextDrawSetPreviewModel(playerid,Inventory[5],GetWeaponModel(GetPVarInt(playerid,"WeaponVar")));
  418. PlayerTextDrawSetPreviewModel(playerid,Inventory[4],GetPlayerSkin(playerid));
  419. PlayerTextDrawSetString(playerid,Inventory[9],"");
  420. PlayerTextDrawSetString(playerid,Inventory[10],"");
  421. new s[128];format(s,sizeof(s),"Inventory %d/%d",InvInfo[playerid][Slotu],InvInfo[playerid][MSlot]);
  422. PlayerTextDrawSetString(playerid,Inventory[3],s);
  423. for(new i =0;i<14;i++)
  424. {
  425. PlayerTextDrawShow(playerid,Inventory[i]);
  426. }
  427. SetPVarInt(playerid,"IAModelid",0);
  428. SetPVarInt(playerid,"IAAmount",0);
  429. SetPVarInt(playerid,"IModelid",0);
  430. SetPVarInt(playerid,"IAmount",0);
  431. SetPVarInt(playerid,"IClickSlot",-1);
  432. SelectTextDraw(playerid,0xAFAFAFAA);
  433. SetPVarInt(playerid,"ShowInventory",1);
  434. return 1;
  435. }
  436. stock HideInventory(playerid)
  437. {
  438. for(new i =0;i<InvInfo[playerid][MSlot];i++)
  439. {
  440. PlayerTextDrawHide(playerid,InvItem[i]);
  441. }
  442. for(new i =0;i<14;i++)
  443. {
  444. PlayerTextDrawHide(playerid,Inventory[i]);
  445. }
  446. CancelSelectTextDraw(playerid);
  447. SetPVarInt(playerid,"ShowInventory",0);
  448. SetPVarInt(playerid,"IModelid",0);
  449. SetPVarInt(playerid,"IAmount",0);
  450. SetPVarInt(playerid,"IClickSlot",-1);
  451. return 1;
  452. }
  453. stock AddInventoryItem(playerid,modelid,amount)
  454. {
  455. if(InvInfo[playerid][Slotu] == InvInfo[playerid][MSlot]) return SendClientMessage(playerid,-1,"Tui do da day");
  456. new freeslot = InvInfo[playerid][MSlot]-InvInfo[playerid][Slotu];
  457. if(freeslot < GetItemSlotUse(modelid)) return SendClientMessage(playerid,-1,"Tui do da day");
  458. for(new i=0;i<InvInfo[playerid][MSlot];i++)
  459. {
  460. if(InvInfo[playerid][iSlot][i] == 0)
  461. {
  462. InvInfo[playerid][iSlot][i] = modelid;
  463. InvInfo[playerid][iAmount][i] = amount;
  464. InvInfo[playerid][Slotu] += GetItemSlotUse(modelid);
  465. break;
  466. }
  467. }
  468. return 1;
  469. }
  470. stock RemovePlayerWeapon( playerid, weaponid )
  471. {
  472. new plyWeapons[ 12 ], plyAmmo[ 12 ];
  473.  
  474. for( new slot = 0; slot != 12; slot ++ )
  475. {
  476. new
  477. weap, ammo;
  478.  
  479. GetPlayerWeaponData( playerid, slot, weap, ammo );
  480. if( weap != weaponid )
  481. {
  482. GetPlayerWeaponData( playerid, slot, plyWeapons[ slot ], plyAmmo[ slot ] );
  483. }
  484. }
  485. ResetPlayerWeapons(playerid);
  486. for( new slot = 0; slot != 12; slot ++ )
  487. {
  488. GivePlayerWeapon( playerid, plyWeapons[ slot ], plyAmmo[slot] );
  489. }
  490. }
  491. stock GetPlayerItemAmount(playerid,modelid)
  492. {
  493. for(new i=0;i<InvInfo[playerid][MSlot];i++)
  494. {
  495. if(InvInfo[playerid][iSlot][i] == modelid)
  496. {
  497. return InvInfo[playerid][iAmount][i];
  498. }
  499. }
  500. return 0;
  501. }
  502. stock RemoveItem(playerid,modelid,amount)
  503. {
  504. for(new i = InvInfo[playerid][MSlot]-1;i>-1;i--)
  505. {
  506. if(InvInfo[playerid][iSlot][i] == modelid && InvInfo[playerid][iAmount][i] == amount)
  507. {
  508. InvInfo[playerid][iSlot][i] = 0;
  509. InvInfo[playerid][iAmount][i] = 0;
  510. InvInfo[playerid][Slotu] -= GetItemSlotUse(modelid);
  511. break;
  512. }
  513. else if(InvInfo[playerid][iSlot][i] == modelid && InvInfo[playerid][iAmount][i] > amount)
  514. {
  515. InvInfo[playerid][iAmount][i] -= amount;
  516. break;
  517. }
  518.  
  519. }
  520. return 1;
  521. }
  522. stock RemoveInventoryItem(playerid,clickslot,slotuse,note[])
  523. {
  524. InvInfo[playerid][iSlot][clickslot] = 0;
  525. InvInfo[playerid][iAmount][clickslot] = 0;
  526. InvInfo[playerid][Slotu] -= slotuse;
  527. ShowInventory(playerid);
  528. PlayerTextDrawSetString(playerid,Inventory[9],note);
  529. PlayerTextDrawShow(playerid,Inventory[9]);
  530. return 1;
  531. }
  532. stock ResetInventory(playerid)
  533. {
  534. for(new i=0;i<MAX_INVENTORY_SLOTS;i++)
  535. {
  536. InvInfo[playerid][iSlot][i] = 0;
  537. InvInfo[playerid][iAmount][i] = 0;
  538. InvInfo[playerid][Slotu] = 0;
  539. }
  540. return 1;
  541. }
  542. stock GetItemName(modelid,amount)
  543. {
  544. new modelname[128];
  545. switch(modelid)
  546. {
  547. case 330..372:
  548. {
  549. new weaponid = GetModelWeapon(modelid);
  550. new gunname[32];
  551. GetWeaponNameEx(weaponid,gunname,sizeof(gunname));
  552. format(modelname, sizeof(modelname), "%s/%d",gunname,amount);
  553. }
  554. default: format(modelname, sizeof(modelname), "-ITEM-");
  555. }
  556. return modelname;
  557. }
  558. stock GetItemSlotUse(modelid)
  559. {
  560. switch(modelid)
  561. {
  562. default: return 1;
  563. }
  564. return 1;
  565. }
  566. stock DestroyItem(i)
  567. {
  568. ItemInfo[i][ItemModel] = 0;
  569. ItemInfo[i][ItemAmount] = 0;
  570. ItemInfo[i][ItemPosX] = 0.0;
  571. ItemInfo[i][ItemPosY] = 0.0;
  572. ItemInfo[i][ItemPosZ] = 0.0;
  573. ItemInfo[i][ItemRotX] = 0.0;
  574. ItemInfo[i][ItemRotY] = 0.0;
  575. ItemInfo[i][ItemRotZ] = 0.0;
  576. ItemInfo[i][ItemVWorld] = 0;
  577. ItemInfo[i][ItemInterior] = 0;
  578. ItemInfo[i][ItemID] =-1;
  579. Delete3DTextLabel(ItemInfo[i][ItemLabel]);
  580. DestroyDynamicObject(ItemInfo[i][ItemObject]);
  581. return 1;
  582. }
  583. stock CreateItem(Model,Amount,showtext,useitemrot,Float:X, Float:Y, Float:Z,world, interior)
  584. {
  585. if(Model != 0)
  586. {
  587. for(new i = 0; i < sizeof(ItemInfo); i++)
  588. {
  589. if(ItemInfo[i][ItemPosX] == 0.0 && ItemInfo[i][ItemPosY] == 0.0 && ItemInfo[i][ItemPosZ] == 0.0)
  590. {
  591. ItemInfo[i][ItemID] = i;
  592. ItemInfo[i][ItemModel] = Model;
  593. ItemInfo[i][ItemAmount] = Amount;
  594. ItemInfo[i][ItemPosX] = X;
  595. ItemInfo[i][ItemPosY] = Y;
  596. ItemInfo[i][ItemPosZ] = Z;
  597. ItemInfo[i][ItemVWorld] = world;
  598. ItemInfo[i][ItemInterior] = interior;
  599. if(showtext == 1)
  600. {
  601. ItemInfo[i][ItemLabel] = Create3DTextLabel(GetItemName(Model,Amount),0xAFAFAFAA,X,Y,Z,5.0,world, 0);
  602. }
  603. ItemInfo[i][ItemObject] = CreateDynamicObject(Model, X, Y, Z,0,0,0, world,interior);
  604. if(useitemrot == 1)
  605. {
  606. SetItemRot(ItemInfo[i][ItemObject],Model);
  607. }
  608. return 1;
  609. }
  610. }
  611. return 1;
  612. }
  613. return 1;
  614. }
  615. stock SetItemRot(objectid,modelid)
  616. {
  617. switch(modelid)
  618. {
  619. default: return SetDynamicObjectRot(objectid,0,0,0);
  620. }
  621. return 1;
  622. }
  623. stock PickupItem(playerid)
  624. {
  625. for(new i = 0; i < sizeof(ItemInfo); i++)
  626. {
  627. if (IsPlayerInRangeOfPoint(playerid, 2.0,ItemInfo[i][ItemPosX],ItemInfo[i][ItemPosY],ItemInfo[i][ItemPosZ]))
  628. {
  629. if(GetPlayerVirtualWorld(playerid) == ItemInfo[i][ItemVWorld] && GetPlayerInterior(playerid) == ItemInfo[i][ItemInterior])
  630. {
  631. if(InvInfo[playerid][Slotu] == InvInfo[playerid][MSlot]) return SendClientMessage(playerid,-1,"Tui do da day");
  632. new freeslot = InvInfo[playerid][MSlot]-InvInfo[playerid][Slotu];
  633. if(freeslot < GetItemSlotUse(ItemInfo[i][ItemModel])) return SendClientMessage(playerid,-1,"Tui do da day");
  634. ItemInfo[i][ItemPosX] = 0.0;
  635. ItemInfo[i][ItemPosY] = 0.0;
  636. ItemInfo[i][ItemPosZ] = 0.0;
  637. ItemInfo[i][ItemRotX] = 0.0;
  638. ItemInfo[i][ItemRotY] = 0.0;
  639. ItemInfo[i][ItemRotZ] = 0.0;
  640. ItemInfo[i][ItemID] = -1;
  641. AddInventoryItem(playerid,ItemInfo[i][ItemModel],ItemInfo[i][ItemAmount]);
  642. Delete3DTextLabel(ItemInfo[i][ItemLabel]);
  643. DestroyDynamicObject(ItemInfo[i][ItemObject]);
  644. ItemInfo[i][ItemAmount] = 0;
  645. ItemInfo[i][ItemModel] = 0;
  646. return 1;
  647. }
  648. }
  649. }
  650. return 1;
  651. }
  652. stock GetName(playerid)
  653. {
  654. new name[MAX_PLAYER_NAME];
  655. GetPlayerName(playerid, name, sizeof(name));
  656. return name;
  657. }
  658. LoadInventory(playerid)
  659. {
  660. new file[64];format(file,sizeof(file),"Inventory/%s.inv",GetName(playerid));
  661. new string[128];
  662. if(!fexist(file)) return 1;
  663. file_Open(file);
  664. InvInfo[playerid][MSlot] = file_GetVal("MSlot");
  665. InvInfo[playerid][Slotu] = file_GetVal("Slotu");
  666. for(new i = 0 ; i < MAX_INVENTOY_SLOTS ; i ++)
  667. {
  668. format(string,sizeof(string),"Slot%d",i);
  669. InvInfo[playerid][iSlot][i] = file_GetVal(string);
  670. format(string,sizeof(string),"Amount%d",i);
  671. InvInfo[playerid][iAmount][i] = file_GetVal(string);
  672. }
  673. file_Close();
  674. return 1;
  675. }
  676. SaveInventory(playerid)
  677. {
  678. new file[64];format(file,sizeof(file),"Inventory/%s.inv",GetName(playerid));
  679. new string[128];
  680. if(!fexist(file))
  681. {
  682. file_Create(file);
  683. }
  684. file_Open(file);
  685. file_SetVal("MSlot",InvInfo[playerid][MSlot]);
  686. file_SetVal("Slotu",InvInfo[playerid][Slotu]);
  687. for(new i = 0 ; i <MAX_INVENTOY_SLOTS ; i ++)
  688. {
  689. format(string,sizeof(string),"Slot%d",i);
  690. file_SetVal(string, InvInfo[playerid][iSlot][i]);
  691. format(string,sizeof(string),"Amount%d",i);
  692. file_SetVal(string, InvInfo[playerid][iAmount][i]);
  693. }
  694. file_Save(file);
  695. file_Close();
  696. return 1;
  697. }
  698. stock GetWeaponNameEx(weaponid, weapon[], len = sizeof(weapon))
  699. {
  700. switch (weaponid)
  701. {
  702. case 15:
  703. {
  704. return weapon[0] = 0, strcat(weapon, "Hatchet", len), true;
  705. }
  706. case 18:
  707. {
  708. return weapon[0] = 0, strcat(weapon, "Molotov Cocktail", len), true;
  709. }
  710. case 44:
  711. {
  712. return weapon[0] = 0, strcat(weapon, "Thermal Goggles", len), true;
  713. }
  714. case 45:
  715. {
  716. return weapon[0] = 0, strcat(weapon, "Night Vision Goggles", len), true;
  717. }
  718. default:
  719. {
  720. return GetWeaponName(weaponid, weapon, len);
  721. }
  722. }
  723. return false;
  724. }
  725. stock GetModelWeapon(weaponid)
  726. {
  727. switch(weaponid)
  728. {
  729. case 331:return 1;
  730. case 333:return 2;
  731. case 334:return 3;
  732. case 335:return 4;
  733. case 336:return 5;
  734. case 337:return 6;
  735. case 338:return 7;
  736. case 339:return 8;
  737. case 341:return 9;
  738. case 321:return 10;
  739. case 322:return 11;
  740. case 323:return 12;
  741. case 324:return 13;
  742. case 325:return 14;
  743. case 326:return 15;
  744. case 342:return 16;
  745. case 343:return 17;
  746. case 344:return 18;
  747. case 346:return 22;
  748. case 347:return 23;
  749. case 348:return 24;
  750. case 349:return 25;
  751. case 350:return 26;
  752. case 351:return 27;
  753. case 352:return 28;
  754. case 353:return 29;
  755. case 355:return 30;
  756. case 356:return 31;
  757. case 372:return 32;
  758. case 357:return 33;
  759. case 358:return 34;
  760. case 359:return 35;
  761. case 360:return 36;
  762. case 361:return 37;
  763. case 362:return 38;
  764. case 363:return 39;
  765. case 364:return 40;
  766. case 365:return 41;
  767. case 366:return 42;
  768. case 367:return 43;
  769. case 368:return 44;
  770. case 369:return 45;
  771. case 371:return 46;
  772. default: return -1;
  773. }
  774. return 0;
  775. }
  776. stock GetWeaponModel(weaponid)
  777. {
  778. switch(weaponid)
  779. {
  780. case 0: return 332;
  781. case 1: return 331;
  782. case 2: return 333;
  783. case 3: return 334;
  784. case 4: return 335;
  785. case 5: return 336;
  786. case 6: return 337;
  787. case 7: return 338;
  788. case 8: return 339;
  789. case 9: return 341;
  790. case 10: return 321;
  791. case 11: return 322;
  792. case 12: return 323;
  793. case 13: return 324;
  794. case 14: return 325;
  795. case 15: return 326;
  796. case 16: return 342;
  797. case 17: return 343;
  798. case 18: return 344;
  799. case 22: return 346;
  800. case 23: return 347;
  801. case 24: return 348;
  802. case 25: return 349;
  803. case 26: return 350;
  804. case 27: return 351;
  805. case 28: return 352;
  806. case 29: return 353;
  807. case 30: return 355;
  808. case 31: return 356;
  809. case 32: return 372;
  810. case 33: return 357;
  811. case 34: return 358;
  812. case 35: return 359;
  813. case 36: return 360;
  814. case 37: return 361;
  815. case 38: return 362;
  816. case 39: return 363;
  817. case 40: return 364;
  818. case 41: return 365;
  819. case 42: return 366;
  820. case 43: return 367;
  821. case 44: return 368;
  822. case 45: return 369;
  823. case 46: return 371;
  824. default: return -1;
  825. }
  826. return -1;
  827. }
  828. stock LoadInventoryTextDraw(playerid)
  829. {
  830. Textdraw0 = TextDrawCreate(1, 427, " ~w~[~w~ ~b~Brazil ~y~Good ~g~Life ~w~] ~w~[~r~Site~w~: ~g~site-~b~brazil~y~good~r~life~g~.forumeiros.com ~w~]");
  831. TextDrawBackgroundColor(Textdraw0, 255);
  832. TextDrawFont(Textdraw0, 2);
  833. TextDrawLetterSize(Textdraw0, 0.400000, 2.000000);
  834. TextDrawColor(Textdraw0, -1);
  835. TextDrawSetOutline(Textdraw0, 1);
  836. TextDrawSetProportional(Textdraw0, 1);
  837. TextDrawUseBox(Textdraw0, 1);
  838. TextDrawBoxColor(Textdraw0, 50); // < -- Conforme almente, ficará mais escuro, conforme abaixe, ficara mais claro o o box!
  839. TextDrawTextSize(Textdraw0, 646.000000, 0.000000);
  840.  
  841.  
  842. Inventory[0] = CreatePlayerTextDraw(playerid,179.000000, 349.000000, "_");
  843. PlayerTextDrawBackgroundColor(playerid,Inventory[0], 255);
  844. PlayerTextDrawFont(playerid,Inventory[0], 1);
  845. PlayerTextDrawLetterSize(playerid,Inventory[0], 0.500000, 10.499994);
  846. PlayerTextDrawColor(playerid,Inventory[0], -1);
  847. PlayerTextDrawSetOutline(playerid,Inventory[0], 0);
  848. PlayerTextDrawSetProportional(playerid,Inventory[0], 1);
  849. PlayerTextDrawSetShadow(playerid,Inventory[0], 1);
  850. PlayerTextDrawUseBox(playerid,Inventory[0], 1);
  851. PlayerTextDrawBoxColor(playerid,Inventory[0], 1129075760);
  852. PlayerTextDrawTextSize(playerid,Inventory[0], 318.000000, 0.000000);
  853. PlayerTextDrawSetSelectable(playerid,Inventory[0], 0);
  854.  
  855. Inventory[1] = CreatePlayerTextDraw(playerid,325.000000, 349.000000, "_");
  856. PlayerTextDrawBackgroundColor(playerid,Inventory[1], 255);
  857. PlayerTextDrawFont(playerid,Inventory[1], 1);
  858. PlayerTextDrawLetterSize(playerid,Inventory[1], 0.500000, 10.499994);
  859. PlayerTextDrawColor(playerid,Inventory[1], -1);
  860. PlayerTextDrawSetOutline(playerid,Inventory[1], 0);
  861. PlayerTextDrawSetProportional(playerid,Inventory[1], 1);
  862. PlayerTextDrawSetShadow(playerid,Inventory[1], 1);
  863. PlayerTextDrawUseBox(playerid,Inventory[1], 1);
  864. PlayerTextDrawBoxColor(playerid,Inventory[1], 1129075760);
  865. PlayerTextDrawTextSize(playerid,Inventory[1], 472.000000, 0.000000);
  866. PlayerTextDrawSetSelectable(playerid,Inventory[1], 0);
  867.  
  868. Inventory[2] = CreatePlayerTextDraw(playerid,179.000000, 338.000000, " Clique para usar Usando");
  869. PlayerTextDrawBackgroundColor(playerid,Inventory[2], 255);
  870. PlayerTextDrawFont(playerid,Inventory[2], 2);
  871. PlayerTextDrawLetterSize(playerid,Inventory[2], 0.130000, 0.699999);
  872. PlayerTextDrawColor(playerid,Inventory[2], -1);
  873. PlayerTextDrawSetOutline(playerid,Inventory[2], 0);
  874. PlayerTextDrawSetProportional(playerid,Inventory[2], 1);
  875. PlayerTextDrawSetShadow(playerid,Inventory[2], 1);
  876. PlayerTextDrawUseBox(playerid,Inventory[2], 1);
  877. PlayerTextDrawBoxColor(playerid,Inventory[2], 255);
  878. PlayerTextDrawTextSize(playerid,Inventory[2], 319.000000, 0.000000);
  879. PlayerTextDrawSetSelectable(playerid,Inventory[2], 0);
  880.  
  881. Inventory[3] = CreatePlayerTextDraw(playerid,325.000000, 338.000000, "Inventario 0/15");
  882. PlayerTextDrawBackgroundColor(playerid,Inventory[3], 255);
  883. PlayerTextDrawFont(playerid,Inventory[3], 2);
  884. PlayerTextDrawLetterSize(playerid,Inventory[3], 0.120000, 0.699999);
  885. PlayerTextDrawColor(playerid,Inventory[3], -1);
  886. PlayerTextDrawSetOutline(playerid,Inventory[3], 0);
  887. PlayerTextDrawSetProportional(playerid,Inventory[3], 1);
  888. PlayerTextDrawSetShadow(playerid,Inventory[3], 1);
  889. PlayerTextDrawUseBox(playerid,Inventory[3], 1);
  890. PlayerTextDrawBoxColor(playerid,Inventory[3], 255);
  891. PlayerTextDrawTextSize(playerid,Inventory[3], 472.000000, 0.000000);
  892. PlayerTextDrawSetSelectable(playerid,Inventory[3], 0);
  893.  
  894. Inventory[4] = CreatePlayerTextDraw(playerid,179.000000, 350.000000, "Skin");
  895. PlayerTextDrawBackgroundColor(playerid,Inventory[4], 0);
  896. PlayerTextDrawFont(playerid,Inventory[4], 5);
  897. PlayerTextDrawLetterSize(playerid,Inventory[4], 0.500000, 1.000000);
  898. PlayerTextDrawColor(playerid,Inventory[4], -1);
  899. PlayerTextDrawSetOutline(playerid,Inventory[4], 0);
  900. PlayerTextDrawSetProportional(playerid,Inventory[4], 1);
  901. PlayerTextDrawSetShadow(playerid,Inventory[4], 1);
  902. PlayerTextDrawUseBox(playerid,Inventory[4], 1);
  903. PlayerTextDrawBoxColor(playerid,Inventory[4], 0);
  904. PlayerTextDrawTextSize(playerid,Inventory[4], 43.000000, 77.000000);
  905. PlayerTextDrawSetPreviewModel(playerid, Inventory[4], 24);
  906. PlayerTextDrawSetPreviewRot(playerid, Inventory[4], 0.000000, 0.000000, 0.000000, 1.000000);
  907. PlayerTextDrawSetSelectable(playerid,Inventory[4], 1);
  908.  
  909. Inventory[5] = CreatePlayerTextDraw(playerid,227.000000, 347.000000, "Weaponhand");
  910. PlayerTextDrawBackgroundColor(playerid,Inventory[5], 0);
  911. PlayerTextDrawFont(playerid,Inventory[5], 5);
  912. PlayerTextDrawLetterSize(playerid,Inventory[5], 0.500000, -3.000000);
  913. PlayerTextDrawColor(playerid,Inventory[5], -1);
  914. PlayerTextDrawSetOutline(playerid,Inventory[5], 0);
  915. PlayerTextDrawSetProportional(playerid,Inventory[5], 1);
  916. PlayerTextDrawSetShadow(playerid,Inventory[5], 1);
  917. PlayerTextDrawUseBox(playerid,Inventory[5], 1);
  918. PlayerTextDrawBoxColor(playerid,Inventory[5], 0);
  919. PlayerTextDrawTextSize(playerid,Inventory[5], 92.000000, 69.000000);
  920. PlayerTextDrawSetPreviewModel(playerid, Inventory[5], 358);
  921. PlayerTextDrawSetPreviewRot(playerid, Inventory[5], 0.000000, 0.000000, -44.000000, 1.000000);
  922. PlayerTextDrawSetSelectable(playerid,Inventory[5], 1);
  923.  
  924. Inventory[6] = CreatePlayerTextDraw(playerid,226.000000, 349.000000, "_");
  925. PlayerTextDrawBackgroundColor(playerid,Inventory[6], 255);
  926. PlayerTextDrawFont(playerid,Inventory[6], 1);
  927. PlayerTextDrawLetterSize(playerid,Inventory[6], 0.500000, 10.499998);
  928. PlayerTextDrawColor(playerid,Inventory[6], -1);
  929. PlayerTextDrawSetOutline(playerid,Inventory[6], 0);
  930. PlayerTextDrawSetProportional(playerid,Inventory[6], 1);
  931. PlayerTextDrawSetShadow(playerid,Inventory[6], 1);
  932. PlayerTextDrawUseBox(playerid,Inventory[6], 1);
  933. PlayerTextDrawBoxColor(playerid,Inventory[6], 255);
  934. PlayerTextDrawTextSize(playerid,Inventory[6], 225.000000, 0.000000);
  935. PlayerTextDrawSetSelectable(playerid,Inventory[6], 0);
  936.  
  937. Inventory[7] = CreatePlayerTextDraw(playerid,178.000000, 427.000000, "LD_BEAT:left");
  938. PlayerTextDrawBackgroundColor(playerid,Inventory[7], 255);
  939. PlayerTextDrawFont(playerid,Inventory[7], 4);
  940. PlayerTextDrawLetterSize(playerid,Inventory[7], 0.500000, 1.000000);
  941. PlayerTextDrawColor(playerid,Inventory[7], -1);
  942. PlayerTextDrawSetOutline(playerid,Inventory[7], 0);
  943. PlayerTextDrawSetProportional(playerid,Inventory[7], 1);
  944. PlayerTextDrawSetShadow(playerid,Inventory[7], 1);
  945. PlayerTextDrawUseBox(playerid,Inventory[7], 1);
  946. PlayerTextDrawBoxColor(playerid,Inventory[7], 255);
  947. PlayerTextDrawTextSize(playerid,Inventory[7], 12.000000, 18.000000);
  948. PlayerTextDrawSetSelectable(playerid,Inventory[7], 1);
  949.  
  950. Inventory[8] = CreatePlayerTextDraw(playerid,229.000000, 411.000000, "Item");
  951. PlayerTextDrawBackgroundColor(playerid,Inventory[8], 255);
  952. PlayerTextDrawFont(playerid,Inventory[8], 2);
  953. PlayerTextDrawLetterSize(playerid,Inventory[8], 0.210000, 0.499999);
  954. PlayerTextDrawColor(playerid,Inventory[8], -1);
  955. PlayerTextDrawSetOutline(playerid,Inventory[8], 0);
  956. PlayerTextDrawSetProportional(playerid,Inventory[8], 1);
  957. PlayerTextDrawSetShadow(playerid,Inventory[8], 1);
  958. PlayerTextDrawUseBox(playerid,Inventory[8], 1);
  959. PlayerTextDrawBoxColor(playerid,Inventory[8], 255);
  960. PlayerTextDrawTextSize(playerid,Inventory[8], 318.000000, 30.000000);
  961. PlayerTextDrawSetSelectable(playerid,Inventory[8], 0);
  962.  
  963. Inventory[9] = CreatePlayerTextDraw(playerid,230.000000, 420.000000, "");
  964. PlayerTextDrawBackgroundColor(playerid,Inventory[9], 0);
  965. PlayerTextDrawFont(playerid,Inventory[9], 2);
  966. PlayerTextDrawLetterSize(playerid,Inventory[9], 0.140000, 0.799999);
  967. PlayerTextDrawColor(playerid,Inventory[9], 255);
  968. PlayerTextDrawSetOutline(playerid,Inventory[9], 0);
  969. PlayerTextDrawSetProportional(playerid,Inventory[9], 1);
  970. PlayerTextDrawSetShadow(playerid,Inventory[9], 1);
  971. PlayerTextDrawSetSelectable(playerid,Inventory[9], 0);
  972.  
  973. Inventory[10] = CreatePlayerTextDraw(playerid,230.000000, 431.000000, "SlotUse:2");
  974. PlayerTextDrawBackgroundColor(playerid,Inventory[10], 0);
  975. PlayerTextDrawFont(playerid,Inventory[10], 2);
  976. PlayerTextDrawLetterSize(playerid,Inventory[10], 0.140000, 0.799999);
  977. PlayerTextDrawColor(playerid,Inventory[10], 255);
  978. PlayerTextDrawSetOutline(playerid,Inventory[10], 0);
  979. PlayerTextDrawSetProportional(playerid,Inventory[10], 1);
  980. PlayerTextDrawSetShadow(playerid,Inventory[10], 1);
  981. PlayerTextDrawSetSelectable(playerid,Inventory[10], 0);
  982.  
  983. Inventory[11] = CreatePlayerTextDraw(playerid,211.000000, 427.000000, "LD_BEAT:right");
  984. PlayerTextDrawBackgroundColor(playerid,Inventory[11], 255);
  985. PlayerTextDrawFont(playerid,Inventory[11], 4);
  986. PlayerTextDrawLetterSize(playerid,Inventory[11], 0.500000, 1.000000);
  987. PlayerTextDrawColor(playerid,Inventory[11], -1);
  988. PlayerTextDrawSetOutline(playerid,Inventory[11], 0);
  989. PlayerTextDrawSetProportional(playerid,Inventory[11], 1);
  990. PlayerTextDrawSetShadow(playerid,Inventory[11], 1);
  991. PlayerTextDrawUseBox(playerid,Inventory[11], 1);
  992. PlayerTextDrawBoxColor(playerid,Inventory[11], 255);
  993. PlayerTextDrawTextSize(playerid,Inventory[11], 12.000000, 18.000000);
  994. PlayerTextDrawSetSelectable(playerid,Inventory[11], 1);
  995.  
  996. Inventory[12] = CreatePlayerTextDraw(playerid,195.000000, 426.000000, "hud:arrow");
  997. PlayerTextDrawBackgroundColor(playerid,Inventory[12], 255);
  998. PlayerTextDrawFont(playerid,Inventory[12], 4);
  999. PlayerTextDrawLetterSize(playerid,Inventory[12], 0.500000, 1.000000);
  1000. PlayerTextDrawColor(playerid,Inventory[12], -1);
  1001. PlayerTextDrawSetOutline(playerid,Inventory[12], 0);
  1002. PlayerTextDrawSetProportional(playerid,Inventory[12], 1);
  1003. PlayerTextDrawSetShadow(playerid,Inventory[12], 1);
  1004. PlayerTextDrawUseBox(playerid,Inventory[12], 1);
  1005. PlayerTextDrawBoxColor(playerid,Inventory[12], 255);
  1006. PlayerTextDrawTextSize(playerid,Inventory[12], 12.000000, 18.000000);
  1007. PlayerTextDrawSetSelectable(playerid,Inventory[12], 1);
  1008.  
  1009. Inventory[13] = CreatePlayerTextDraw(playerid,325.000000, 438.000000, "Projeto Brasil Good Life");
  1010. PlayerTextDrawBackgroundColor(playerid,Inventory[13], 255);
  1011. PlayerTextDrawFont(playerid,Inventory[13], 2);
  1012. PlayerTextDrawLetterSize(playerid,Inventory[13], 0.120000, 0.699999);
  1013. PlayerTextDrawColor(playerid,Inventory[13], -1);
  1014. PlayerTextDrawSetOutline(playerid,Inventory[13], 0);
  1015. PlayerTextDrawSetProportional(playerid,Inventory[13], 1);
  1016. PlayerTextDrawSetShadow(playerid,Inventory[13], 1);
  1017. PlayerTextDrawUseBox(playerid,Inventory[13], 1);
  1018. PlayerTextDrawBoxColor(playerid,Inventory[13], 255);
  1019. PlayerTextDrawTextSize(playerid,Inventory[13], 472.000000, 0.000000);
  1020. PlayerTextDrawSetSelectable(playerid,Inventory[13], 0);
  1021.  
  1022. InvItem[0] = CreatePlayerTextDraw(playerid,324.000000, 348.000000, "Item0");
  1023. PlayerTextDrawBackgroundColor(playerid,InvItem[0], -1347440726);
  1024. PlayerTextDrawFont(playerid,InvItem[0], 5);
  1025. PlayerTextDrawLetterSize(playerid,InvItem[0], 0.500000, 1.000000);
  1026. PlayerTextDrawColor(playerid,InvItem[0], -1);
  1027. PlayerTextDrawSetOutline(playerid,InvItem[0], 0);
  1028. PlayerTextDrawSetProportional(playerid,InvItem[0], 1);
  1029. PlayerTextDrawSetShadow(playerid,InvItem[0], 1);
  1030. PlayerTextDrawUseBox(playerid,InvItem[0], 1);
  1031. PlayerTextDrawBoxColor(playerid,InvItem[0], 0);
  1032. PlayerTextDrawTextSize(playerid,InvItem[0], 13.000000, 15.000000);
  1033. PlayerTextDrawSetPreviewModel(playerid, InvItem[0], 1580);
  1034. PlayerTextDrawSetPreviewRot(playerid, InvItem[0], 0.000000, 0.000000, 0.000000, 1.000000);
  1035. PlayerTextDrawSetSelectable(playerid,InvItem[0], 1);
  1036.  
  1037. InvItem[1] = CreatePlayerTextDraw(playerid,339.000000, 348.000000, "Item1");
  1038. PlayerTextDrawBackgroundColor(playerid,InvItem[1], -1347440726);
  1039. PlayerTextDrawFont(playerid,InvItem[1], 5);
  1040. PlayerTextDrawLetterSize(playerid,InvItem[1], 0.500000, 1.000000);
  1041. PlayerTextDrawColor(playerid,InvItem[1], -1);
  1042. PlayerTextDrawSetOutline(playerid,InvItem[1], 0);
  1043. PlayerTextDrawSetProportional(playerid,InvItem[1], 1);
  1044. PlayerTextDrawSetShadow(playerid,InvItem[1], 1);
  1045. PlayerTextDrawUseBox(playerid,InvItem[1], 1);
  1046. PlayerTextDrawBoxColor(playerid,InvItem[1], 0);
  1047. PlayerTextDrawTextSize(playerid,InvItem[1], 13.000000, 15.000000);
  1048. PlayerTextDrawSetPreviewModel(playerid, InvItem[1], 1580);
  1049. PlayerTextDrawSetPreviewRot(playerid, InvItem[1], 0.000000, 0.000000, 0.000000, 1.000000);
  1050. PlayerTextDrawSetSelectable(playerid,InvItem[1], 1);
  1051.  
  1052. InvItem[2] = CreatePlayerTextDraw(playerid,354.000000, 348.000000, "Item2");
  1053. PlayerTextDrawBackgroundColor(playerid,InvItem[2], -1347440726);
  1054. PlayerTextDrawFont(playerid,InvItem[2], 5);
  1055. PlayerTextDrawLetterSize(playerid,InvItem[2], 0.500000, 1.000000);
  1056. PlayerTextDrawColor(playerid,InvItem[2], -1);
  1057. PlayerTextDrawSetOutline(playerid,InvItem[2], 0);
  1058. PlayerTextDrawSetProportional(playerid,InvItem[2], 1);
  1059. PlayerTextDrawSetShadow(playerid,InvItem[2], 1);
  1060. PlayerTextDrawUseBox(playerid,InvItem[2], 1);
  1061. PlayerTextDrawBoxColor(playerid,InvItem[2], 0);
  1062. PlayerTextDrawTextSize(playerid,InvItem[2], 13.000000, 15.000000);
  1063. PlayerTextDrawSetPreviewModel(playerid, InvItem[2], 1580);
  1064. PlayerTextDrawSetPreviewRot(playerid, InvItem[2], 0.000000, 0.000000, 0.000000, 1.000000);
  1065. PlayerTextDrawSetSelectable(playerid,InvItem[2], 1);
  1066.  
  1067. InvItem[3] = CreatePlayerTextDraw(playerid,369.000000, 348.000000, "Item3");
  1068. PlayerTextDrawBackgroundColor(playerid,InvItem[3], -1347440726);
  1069. PlayerTextDrawFont(playerid,InvItem[3], 5);
  1070. PlayerTextDrawLetterSize(playerid,InvItem[3], 0.500000, 1.000000);
  1071. PlayerTextDrawColor(playerid,InvItem[3], -1);
  1072. PlayerTextDrawSetOutline(playerid,InvItem[3], 0);
  1073. PlayerTextDrawSetProportional(playerid,InvItem[3], 1);
  1074. PlayerTextDrawSetShadow(playerid,InvItem[3], 1);
  1075. PlayerTextDrawUseBox(playerid,InvItem[3], 1);
  1076. PlayerTextDrawBoxColor(playerid,InvItem[3], 0);
  1077. PlayerTextDrawTextSize(playerid,InvItem[3], 13.000000, 15.000000);
  1078. PlayerTextDrawSetPreviewModel(playerid, InvItem[3], 1580);
  1079. PlayerTextDrawSetPreviewRot(playerid, InvItem[3], 0.000000, 0.000000, 0.000000, 1.000000);
  1080. PlayerTextDrawSetSelectable(playerid,InvItem[3], 1);
  1081.  
  1082. InvItem[4] = CreatePlayerTextDraw(playerid,384.000000, 348.000000, "item4");
  1083. PlayerTextDrawBackgroundColor(playerid,InvItem[4], -1347440726);
  1084. PlayerTextDrawFont(playerid,InvItem[4], 5);
  1085. PlayerTextDrawLetterSize(playerid,InvItem[4], 0.500000, 1.000000);
  1086. PlayerTextDrawColor(playerid,InvItem[4], -1);
  1087. PlayerTextDrawSetOutline(playerid,InvItem[4], 0);
  1088. PlayerTextDrawSetProportional(playerid,InvItem[4], 1);
  1089. PlayerTextDrawSetShadow(playerid,InvItem[4], 1);
  1090. PlayerTextDrawUseBox(playerid,InvItem[4], 1);
  1091. PlayerTextDrawBoxColor(playerid,InvItem[4], 0);
  1092. PlayerTextDrawTextSize(playerid,InvItem[4], 13.000000, 15.000000);
  1093. PlayerTextDrawSetPreviewModel(playerid, InvItem[4], 1580);
  1094. PlayerTextDrawSetPreviewRot(playerid, InvItem[4], 0.000000, 0.000000, 0.000000, 1.000000);
  1095. PlayerTextDrawSetSelectable(playerid,InvItem[4], 1);
  1096.  
  1097. InvItem[5] = CreatePlayerTextDraw(playerid,399.000000, 348.000000, "item5");
  1098. PlayerTextDrawBackgroundColor(playerid,InvItem[5], -1347440726);
  1099. PlayerTextDrawFont(playerid,InvItem[5], 5);
  1100. PlayerTextDrawLetterSize(playerid,InvItem[5], 0.500000, 1.000000);
  1101. PlayerTextDrawColor(playerid,InvItem[5], -1);
  1102. PlayerTextDrawSetOutline(playerid,InvItem[5], 0);
  1103. PlayerTextDrawSetProportional(playerid,InvItem[5], 1);
  1104. PlayerTextDrawSetShadow(playerid,InvItem[5], 1);
  1105. PlayerTextDrawUseBox(playerid,InvItem[5], 1);
  1106. PlayerTextDrawBoxColor(playerid,InvItem[5], 0);
  1107. PlayerTextDrawTextSize(playerid,InvItem[5], 13.000000, 15.000000);
  1108. PlayerTextDrawSetPreviewModel(playerid, InvItem[5], 1580);
  1109. PlayerTextDrawSetPreviewRot(playerid, InvItem[5], 0.000000, 0.000000, 0.000000, 1.000000);
  1110. PlayerTextDrawSetSelectable(playerid,InvItem[5], 1);
  1111.  
  1112. InvItem[6] = CreatePlayerTextDraw(playerid,414.000000, 348.000000, "item6");
  1113. PlayerTextDrawBackgroundColor(playerid,InvItem[6], -1347440726);
  1114. PlayerTextDrawFont(playerid,InvItem[6], 5);
  1115. PlayerTextDrawLetterSize(playerid,InvItem[6], 0.500000, 1.000000);
  1116. PlayerTextDrawColor(playerid,InvItem[6], -1);
  1117. PlayerTextDrawSetOutline(playerid,InvItem[6], 0);
  1118. PlayerTextDrawSetProportional(playerid,InvItem[6], 1);
  1119. PlayerTextDrawSetShadow(playerid,InvItem[6], 1);
  1120. PlayerTextDrawUseBox(playerid,InvItem[6], 1);
  1121. PlayerTextDrawBoxColor(playerid,InvItem[6], 0);
  1122. PlayerTextDrawTextSize(playerid,InvItem[6], 13.000000, 15.000000);
  1123. PlayerTextDrawSetPreviewModel(playerid, InvItem[6], 1580);
  1124. PlayerTextDrawSetPreviewRot(playerid, InvItem[6], 0.000000, 0.000000, 0.000000, 1.000000);
  1125. PlayerTextDrawSetSelectable(playerid,InvItem[6], 1);
  1126.  
  1127. InvItem[7] = CreatePlayerTextDraw(playerid,429.000000, 348.000000, "item7");
  1128. PlayerTextDrawBackgroundColor(playerid,InvItem[7], -1347440726);
  1129. PlayerTextDrawFont(playerid,InvItem[7], 5);
  1130. PlayerTextDrawLetterSize(playerid,InvItem[7], 0.500000, 1.000000);
  1131. PlayerTextDrawColor(playerid,InvItem[7], -1);
  1132. PlayerTextDrawSetOutline(playerid,InvItem[7], 0);
  1133. PlayerTextDrawSetProportional(playerid,InvItem[7], 1);
  1134. PlayerTextDrawSetShadow(playerid,InvItem[7], 1);
  1135. PlayerTextDrawUseBox(playerid,InvItem[7], 1);
  1136. PlayerTextDrawBoxColor(playerid,InvItem[7], 0);
  1137. PlayerTextDrawTextSize(playerid,InvItem[7], 13.000000, 15.000000);
  1138. PlayerTextDrawSetPreviewModel(playerid, InvItem[7], 1580);
  1139. PlayerTextDrawSetPreviewRot(playerid, InvItem[7], 0.000000, 0.000000, 0.000000, 1.000000);
  1140. PlayerTextDrawSetSelectable(playerid,InvItem[7], 1);
  1141.  
  1142. InvItem[8] = CreatePlayerTextDraw(playerid,444.000000, 348.000000, "item8");
  1143. PlayerTextDrawBackgroundColor(playerid,InvItem[8], -1347440726);
  1144. PlayerTextDrawFont(playerid,InvItem[8], 5);
  1145. PlayerTextDrawLetterSize(playerid,InvItem[8], 0.500000, 1.000000);
  1146. PlayerTextDrawColor(playerid,InvItem[8], -1);
  1147. PlayerTextDrawSetOutline(playerid,InvItem[8], 0);
  1148. PlayerTextDrawSetProportional(playerid,InvItem[8], 1);
  1149. PlayerTextDrawSetShadow(playerid,InvItem[8], 1);
  1150. PlayerTextDrawUseBox(playerid,InvItem[8], 1);
  1151. PlayerTextDrawBoxColor(playerid,InvItem[8], 0);
  1152. PlayerTextDrawTextSize(playerid,InvItem[8], 13.000000, 15.000000);
  1153. PlayerTextDrawSetPreviewModel(playerid, InvItem[8], 1580);
  1154. PlayerTextDrawSetPreviewRot(playerid, InvItem[8], 0.000000, 0.000000, 0.000000, 1.000000);
  1155. PlayerTextDrawSetSelectable(playerid,InvItem[8], 1);
  1156.  
  1157. InvItem[9] = CreatePlayerTextDraw(playerid,459.000000, 348.000000, "item9");
  1158. PlayerTextDrawBackgroundColor(playerid,InvItem[9], -1347440726);
  1159. PlayerTextDrawFont(playerid,InvItem[9], 5);
  1160. PlayerTextDrawLetterSize(playerid,InvItem[9], 0.500000, 1.000000);
  1161. PlayerTextDrawColor(playerid,InvItem[9], -1);
  1162. PlayerTextDrawSetOutline(playerid,InvItem[9], 0);
  1163. PlayerTextDrawSetProportional(playerid,InvItem[9], 1);
  1164. PlayerTextDrawSetShadow(playerid,InvItem[9], 1);
  1165. PlayerTextDrawUseBox(playerid,InvItem[9], 1);
  1166. PlayerTextDrawBoxColor(playerid,InvItem[9], 0);
  1167. PlayerTextDrawTextSize(playerid,InvItem[9], 13.000000, 15.000000);
  1168. PlayerTextDrawSetPreviewModel(playerid, InvItem[9], 1580);
  1169. PlayerTextDrawSetPreviewRot(playerid, InvItem[9], 0.000000, 0.000000, 0.000000, 1.000000);
  1170. PlayerTextDrawSetSelectable(playerid,InvItem[9], 1);
  1171.  
  1172. InvItem[10] = CreatePlayerTextDraw(playerid,324.000000, 366.000000, "item10");
  1173. PlayerTextDrawBackgroundColor(playerid,InvItem[10], -1347440726);
  1174. PlayerTextDrawFont(playerid,InvItem[10], 5);
  1175. PlayerTextDrawLetterSize(playerid,InvItem[10], 0.500000, 1.000000);
  1176. PlayerTextDrawColor(playerid,InvItem[10], -1);
  1177. PlayerTextDrawSetOutline(playerid,InvItem[10], 0);
  1178. PlayerTextDrawSetProportional(playerid,InvItem[10], 1);
  1179. PlayerTextDrawSetShadow(playerid,InvItem[10], 1);
  1180. PlayerTextDrawUseBox(playerid,InvItem[10], 1);
  1181. PlayerTextDrawBoxColor(playerid,InvItem[10], 0);
  1182. PlayerTextDrawTextSize(playerid,InvItem[10], 13.000000, 15.000000);
  1183. PlayerTextDrawSetPreviewModel(playerid, InvItem[10], 1580);
  1184. PlayerTextDrawSetPreviewRot(playerid, InvItem[10], 0.000000, 0.000000, 0.000000, 1.000000);
  1185. PlayerTextDrawSetSelectable(playerid,InvItem[10], 1);
  1186.  
  1187. InvItem[11] = CreatePlayerTextDraw(playerid,339.000000, 366.000000, "item11");
  1188. PlayerTextDrawBackgroundColor(playerid,InvItem[11], -1347440726);
  1189. PlayerTextDrawFont(playerid,InvItem[11], 5);
  1190. PlayerTextDrawLetterSize(playerid,InvItem[11], 0.500000, 1.000000);
  1191. PlayerTextDrawColor(playerid,InvItem[11], -1);
  1192. PlayerTextDrawSetOutline(playerid,InvItem[11], 0);
  1193. PlayerTextDrawSetProportional(playerid,InvItem[11], 1);
  1194. PlayerTextDrawSetShadow(playerid,InvItem[11], 1);
  1195. PlayerTextDrawUseBox(playerid,InvItem[11], 1);
  1196. PlayerTextDrawBoxColor(playerid,InvItem[11], 0);
  1197. PlayerTextDrawTextSize(playerid,InvItem[11], 13.000000, 15.000000);
  1198. PlayerTextDrawSetPreviewModel(playerid, InvItem[11], 1580);
  1199. PlayerTextDrawSetPreviewRot(playerid, InvItem[11], 0.000000, 0.000000, 0.000000, 1.000000);
  1200. PlayerTextDrawSetSelectable(playerid,InvItem[11], 1);
  1201.  
  1202. InvItem[12] = CreatePlayerTextDraw(playerid,354.000000, 366.000000, "item12");
  1203. PlayerTextDrawBackgroundColor(playerid,InvItem[12], -1347440726);
  1204. PlayerTextDrawFont(playerid,InvItem[12], 5);
  1205. PlayerTextDrawLetterSize(playerid,InvItem[12], 0.500000, 1.000000);
  1206. PlayerTextDrawColor(playerid,InvItem[12], -1);
  1207. PlayerTextDrawSetOutline(playerid,InvItem[12], 0);
  1208. PlayerTextDrawSetProportional(playerid,InvItem[12], 1);
  1209. PlayerTextDrawSetShadow(playerid,InvItem[12], 1);
  1210. PlayerTextDrawUseBox(playerid,InvItem[12], 1);
  1211. PlayerTextDrawBoxColor(playerid,InvItem[12], 0);
  1212. PlayerTextDrawTextSize(playerid,InvItem[12], 13.000000, 15.000000);
  1213. PlayerTextDrawSetPreviewModel(playerid, InvItem[12], 1580);
  1214. PlayerTextDrawSetPreviewRot(playerid, InvItem[12], 0.000000, 0.000000, 0.000000, 1.000000);
  1215. PlayerTextDrawSetSelectable(playerid,InvItem[12], 1);
  1216.  
  1217. InvItem[13] = CreatePlayerTextDraw(playerid,369.000000, 366.000000, "item13");
  1218. PlayerTextDrawBackgroundColor(playerid,InvItem[13], -1347440726);
  1219. PlayerTextDrawFont(playerid,InvItem[13], 5);
  1220. PlayerTextDrawLetterSize(playerid,InvItem[13], 0.500000, 1.000000);
  1221. PlayerTextDrawColor(playerid,InvItem[13], -1);
  1222. PlayerTextDrawSetOutline(playerid,InvItem[13], 0);
  1223. PlayerTextDrawSetProportional(playerid,InvItem[13], 1);
  1224. PlayerTextDrawSetShadow(playerid,InvItem[13], 1);
  1225. PlayerTextDrawUseBox(playerid,InvItem[13], 1);
  1226. PlayerTextDrawBoxColor(playerid,InvItem[13], 0);
  1227. PlayerTextDrawTextSize(playerid,InvItem[13], 13.000000, 15.000000);
  1228. PlayerTextDrawSetPreviewModel(playerid, InvItem[13], 1580);
  1229. PlayerTextDrawSetPreviewRot(playerid, InvItem[13], 0.000000, 0.000000, 0.000000, 1.000000);
  1230. PlayerTextDrawSetSelectable(playerid,InvItem[13], 1);
  1231.  
  1232. InvItem[14] = CreatePlayerTextDraw(playerid,384.000000, 366.000000, "item14");
  1233. PlayerTextDrawBackgroundColor(playerid,InvItem[14], -1347440726);
  1234. PlayerTextDrawFont(playerid,InvItem[14], 5);
  1235. PlayerTextDrawLetterSize(playerid,InvItem[14], 0.500000, 1.000000);
  1236. PlayerTextDrawColor(playerid,InvItem[14], -1);
  1237. PlayerTextDrawSetOutline(playerid,InvItem[14], 0);
  1238. PlayerTextDrawSetProportional(playerid,InvItem[14], 1);
  1239. PlayerTextDrawSetShadow(playerid,InvItem[14], 1);
  1240. PlayerTextDrawUseBox(playerid,InvItem[14], 1);
  1241. PlayerTextDrawBoxColor(playerid,InvItem[14], 0);
  1242. PlayerTextDrawTextSize(playerid,InvItem[14], 13.000000, 15.000000);
  1243. PlayerTextDrawSetPreviewModel(playerid, InvItem[14], 1580);
  1244. PlayerTextDrawSetPreviewRot(playerid, InvItem[14], 0.000000, 0.000000, 0.000000, 1.000000);
  1245. PlayerTextDrawSetSelectable(playerid,InvItem[14], 1);
  1246.  
  1247. InvItem[15] = CreatePlayerTextDraw(playerid,399.000000, 366.000000, "item15");
  1248. PlayerTextDrawBackgroundColor(playerid,InvItem[15], -1347440726);
  1249. PlayerTextDrawFont(playerid,InvItem[15], 5);
  1250. PlayerTextDrawLetterSize(playerid,InvItem[15], 0.500000, 1.000000);
  1251. PlayerTextDrawColor(playerid,InvItem[15], -1);
  1252. PlayerTextDrawSetOutline(playerid,InvItem[15], 0);
  1253. PlayerTextDrawSetProportional(playerid,InvItem[15], 1);
  1254. PlayerTextDrawSetShadow(playerid,InvItem[15], 1);
  1255. PlayerTextDrawUseBox(playerid,InvItem[15], 1);
  1256. PlayerTextDrawBoxColor(playerid,InvItem[15], 0);
  1257. PlayerTextDrawTextSize(playerid,InvItem[15], 13.000000, 15.000000);
  1258. PlayerTextDrawSetPreviewModel(playerid, InvItem[15], 1580);
  1259. PlayerTextDrawSetPreviewRot(playerid, InvItem[15], 0.000000, 0.000000, 0.000000, 1.000000);
  1260. PlayerTextDrawSetSelectable(playerid,InvItem[15], 1);
  1261.  
  1262. InvItem[16] = CreatePlayerTextDraw(playerid,414.000000, 366.000000, "item16");
  1263. PlayerTextDrawBackgroundColor(playerid,InvItem[16], -1347440726);
  1264. PlayerTextDrawFont(playerid,InvItem[16], 5);
  1265. PlayerTextDrawLetterSize(playerid,InvItem[16], 0.500000, 1.000000);
  1266. PlayerTextDrawColor(playerid,InvItem[16], -1);
  1267. PlayerTextDrawSetOutline(playerid,InvItem[16], 0);
  1268. PlayerTextDrawSetProportional(playerid,InvItem[16], 1);
  1269. PlayerTextDrawSetShadow(playerid,InvItem[16], 1);
  1270. PlayerTextDrawUseBox(playerid,InvItem[16], 1);
  1271. PlayerTextDrawBoxColor(playerid,InvItem[16], 0);
  1272. PlayerTextDrawTextSize(playerid,InvItem[16], 13.000000, 15.000000);
  1273. PlayerTextDrawSetPreviewModel(playerid, InvItem[16], 1580);
  1274. PlayerTextDrawSetPreviewRot(playerid, InvItem[16], 0.000000, 0.000000, 0.000000, 1.000000);
  1275. PlayerTextDrawSetSelectable(playerid,InvItem[16], 1);
  1276.  
  1277. InvItem[17] = CreatePlayerTextDraw(playerid,429.000000, 366.000000, "item17");
  1278. PlayerTextDrawBackgroundColor(playerid,InvItem[17], -1347440726);
  1279. PlayerTextDrawFont(playerid,InvItem[17], 5);
  1280. PlayerTextDrawLetterSize(playerid,InvItem[17], 0.500000, 1.000000);
  1281. PlayerTextDrawColor(playerid,InvItem[17], -1);
  1282. PlayerTextDrawSetOutline(playerid,InvItem[17], 0);
  1283. PlayerTextDrawSetProportional(playerid,InvItem[17], 1);
  1284. PlayerTextDrawSetShadow(playerid,InvItem[17], 1);
  1285. PlayerTextDrawUseBox(playerid,InvItem[17], 1);
  1286. PlayerTextDrawBoxColor(playerid,InvItem[17], 0);
  1287. PlayerTextDrawTextSize(playerid,InvItem[17], 13.000000, 15.000000);
  1288. PlayerTextDrawSetPreviewModel(playerid, InvItem[17], 1580);
  1289. PlayerTextDrawSetPreviewRot(playerid, InvItem[17], 0.000000, 0.000000, 0.000000, 1.000000);
  1290. PlayerTextDrawSetSelectable(playerid,InvItem[17], 1);
  1291.  
  1292. InvItem[18] = CreatePlayerTextDraw(playerid,444.000000, 366.000000, "item18");
  1293. PlayerTextDrawBackgroundColor(playerid,InvItem[18], -1347440726);
  1294. PlayerTextDrawFont(playerid,InvItem[18], 5);
  1295. PlayerTextDrawLetterSize(playerid,InvItem[18], 0.500000, 1.000000);
  1296. PlayerTextDrawColor(playerid,InvItem[18], -1);
  1297. PlayerTextDrawSetOutline(playerid,InvItem[18], 0);
  1298. PlayerTextDrawSetProportional(playerid,InvItem[18], 1);
  1299. PlayerTextDrawSetShadow(playerid,InvItem[18], 1);
  1300. PlayerTextDrawUseBox(playerid,InvItem[18], 1);
  1301. PlayerTextDrawBoxColor(playerid,InvItem[18], 0);
  1302. PlayerTextDrawTextSize(playerid,InvItem[18], 13.000000, 15.000000);
  1303. PlayerTextDrawSetPreviewModel(playerid, InvItem[18], 1580);
  1304. PlayerTextDrawSetPreviewRot(playerid, InvItem[18], 0.000000, 0.000000, 0.000000, 1.000000);
  1305. PlayerTextDrawSetSelectable(playerid,InvItem[18], 1);
  1306.  
  1307. InvItem[19] = CreatePlayerTextDraw(playerid,459.000000, 366.000000, "item19");
  1308. PlayerTextDrawBackgroundColor(playerid,InvItem[19], -1347440726);
  1309. PlayerTextDrawFont(playerid,InvItem[19], 5);
  1310. PlayerTextDrawLetterSize(playerid,InvItem[19], 0.500000, 1.000000);
  1311. PlayerTextDrawColor(playerid,InvItem[19], -1);
  1312. PlayerTextDrawSetOutline(playerid,InvItem[19], 0);
  1313. PlayerTextDrawSetProportional(playerid,InvItem[19], 1);
  1314. PlayerTextDrawSetShadow(playerid,InvItem[19], 1);
  1315. PlayerTextDrawUseBox(playerid,InvItem[19], 1);
  1316. PlayerTextDrawBoxColor(playerid,InvItem[19], 0);
  1317. PlayerTextDrawTextSize(playerid,InvItem[19], 13.000000, 15.000000);
  1318. PlayerTextDrawSetPreviewModel(playerid, InvItem[19], 1580);
  1319. PlayerTextDrawSetPreviewRot(playerid, InvItem[19], 0.000000, 0.000000, 0.000000, 1.000000);
  1320. PlayerTextDrawSetSelectable(playerid,InvItem[19], 1);
  1321.  
  1322. InvItem[20] = CreatePlayerTextDraw(playerid,324.000000, 384.000000, "item20");
  1323. PlayerTextDrawBackgroundColor(playerid,InvItem[20], -1347440726);
  1324. PlayerTextDrawFont(playerid,InvItem[20], 5);
  1325. PlayerTextDrawLetterSize(playerid,InvItem[20], 0.500000, 1.000000);
  1326. PlayerTextDrawColor(playerid,InvItem[20], -1);
  1327. PlayerTextDrawSetOutline(playerid,InvItem[20], 0);
  1328. PlayerTextDrawSetProportional(playerid,InvItem[20], 1);
  1329. PlayerTextDrawSetShadow(playerid,InvItem[20], 1);
  1330. PlayerTextDrawUseBox(playerid,InvItem[20], 1);
  1331. PlayerTextDrawBoxColor(playerid,InvItem[20], 0);
  1332. PlayerTextDrawTextSize(playerid,InvItem[20], 13.000000, 15.000000);
  1333. PlayerTextDrawSetPreviewModel(playerid, InvItem[20], 1580);
  1334. PlayerTextDrawSetPreviewRot(playerid, InvItem[20], 0.000000, 0.000000, 0.000000, 1.000000);
  1335. PlayerTextDrawSetSelectable(playerid,InvItem[20], 1);
  1336.  
  1337. InvItem[21] = CreatePlayerTextDraw(playerid,339.000000, 384.000000, "item21");
  1338. PlayerTextDrawBackgroundColor(playerid,InvItem[21], -1347440726);
  1339. PlayerTextDrawFont(playerid,InvItem[21], 5);
  1340. PlayerTextDrawLetterSize(playerid,InvItem[21], 0.500000, 1.000000);
  1341. PlayerTextDrawColor(playerid,InvItem[21], -1);
  1342. PlayerTextDrawSetOutline(playerid,InvItem[21], 0);
  1343. PlayerTextDrawSetProportional(playerid,InvItem[21], 1);
  1344. PlayerTextDrawSetShadow(playerid,InvItem[21], 1);
  1345. PlayerTextDrawUseBox(playerid,InvItem[21], 1);
  1346. PlayerTextDrawBoxColor(playerid,InvItem[21], 0);
  1347. PlayerTextDrawTextSize(playerid,InvItem[21], 13.000000, 15.000000);
  1348. PlayerTextDrawSetPreviewModel(playerid, InvItem[21], 1580);
  1349. PlayerTextDrawSetPreviewRot(playerid, InvItem[21], 0.000000, 0.000000, 0.000000, 1.000000);
  1350. PlayerTextDrawSetSelectable(playerid,InvItem[21], 1);
  1351.  
  1352. InvItem[22] = CreatePlayerTextDraw(playerid,354.000000, 384.000000, "item22");
  1353. PlayerTextDrawBackgroundColor(playerid,InvItem[22], -1347440726);
  1354. PlayerTextDrawFont(playerid,InvItem[22], 5);
  1355. PlayerTextDrawLetterSize(playerid,InvItem[22], 0.500000, 1.000000);
  1356. PlayerTextDrawColor(playerid,InvItem[22], -1);
  1357. PlayerTextDrawSetOutline(playerid,InvItem[22], 0);
  1358. PlayerTextDrawSetProportional(playerid,InvItem[22], 1);
  1359. PlayerTextDrawSetShadow(playerid,InvItem[22], 1);
  1360. PlayerTextDrawUseBox(playerid,InvItem[22], 1);
  1361. PlayerTextDrawBoxColor(playerid,InvItem[22], 0);
  1362. PlayerTextDrawTextSize(playerid,InvItem[22], 13.000000, 15.000000);
  1363. PlayerTextDrawSetPreviewModel(playerid, InvItem[22], 1580);
  1364. PlayerTextDrawSetPreviewRot(playerid, InvItem[22], 0.000000, 0.000000, 0.000000, 1.000000);
  1365. PlayerTextDrawSetSelectable(playerid,InvItem[22], 1);
  1366.  
  1367. InvItem[23] = CreatePlayerTextDraw(playerid,369.000000, 384.000000, "item23");
  1368. PlayerTextDrawBackgroundColor(playerid,InvItem[23], -1347440726);
  1369. PlayerTextDrawFont(playerid,InvItem[23], 5);
  1370. PlayerTextDrawLetterSize(playerid,InvItem[23], 0.500000, 1.000000);
  1371. PlayerTextDrawColor(playerid,InvItem[23], -1);
  1372. PlayerTextDrawSetOutline(playerid,InvItem[23], 0);
  1373. PlayerTextDrawSetProportional(playerid,InvItem[23], 1);
  1374. PlayerTextDrawSetShadow(playerid,InvItem[23], 1);
  1375. PlayerTextDrawUseBox(playerid,InvItem[23], 1);
  1376. PlayerTextDrawBoxColor(playerid,InvItem[23], 0);
  1377. PlayerTextDrawTextSize(playerid,InvItem[23], 13.000000, 15.000000);
  1378. PlayerTextDrawSetPreviewModel(playerid, InvItem[23], 1580);
  1379. PlayerTextDrawSetPreviewRot(playerid, InvItem[23], 0.000000, 0.000000, 0.000000, 1.000000);
  1380. PlayerTextDrawSetSelectable(playerid,InvItem[23], 1);
  1381.  
  1382. InvItem[24] = CreatePlayerTextDraw(playerid,384.000000, 384.000000, "item24");
  1383. PlayerTextDrawBackgroundColor(playerid,InvItem[24], -1347440726);
  1384. PlayerTextDrawFont(playerid,InvItem[24], 5);
  1385. PlayerTextDrawLetterSize(playerid,InvItem[24], 0.500000, 1.000000);
  1386. PlayerTextDrawColor(playerid,InvItem[24], -1);
  1387. PlayerTextDrawSetOutline(playerid,InvItem[24], 0);
  1388. PlayerTextDrawSetProportional(playerid,InvItem[24], 1);
  1389. PlayerTextDrawSetShadow(playerid,InvItem[24], 1);
  1390. PlayerTextDrawUseBox(playerid,InvItem[24], 1);
  1391. PlayerTextDrawBoxColor(playerid,InvItem[24], 0);
  1392. PlayerTextDrawTextSize(playerid,InvItem[24], 13.000000, 15.000000);
  1393. PlayerTextDrawSetPreviewModel(playerid, InvItem[24], 1580);
  1394. PlayerTextDrawSetPreviewRot(playerid, InvItem[24], 0.000000, 0.000000, 0.000000, 1.000000);
  1395. PlayerTextDrawSetSelectable(playerid,InvItem[24], 1);
  1396.  
  1397. InvItem[25] = CreatePlayerTextDraw(playerid,399.000000, 384.000000, "item25");
  1398. PlayerTextDrawBackgroundColor(playerid,InvItem[25], -1347440726);
  1399. PlayerTextDrawFont(playerid,InvItem[25], 5);
  1400. PlayerTextDrawLetterSize(playerid,InvItem[25], 0.500000, 1.000000);
  1401. PlayerTextDrawColor(playerid,InvItem[25], -1);
  1402. PlayerTextDrawSetOutline(playerid,InvItem[25], 0);
  1403. PlayerTextDrawSetProportional(playerid,InvItem[25], 1);
  1404. PlayerTextDrawSetShadow(playerid,InvItem[25], 1);
  1405. PlayerTextDrawUseBox(playerid,InvItem[25], 1);
  1406. PlayerTextDrawBoxColor(playerid,InvItem[25], 0);
  1407. PlayerTextDrawTextSize(playerid,InvItem[25], 13.000000, 15.000000);
  1408. PlayerTextDrawSetPreviewModel(playerid, InvItem[25], 1580);
  1409. PlayerTextDrawSetPreviewRot(playerid, InvItem[25], 0.000000, 0.000000, 0.000000, 1.000000);
  1410. PlayerTextDrawSetSelectable(playerid,InvItem[25], 1);
  1411.  
  1412. InvItem[26] = CreatePlayerTextDraw(playerid,414.000000, 384.000000, "item26");
  1413. PlayerTextDrawBackgroundColor(playerid,InvItem[26], -1347440726);
  1414. PlayerTextDrawFont(playerid,InvItem[26], 5);
  1415. PlayerTextDrawLetterSize(playerid,InvItem[26], 0.500000, 1.000000);
  1416. PlayerTextDrawColor(playerid,InvItem[26], -1);
  1417. PlayerTextDrawSetOutline(playerid,InvItem[26], 0);
  1418. PlayerTextDrawSetProportional(playerid,InvItem[26], 1);
  1419. PlayerTextDrawSetShadow(playerid,InvItem[26], 1);
  1420. PlayerTextDrawUseBox(playerid,InvItem[26], 1);
  1421. PlayerTextDrawBoxColor(playerid,InvItem[26], 0);
  1422. PlayerTextDrawTextSize(playerid,InvItem[26], 13.000000, 15.000000);
  1423. PlayerTextDrawSetPreviewModel(playerid, InvItem[26], 1580);
  1424. PlayerTextDrawSetPreviewRot(playerid, InvItem[26], 0.000000, 0.000000, 0.000000, 1.000000);
  1425. PlayerTextDrawSetSelectable(playerid,InvItem[26], 1);
  1426.  
  1427. InvItem[27] = CreatePlayerTextDraw(playerid,429.000000, 384.000000, "item27");
  1428. PlayerTextDrawBackgroundColor(playerid,InvItem[27], -1347440726);
  1429. PlayerTextDrawFont(playerid,InvItem[27], 5);
  1430. PlayerTextDrawLetterSize(playerid,InvItem[27], 0.500000, 1.000000);
  1431. PlayerTextDrawColor(playerid,InvItem[27], -1);
  1432. PlayerTextDrawSetOutline(playerid,InvItem[27], 0);
  1433. PlayerTextDrawSetProportional(playerid,InvItem[27], 1);
  1434. PlayerTextDrawSetShadow(playerid,InvItem[27], 1);
  1435. PlayerTextDrawUseBox(playerid,InvItem[27], 1);
  1436. PlayerTextDrawBoxColor(playerid,InvItem[27], 0);
  1437. PlayerTextDrawTextSize(playerid,InvItem[27], 13.000000, 15.000000);
  1438. PlayerTextDrawSetPreviewModel(playerid, InvItem[27], 1580);
  1439. PlayerTextDrawSetPreviewRot(playerid, InvItem[27], 0.000000, 0.000000, 0.000000, 1.000000);
  1440. PlayerTextDrawSetSelectable(playerid,InvItem[27], 1);
  1441.  
  1442. InvItem[28] = CreatePlayerTextDraw(playerid,444.000000, 384.000000, "item28");
  1443. PlayerTextDrawBackgroundColor(playerid,InvItem[28], -1347440726);
  1444. PlayerTextDrawFont(playerid,InvItem[28], 5);
  1445. PlayerTextDrawLetterSize(playerid,InvItem[28], 0.500000, 1.000000);
  1446. PlayerTextDrawColor(playerid,InvItem[28], -1);
  1447. PlayerTextDrawSetOutline(playerid,InvItem[28], 0);
  1448. PlayerTextDrawSetProportional(playerid,InvItem[28], 1);
  1449. PlayerTextDrawSetShadow(playerid,InvItem[28], 1);
  1450. PlayerTextDrawUseBox(playerid,InvItem[28], 1);
  1451. PlayerTextDrawBoxColor(playerid,InvItem[28], 0);
  1452. PlayerTextDrawTextSize(playerid,InvItem[28], 13.000000, 15.000000);
  1453. PlayerTextDrawSetPreviewModel(playerid, InvItem[28], 1580);
  1454. PlayerTextDrawSetPreviewRot(playerid, InvItem[28], 0.000000, 0.000000, 0.000000, 1.000000);
  1455. PlayerTextDrawSetSelectable(playerid,InvItem[28], 1);
  1456.  
  1457. InvItem[29] = CreatePlayerTextDraw(playerid,459.000000, 384.000000, "item29");
  1458. PlayerTextDrawBackgroundColor(playerid,InvItem[29], -1347440726);
  1459. PlayerTextDrawFont(playerid,InvItem[29], 5);
  1460. PlayerTextDrawLetterSize(playerid,InvItem[29], 0.500000, 1.000000);
  1461. PlayerTextDrawColor(playerid,InvItem[29], -1);
  1462. PlayerTextDrawSetOutline(playerid,InvItem[29], 0);
  1463. PlayerTextDrawSetProportional(playerid,InvItem[29], 1);
  1464. PlayerTextDrawSetShadow(playerid,InvItem[29], 1);
  1465. PlayerTextDrawUseBox(playerid,InvItem[29], 1);
  1466. PlayerTextDrawBoxColor(playerid,InvItem[29], 0);
  1467. PlayerTextDrawTextSize(playerid,InvItem[29], 13.000000, 15.000000);
  1468. PlayerTextDrawSetPreviewModel(playerid, InvItem[29], 1580);
  1469. PlayerTextDrawSetPreviewRot(playerid, InvItem[29], 0.000000, 0.000000, 0.000000, 1.000000);
  1470. PlayerTextDrawSetSelectable(playerid,InvItem[29], 1);
  1471.  
  1472. InvItem[30] = CreatePlayerTextDraw(playerid,324.000000, 401.000000, "item30");
  1473. PlayerTextDrawBackgroundColor(playerid,InvItem[30], -1347440726);
  1474. PlayerTextDrawFont(playerid,InvItem[30], 5);
  1475. PlayerTextDrawLetterSize(playerid,InvItem[30], 0.500000, 1.000000);
  1476. PlayerTextDrawColor(playerid,InvItem[30], -1);
  1477. PlayerTextDrawSetOutline(playerid,InvItem[30], 0);
  1478. PlayerTextDrawSetProportional(playerid,InvItem[30], 1);
  1479. PlayerTextDrawSetShadow(playerid,InvItem[30], 1);
  1480. PlayerTextDrawUseBox(playerid,InvItem[30], 1);
  1481. PlayerTextDrawBoxColor(playerid,InvItem[30], 0);
  1482. PlayerTextDrawTextSize(playerid,InvItem[30], 13.000000, 15.000000);
  1483. PlayerTextDrawSetPreviewModel(playerid, InvItem[30], 1580);
  1484. PlayerTextDrawSetPreviewRot(playerid, InvItem[30], 0.000000, 0.000000, 0.000000, 1.000000);
  1485. PlayerTextDrawSetSelectable(playerid,InvItem[30], 1);
  1486.  
  1487. InvItem[31] = CreatePlayerTextDraw(playerid,339.000000, 401.000000, "item31");
  1488. PlayerTextDrawBackgroundColor(playerid,InvItem[31], -1347440726);
  1489. PlayerTextDrawFont(playerid,InvItem[31], 5);
  1490. PlayerTextDrawLetterSize(playerid,InvItem[31], 0.500000, 1.000000);
  1491. PlayerTextDrawColor(playerid,InvItem[31], -1);
  1492. PlayerTextDrawSetOutline(playerid,InvItem[31], 0);
  1493. PlayerTextDrawSetProportional(playerid,InvItem[31], 1);
  1494. PlayerTextDrawSetShadow(playerid,InvItem[31], 1);
  1495. PlayerTextDrawUseBox(playerid,InvItem[31], 1);
  1496. PlayerTextDrawBoxColor(playerid,InvItem[31], 0);
  1497. PlayerTextDrawTextSize(playerid,InvItem[31], 13.000000, 15.000000);
  1498. PlayerTextDrawSetPreviewModel(playerid, InvItem[31], 1580);
  1499. PlayerTextDrawSetPreviewRot(playerid, InvItem[31], 0.000000, 0.000000, 0.000000, 1.000000);
  1500. PlayerTextDrawSetSelectable(playerid,InvItem[31], 1);
  1501.  
  1502. InvItem[32] = CreatePlayerTextDraw(playerid,354.000000, 401.000000, "item32");
  1503. PlayerTextDrawBackgroundColor(playerid,InvItem[32], -1347440726);
  1504. PlayerTextDrawFont(playerid,InvItem[32], 5);
  1505. PlayerTextDrawLetterSize(playerid,InvItem[32], 0.500000, 1.000000);
  1506. PlayerTextDrawColor(playerid,InvItem[32], -1);
  1507. PlayerTextDrawSetOutline(playerid,InvItem[32], 0);
  1508. PlayerTextDrawSetProportional(playerid,InvItem[32], 1);
  1509. PlayerTextDrawSetShadow(playerid,InvItem[32], 1);
  1510. PlayerTextDrawUseBox(playerid,InvItem[32], 1);
  1511. PlayerTextDrawBoxColor(playerid,InvItem[32], 0);
  1512. PlayerTextDrawTextSize(playerid,InvItem[32], 13.000000, 15.000000);
  1513. PlayerTextDrawSetPreviewModel(playerid, InvItem[32], 1580);
  1514. PlayerTextDrawSetPreviewRot(playerid, InvItem[32], 0.000000, 0.000000, 0.000000, 1.000000);
  1515. PlayerTextDrawSetSelectable(playerid,InvItem[32], 1);
  1516.  
  1517. InvItem[33] = CreatePlayerTextDraw(playerid,369.000000, 401.000000, "item33");
  1518. PlayerTextDrawBackgroundColor(playerid,InvItem[33], -1347440726);
  1519. PlayerTextDrawFont(playerid,InvItem[33], 5);
  1520. PlayerTextDrawLetterSize(playerid,InvItem[33], 0.500000, 1.000000);
  1521. PlayerTextDrawColor(playerid,InvItem[33], -1);
  1522. PlayerTextDrawSetOutline(playerid,InvItem[33], 0);
  1523. PlayerTextDrawSetProportional(playerid,InvItem[33], 1);
  1524. PlayerTextDrawSetShadow(playerid,InvItem[33], 1);
  1525. PlayerTextDrawUseBox(playerid,InvItem[33], 1);
  1526. PlayerTextDrawBoxColor(playerid,InvItem[33], 0);
  1527. PlayerTextDrawTextSize(playerid,InvItem[33], 13.000000, 15.000000);
  1528. PlayerTextDrawSetPreviewModel(playerid, InvItem[33], 1580);
  1529. PlayerTextDrawSetPreviewRot(playerid, InvItem[33], 0.000000, 0.000000, 0.000000, 1.000000);
  1530. PlayerTextDrawSetSelectable(playerid,InvItem[33], 1);
  1531.  
  1532. InvItem[34] = CreatePlayerTextDraw(playerid,384.000000, 401.000000, "item34");
  1533. PlayerTextDrawBackgroundColor(playerid,InvItem[34], -1347440726);
  1534. PlayerTextDrawFont(playerid,InvItem[34], 5);
  1535. PlayerTextDrawLetterSize(playerid,InvItem[34], 0.500000, 1.000000);
  1536. PlayerTextDrawColor(playerid,InvItem[34], -1);
  1537. PlayerTextDrawSetOutline(playerid,InvItem[34], 0);
  1538. PlayerTextDrawSetProportional(playerid,InvItem[34], 1);
  1539. PlayerTextDrawSetShadow(playerid,InvItem[34], 1);
  1540. PlayerTextDrawUseBox(playerid,InvItem[34], 1);
  1541. PlayerTextDrawBoxColor(playerid,InvItem[34], 0);
  1542. PlayerTextDrawTextSize(playerid,InvItem[34], 13.000000, 15.000000);
  1543. PlayerTextDrawSetPreviewModel(playerid, InvItem[34], 1580);
  1544. PlayerTextDrawSetPreviewRot(playerid, InvItem[34], 0.000000, 0.000000, 0.000000, 1.000000);
  1545. PlayerTextDrawSetSelectable(playerid,InvItem[34], 1);
  1546.  
  1547. InvItem[35] = CreatePlayerTextDraw(playerid,399.000000, 401.000000, "item35");
  1548. PlayerTextDrawBackgroundColor(playerid,InvItem[35], -1347440726);
  1549. PlayerTextDrawFont(playerid,InvItem[35], 5);
  1550. PlayerTextDrawLetterSize(playerid,InvItem[35], 0.500000, 1.000000);
  1551. PlayerTextDrawColor(playerid,InvItem[35], -1);
  1552. PlayerTextDrawSetOutline(playerid,InvItem[35], 0);
  1553. PlayerTextDrawSetProportional(playerid,InvItem[35], 1);
  1554. PlayerTextDrawSetShadow(playerid,InvItem[35], 1);
  1555. PlayerTextDrawUseBox(playerid,InvItem[35], 1);
  1556. PlayerTextDrawBoxColor(playerid,InvItem[35], 0);
  1557. PlayerTextDrawTextSize(playerid,InvItem[35], 13.000000, 15.000000);
  1558. PlayerTextDrawSetPreviewModel(playerid, InvItem[35], 1580);
  1559. PlayerTextDrawSetPreviewRot(playerid, InvItem[35], 0.000000, 0.000000, 0.000000, 1.000000);
  1560. PlayerTextDrawSetSelectable(playerid,InvItem[35], 1);
  1561.  
  1562. InvItem[36] = CreatePlayerTextDraw(playerid,414.000000, 401.000000, "item36");
  1563. PlayerTextDrawBackgroundColor(playerid,InvItem[36], -1347440726);
  1564. PlayerTextDrawFont(playerid,InvItem[36], 5);
  1565. PlayerTextDrawLetterSize(playerid,InvItem[36], 0.500000, 1.000000);
  1566. PlayerTextDrawColor(playerid,InvItem[36], -1);
  1567. PlayerTextDrawSetOutline(playerid,InvItem[36], 0);
  1568. PlayerTextDrawSetProportional(playerid,InvItem[36], 1);
  1569. PlayerTextDrawSetShadow(playerid,InvItem[36], 1);
  1570. PlayerTextDrawUseBox(playerid,InvItem[36], 1);
  1571. PlayerTextDrawBoxColor(playerid,InvItem[36], 0);
  1572. PlayerTextDrawTextSize(playerid,InvItem[36], 13.000000, 15.000000);
  1573. PlayerTextDrawSetPreviewModel(playerid, InvItem[36], 1580);
  1574. PlayerTextDrawSetPreviewRot(playerid, InvItem[36], 0.000000, 0.000000, 0.000000, 1.000000);
  1575. PlayerTextDrawSetSelectable(playerid,InvItem[36], 1);
  1576.  
  1577. InvItem[37] = CreatePlayerTextDraw(playerid,429.000000, 401.000000, "item37");
  1578. PlayerTextDrawBackgroundColor(playerid,InvItem[37], -1347440726);
  1579. PlayerTextDrawFont(playerid,InvItem[37], 5);
  1580. PlayerTextDrawLetterSize(playerid,InvItem[37], 0.500000, 1.000000);
  1581. PlayerTextDrawColor(playerid,InvItem[37], -1);
  1582. PlayerTextDrawSetOutline(playerid,InvItem[37], 0);
  1583. PlayerTextDrawSetProportional(playerid,InvItem[37], 1);
  1584. PlayerTextDrawSetShadow(playerid,InvItem[37], 1);
  1585. PlayerTextDrawUseBox(playerid,InvItem[37], 1);
  1586. PlayerTextDrawBoxColor(playerid,InvItem[37], 0);
  1587. PlayerTextDrawTextSize(playerid,InvItem[37], 13.000000, 15.000000);
  1588. PlayerTextDrawSetPreviewModel(playerid, InvItem[37], 1580);
  1589. PlayerTextDrawSetPreviewRot(playerid, InvItem[37], 0.000000, 0.000000, 0.000000, 1.000000);
  1590. PlayerTextDrawSetSelectable(playerid,InvItem[37], 1);
  1591.  
  1592. InvItem[38] = CreatePlayerTextDraw(playerid,444.000000, 401.000000, "item38");
  1593. PlayerTextDrawBackgroundColor(playerid,InvItem[38], -1347440726);
  1594. PlayerTextDrawFont(playerid,InvItem[38], 5);
  1595. PlayerTextDrawLetterSize(playerid,InvItem[38], 0.500000, 1.000000);
  1596. PlayerTextDrawColor(playerid,InvItem[38], -1);
  1597. PlayerTextDrawSetOutline(playerid,InvItem[38], 0);
  1598. PlayerTextDrawSetProportional(playerid,InvItem[38], 1);
  1599. PlayerTextDrawSetShadow(playerid,InvItem[38], 1);
  1600. PlayerTextDrawUseBox(playerid,InvItem[38], 1);
  1601. PlayerTextDrawBoxColor(playerid,InvItem[38], 0);
  1602. PlayerTextDrawTextSize(playerid,InvItem[38], 13.000000, 15.000000);
  1603. PlayerTextDrawSetPreviewModel(playerid, InvItem[38], 1580);
  1604. PlayerTextDrawSetPreviewRot(playerid, InvItem[38], 0.000000, 0.000000, 0.000000, 1.000000);
  1605. PlayerTextDrawSetSelectable(playerid,InvItem[38], 1);
  1606.  
  1607. InvItem[39] = CreatePlayerTextDraw(playerid,459.000000, 401.000000, "item39");
  1608. PlayerTextDrawBackgroundColor(playerid,InvItem[39], -1347440726);
  1609. PlayerTextDrawFont(playerid,InvItem[39], 5);
  1610. PlayerTextDrawLetterSize(playerid,InvItem[39], 0.500000, 1.000000);
  1611. PlayerTextDrawColor(playerid,InvItem[39], -1);
  1612. PlayerTextDrawSetOutline(playerid,InvItem[39], 0);
  1613. PlayerTextDrawSetProportional(playerid,InvItem[39], 1);
  1614. PlayerTextDrawSetShadow(playerid,InvItem[39], 1);
  1615. PlayerTextDrawUseBox(playerid,InvItem[39], 1);
  1616. PlayerTextDrawBoxColor(playerid,InvItem[39], 0);
  1617. PlayerTextDrawTextSize(playerid,InvItem[39], 13.000000, 15.000000);
  1618. PlayerTextDrawSetPreviewModel(playerid, InvItem[39], 1580);
  1619. PlayerTextDrawSetPreviewRot(playerid, InvItem[39], 0.000000, 0.000000, 0.000000, 1.000000);
  1620. PlayerTextDrawSetSelectable(playerid,InvItem[39], 1);
  1621.  
  1622. InvItem[40] = CreatePlayerTextDraw(playerid,324.000000, 419.000000, "item40");
  1623. PlayerTextDrawBackgroundColor(playerid,InvItem[40], -1347440726);
  1624. PlayerTextDrawFont(playerid,InvItem[40], 5);
  1625. PlayerTextDrawLetterSize(playerid,InvItem[40], 0.500000, 1.000000);
  1626. PlayerTextDrawColor(playerid,InvItem[40], -1);
  1627. PlayerTextDrawSetOutline(playerid,InvItem[40], 0);
  1628. PlayerTextDrawSetProportional(playerid,InvItem[40], 1);
  1629. PlayerTextDrawSetShadow(playerid,InvItem[40], 1);
  1630. PlayerTextDrawUseBox(playerid,InvItem[40], 1);
  1631. PlayerTextDrawBoxColor(playerid,InvItem[40], 0);
  1632. PlayerTextDrawTextSize(playerid,InvItem[40], 13.000000, 15.000000);
  1633. PlayerTextDrawSetPreviewModel(playerid, InvItem[40], 1580);
  1634. PlayerTextDrawSetPreviewRot(playerid, InvItem[40], 0.000000, 0.000000, 0.000000, 1.000000);
  1635. PlayerTextDrawSetSelectable(playerid,InvItem[40], 1);
  1636.  
  1637. InvItem[41] = CreatePlayerTextDraw(playerid,339.000000, 419.000000, "item41");
  1638. PlayerTextDrawBackgroundColor(playerid,InvItem[41], -1347440726);
  1639. PlayerTextDrawFont(playerid,InvItem[41], 5);
  1640. PlayerTextDrawLetterSize(playerid,InvItem[41], 0.500000, 1.000000);
  1641. PlayerTextDrawColor(playerid,InvItem[41], -1);
  1642. PlayerTextDrawSetOutline(playerid,InvItem[41], 0);
  1643. PlayerTextDrawSetProportional(playerid,InvItem[41], 1);
  1644. PlayerTextDrawSetShadow(playerid,InvItem[41], 1);
  1645. PlayerTextDrawUseBox(playerid,InvItem[41], 1);
  1646. PlayerTextDrawBoxColor(playerid,InvItem[41], 0);
  1647. PlayerTextDrawTextSize(playerid,InvItem[41], 13.000000, 15.000000);
  1648. PlayerTextDrawSetPreviewModel(playerid, InvItem[41], 1580);
  1649. PlayerTextDrawSetPreviewRot(playerid, InvItem[41], 0.000000, 0.000000, 0.000000, 1.000000);
  1650. PlayerTextDrawSetSelectable(playerid,InvItem[41], 1);
  1651.  
  1652. InvItem[42] = CreatePlayerTextDraw(playerid,354.000000, 419.000000, "item42");
  1653. PlayerTextDrawBackgroundColor(playerid,InvItem[42], -1347440726);
  1654. PlayerTextDrawFont(playerid,InvItem[42], 5);
  1655. PlayerTextDrawLetterSize(playerid,InvItem[42], 0.500000, 1.000000);
  1656. PlayerTextDrawColor(playerid,InvItem[42], -1);
  1657. PlayerTextDrawSetOutline(playerid,InvItem[42], 0);
  1658. PlayerTextDrawSetProportional(playerid,InvItem[42], 1);
  1659. PlayerTextDrawSetShadow(playerid,InvItem[42], 1);
  1660. PlayerTextDrawUseBox(playerid,InvItem[42], 1);
  1661. PlayerTextDrawBoxColor(playerid,InvItem[42], 0);
  1662. PlayerTextDrawTextSize(playerid,InvItem[42], 13.000000, 15.000000);
  1663. PlayerTextDrawSetPreviewModel(playerid, InvItem[42], 1580);
  1664. PlayerTextDrawSetPreviewRot(playerid, InvItem[42], 0.000000, 0.000000, 0.000000, 1.000000);
  1665. PlayerTextDrawSetSelectable(playerid,InvItem[42], 1);
  1666.  
  1667. InvItem[43] = CreatePlayerTextDraw(playerid,369.000000, 419.000000, "item43");
  1668. PlayerTextDrawBackgroundColor(playerid,InvItem[43], -1347440726);
  1669. PlayerTextDrawFont(playerid,InvItem[43], 5);
  1670. PlayerTextDrawLetterSize(playerid,InvItem[43], 0.500000, 1.000000);
  1671. PlayerTextDrawColor(playerid,InvItem[43], -1);
  1672. PlayerTextDrawSetOutline(playerid,InvItem[43], 0);
  1673. PlayerTextDrawSetProportional(playerid,InvItem[43], 1);
  1674. PlayerTextDrawSetShadow(playerid,InvItem[43], 1);
  1675. PlayerTextDrawUseBox(playerid,InvItem[43], 1);
  1676. PlayerTextDrawBoxColor(playerid,InvItem[43], 0);
  1677. PlayerTextDrawTextSize(playerid,InvItem[43], 13.000000, 15.000000);
  1678. PlayerTextDrawSetPreviewModel(playerid, InvItem[43], 1580);
  1679. PlayerTextDrawSetPreviewRot(playerid, InvItem[43], 0.000000, 0.000000, 0.000000, 1.000000);
  1680. PlayerTextDrawSetSelectable(playerid,InvItem[43], 1);
  1681.  
  1682. InvItem[44] = CreatePlayerTextDraw(playerid,384.000000, 419.000000, "item44");
  1683. PlayerTextDrawBackgroundColor(playerid,InvItem[44], -1347440726);
  1684. PlayerTextDrawFont(playerid,InvItem[44], 5);
  1685. PlayerTextDrawLetterSize(playerid,InvItem[44], 0.500000, 1.000000);
  1686. PlayerTextDrawColor(playerid,InvItem[44], -1);
  1687. PlayerTextDrawSetOutline(playerid,InvItem[44], 0);
  1688. PlayerTextDrawSetProportional(playerid,InvItem[44], 1);
  1689. PlayerTextDrawSetShadow(playerid,InvItem[44], 1);
  1690. PlayerTextDrawUseBox(playerid,InvItem[44], 1);
  1691. PlayerTextDrawBoxColor(playerid,InvItem[44], 0);
  1692. PlayerTextDrawTextSize(playerid,InvItem[44], 13.000000, 15.000000);
  1693. PlayerTextDrawSetPreviewModel(playerid, InvItem[44], 1580);
  1694. PlayerTextDrawSetPreviewRot(playerid, InvItem[44], 0.000000, 0.000000, 0.000000, 1.000000);
  1695. PlayerTextDrawSetSelectable(playerid,InvItem[44], 1);
  1696.  
  1697. InvItem[45] = CreatePlayerTextDraw(playerid,399.000000, 419.000000, "item45");
  1698. PlayerTextDrawBackgroundColor(playerid,InvItem[45], -1347440726);
  1699. PlayerTextDrawFont(playerid,InvItem[45], 5);
  1700. PlayerTextDrawLetterSize(playerid,InvItem[45], 0.500000, 1.000000);
  1701. PlayerTextDrawColor(playerid,InvItem[45], -1);
  1702. PlayerTextDrawSetOutline(playerid,InvItem[45], 0);
  1703. PlayerTextDrawSetProportional(playerid,InvItem[45], 1);
  1704. PlayerTextDrawSetShadow(playerid,InvItem[45], 1);
  1705. PlayerTextDrawUseBox(playerid,InvItem[45], 1);
  1706. PlayerTextDrawBoxColor(playerid,InvItem[45], 0);
  1707. PlayerTextDrawTextSize(playerid,InvItem[45], 13.000000, 15.000000);
  1708. PlayerTextDrawSetPreviewModel(playerid, InvItem[45], 1580);
  1709. PlayerTextDrawSetPreviewRot(playerid, InvItem[45], 0.000000, 0.000000, 0.000000, 1.000000);
  1710. PlayerTextDrawSetSelectable(playerid,InvItem[45], 1);
  1711.  
  1712. InvItem[46] = CreatePlayerTextDraw(playerid,414.000000, 419.000000, "item46");
  1713. PlayerTextDrawBackgroundColor(playerid,InvItem[46], -1347440726);
  1714. PlayerTextDrawFont(playerid,InvItem[46], 5);
  1715. PlayerTextDrawLetterSize(playerid,InvItem[46], 0.500000, 1.000000);
  1716. PlayerTextDrawColor(playerid,InvItem[46], -1);
  1717. PlayerTextDrawSetOutline(playerid,InvItem[46], 0);
  1718. PlayerTextDrawSetProportional(playerid,InvItem[46], 1);
  1719. PlayerTextDrawSetShadow(playerid,InvItem[46], 1);
  1720. PlayerTextDrawUseBox(playerid,InvItem[46], 1);
  1721. PlayerTextDrawBoxColor(playerid,InvItem[46], 0);
  1722. PlayerTextDrawTextSize(playerid,InvItem[46], 13.000000, 15.000000);
  1723. PlayerTextDrawSetPreviewModel(playerid, InvItem[46], 1580);
  1724. PlayerTextDrawSetPreviewRot(playerid, InvItem[46], 0.000000, 0.000000, 0.000000, 1.000000);
  1725. PlayerTextDrawSetSelectable(playerid,InvItem[46], 1);
  1726.  
  1727. InvItem[47] = CreatePlayerTextDraw(playerid,429.000000, 419.000000, "item47");
  1728. PlayerTextDrawBackgroundColor(playerid,InvItem[47], -1347440726);
  1729. PlayerTextDrawFont(playerid,InvItem[47], 5);
  1730. PlayerTextDrawLetterSize(playerid,InvItem[47], 0.500000, 1.000000);
  1731. PlayerTextDrawColor(playerid,InvItem[47], -1);
  1732. PlayerTextDrawSetOutline(playerid,InvItem[47], 0);
  1733. PlayerTextDrawSetProportional(playerid,InvItem[47], 1);
  1734. PlayerTextDrawSetShadow(playerid,InvItem[47], 1);
  1735. PlayerTextDrawUseBox(playerid,InvItem[47], 1);
  1736. PlayerTextDrawBoxColor(playerid,InvItem[47], 0);
  1737. PlayerTextDrawTextSize(playerid,InvItem[47], 13.000000, 15.000000);
  1738. PlayerTextDrawSetPreviewModel(playerid, InvItem[47], 1580);
  1739. PlayerTextDrawSetPreviewRot(playerid, InvItem[47], 0.000000, 0.000000, 0.000000, 1.000000);
  1740. PlayerTextDrawSetSelectable(playerid,InvItem[47], 1);
  1741.  
  1742. InvItem[48] = CreatePlayerTextDraw(playerid,444.000000, 419.000000, "item48");
  1743. PlayerTextDrawBackgroundColor(playerid,InvItem[48], -1347440726);
  1744. PlayerTextDrawFont(playerid,InvItem[48], 5);
  1745. PlayerTextDrawLetterSize(playerid,InvItem[48], 0.500000, 1.000000);
  1746. PlayerTextDrawColor(playerid,InvItem[48], -1);
  1747. PlayerTextDrawSetOutline(playerid,InvItem[48], 0);
  1748. PlayerTextDrawSetProportional(playerid,InvItem[48], 1);
  1749. PlayerTextDrawSetShadow(playerid,InvItem[48], 1);
  1750. PlayerTextDrawUseBox(playerid,InvItem[48], 1);
  1751. PlayerTextDrawBoxColor(playerid,InvItem[48], 0);
  1752. PlayerTextDrawTextSize(playerid,InvItem[48], 13.000000, 15.000000);
  1753. PlayerTextDrawSetPreviewModel(playerid, InvItem[48], 1580);
  1754. PlayerTextDrawSetPreviewRot(playerid, InvItem[48], 0.000000, 0.000000, 0.000000, 1.000000);
  1755. PlayerTextDrawSetSelectable(playerid,InvItem[48], 1);
  1756.  
  1757. InvItem[49] = CreatePlayerTextDraw(playerid,459.000000, 419.000000, "item49");
  1758. PlayerTextDrawBackgroundColor(playerid,InvItem[49], -1347440726);
  1759. PlayerTextDrawFont(playerid,InvItem[49], 5);
  1760. PlayerTextDrawLetterSize(playerid,InvItem[49], 0.500000, 1.000000);
  1761. PlayerTextDrawColor(playerid,InvItem[49], -1);
  1762. PlayerTextDrawSetOutline(playerid,InvItem[49], 0);
  1763. PlayerTextDrawSetProportional(playerid,InvItem[49], 1);
  1764. PlayerTextDrawSetShadow(playerid,InvItem[49], 1);
  1765. PlayerTextDrawUseBox(playerid,InvItem[49], 1);
  1766. PlayerTextDrawBoxColor(playerid,InvItem[49], 0);
  1767. PlayerTextDrawTextSize(playerid,InvItem[49], 13.000000, 15.000000);
  1768. PlayerTextDrawSetPreviewModel(playerid, InvItem[49], 1580);
  1769. PlayerTextDrawSetPreviewRot(playerid, InvItem[49], 0.000000, 0.000000, 0.000000, 1.000000);
  1770. PlayerTextDrawSetSelectable(playerid,InvItem[49], 1);
  1771. return 1;
  1772. }
  1773. /*==============================================================================
  1774.  
  1775. File Management
  1776.  
  1777. ==============================================================================*/
  1778.  
  1779.  
  1780. stock file_Create(filename[])
  1781. {
  1782. if(fexist(filename))
  1783. {
  1784. printf("ERROR CREATING FILE : '%s' : FILE ALREADY EXISTS", filename);
  1785. return 0;
  1786. }
  1787.  
  1788. ini_CurrentFile = fopen(filename, io_write);
  1789. fclose(ini_CurrentFile);
  1790.  
  1791. return 1;
  1792. }
  1793.  
  1794. stock file_Delete(filename[])
  1795. {
  1796. fremove(filename);
  1797.  
  1798. return 1;
  1799. }
  1800.  
  1801.  
  1802. /*==============================================================================
  1803.  
  1804. Open and Close
  1805.  
  1806. ==============================================================================*/
  1807.  
  1808.  
  1809. stock file_Open(filename[])
  1810. {
  1811. if(!fexist(filename))
  1812. {
  1813. printf("ERROR: file_Open: File '%s' not found.", filename);
  1814. return 0;
  1815. }
  1816. else
  1817. {
  1818. ini_CurrentFile = fopen(filename, io_read);
  1819. }
  1820.  
  1821. new
  1822. i,
  1823. delim;
  1824.  
  1825. while(fread(ini_CurrentFile, ini_Temp) && (i < MAX_RECORDS))
  1826. {
  1827. if(strlen(ini_Temp) && strfind(ini_Temp, ini_OsLineEndChar) != -1)
  1828. {
  1829. strdel(ini_Temp, strlen(ini_Temp) - ini_OsLineEndLen, strlen(ini_Temp));
  1830. }
  1831.  
  1832. delim = strfind(ini_Temp, "=");
  1833.  
  1834. if(delim != -1)
  1835. {
  1836. __strcpy(ini_KeyData[i], ini_Temp, delim + 1);
  1837. __strcpy(ini_ValData[i], ini_Temp[delim + 1], MAX_VAL_LENGTH);
  1838.  
  1839. if(ini_KeyData[i][delim - 1] == ' ')
  1840. strdel(ini_KeyData[i], delim - 1, delim);
  1841.  
  1842. if(!ini_ValData[i][0])
  1843. strdel(ini_ValData[i], -1, 0);
  1844. }
  1845. else
  1846. {
  1847. ini_KeyData[i][0] = 0;
  1848. __strcpy(ini_ValData[i], ini_Temp, MAX_VAL_LENGTH);
  1849. }
  1850.  
  1851. i++;
  1852. }
  1853.  
  1854. ini_FileOpen = true;
  1855. ini_Temp[0] = '\0';
  1856.  
  1857. fclose(ini_CurrentFile);
  1858.  
  1859. return 1;
  1860. }
  1861.  
  1862. stock file_Save(filename[])
  1863. {
  1864. if(!fexist(filename))
  1865. {
  1866. printf("Error: file_Save: File '%s' not found.", filename);
  1867. return 0;
  1868. }
  1869.  
  1870. if(!ini_FileOpen)
  1871. {
  1872. print("Error: file_Save: No file has been opened.");
  1873. return 0;
  1874. }
  1875.  
  1876. new i;
  1877.  
  1878. ini_CurrentFile = fopen(filename, io_write);
  1879.  
  1880. while(i < MAX_RECORDS)
  1881. {
  1882. if(file_IsLineNull(i))
  1883. break;
  1884.  
  1885. if(file_IsLineMarkedToSkip(i))
  1886. continue;
  1887.  
  1888. if(file_IsLineComment(i))
  1889. {
  1890. __strcpy(ini_Temp, ini_ValData[i], MAX_RECORD_LENGTH);
  1891. strcat(ini_Temp, ini_OsLineEndChar);
  1892. }
  1893. else
  1894. {
  1895. format(ini_Temp, MAX_RECORD_LENGTH, "%s = %s%s", ini_KeyData[i], ini_ValData[i], ini_OsLineEndChar);
  1896. }
  1897.  
  1898. fwrite(ini_CurrentFile, ini_Temp);
  1899.  
  1900. i++;
  1901. }
  1902.  
  1903. fclose(ini_CurrentFile);
  1904.  
  1905. return 1;
  1906. }
  1907.  
  1908. stock file_Close()
  1909. {
  1910. for(new i; i < MAX_RECORDS; i++)
  1911. {
  1912. ini_KeyData[i][0] = '\0';
  1913. ini_ValData[i][0] = '\0';
  1914. }
  1915.  
  1916. ini_FileOpen = false;
  1917. ini_CurrentFile = File:0;
  1918. ini_Temp[0] = '\0';
  1919.  
  1920. return 1;
  1921. }
  1922.  
  1923.  
  1924. /*==============================================================================
  1925.  
  1926. Writing
  1927.  
  1928. ==============================================================================*/
  1929.  
  1930.  
  1931. stock file_SetStr(key[], value[])
  1932. {
  1933. if(!ini_FileOpen)
  1934. {
  1935. printf("Error: file_SetStr: No file was opened.");
  1936. return 0;
  1937. }
  1938.  
  1939. new i = file_FindLine(key);
  1940.  
  1941. __strcpy(ini_KeyData[i], key, MAX_KEY_LENGTH);
  1942. __strcpy(ini_ValData[i], value, MAX_VAL_LENGTH);
  1943.  
  1944. return 1;
  1945. }
  1946.  
  1947. stock file_SetVal(key[], value)
  1948. {
  1949. if(!ini_FileOpen)
  1950. {
  1951. printf("Error: file_SetVal: No file was opened.");
  1952. return 0;
  1953. }
  1954.  
  1955. new i = file_FindLine(key);
  1956.  
  1957. __strcpy(ini_KeyData[i], key, MAX_KEY_LENGTH);
  1958. format(ini_ValData[i], MAX_VAL_LENGTH, "%d", value);
  1959.  
  1960. return 1;
  1961. }
  1962.  
  1963. stock file_SetFloat(key[], Float:value)
  1964. {
  1965. if(!ini_FileOpen)
  1966. {
  1967. printf("Error: file_SetFloat: No file was opened.");
  1968. return 0;
  1969. }
  1970.  
  1971. new i = file_FindLine(key);
  1972.  
  1973. __strcpy(ini_KeyData[i], key, MAX_KEY_LENGTH);
  1974. format(ini_ValData[i], MAX_VAL_LENGTH, "%f", value);
  1975.  
  1976. return 1;
  1977. }
  1978.  
  1979. stock file_RemoveKey(key[])
  1980. {
  1981. if(!ini_FileOpen)
  1982. {
  1983. printf("Error: file_RemoveKey: No file was opened.");
  1984. return 0;
  1985. }
  1986.  
  1987. new i;
  1988.  
  1989. while(i < MAX_RECORDS)
  1990. {
  1991. if(file_IsLineNull(i))
  1992. return 0;
  1993.  
  1994. if(!strcmp(ini_KeyData[i], key))
  1995. {
  1996. ini_KeyData[i][0] = 0x1E;
  1997. ini_ValData[i][0] = 0x1E;
  1998.  
  1999. break;
  2000. }
  2001. i++;
  2002. }
  2003.  
  2004. return 1;
  2005. }
  2006.  
  2007. stock file_RenameKey(key[], newname[MAX_KEY_LENGTH])
  2008. {
  2009. if(!ini_FileOpen)
  2010. {
  2011. printf("Error: file_RenameKey: No file was opened.");
  2012. return 1;
  2013. }
  2014.  
  2015. new i;
  2016.  
  2017. while(i < MAX_RECORDS)
  2018. {
  2019. if(file_IsLineNull(i))
  2020. return 0;;
  2021.  
  2022. if(!strcmp(ini_KeyData[i], key))
  2023. break;
  2024.  
  2025. i++;
  2026. }
  2027.  
  2028. __strcpy(ini_KeyData[i], newname, MAX_KEY_LENGTH);
  2029.  
  2030. return 1;
  2031. }
  2032.  
  2033.  
  2034. /*==============================================================================
  2035.  
  2036. Reading
  2037.  
  2038. ==============================================================================*/
  2039.  
  2040.  
  2041. stock file_GetStr(key[], dest[], len = sizeof(dest))
  2042. {
  2043. if(!ini_FileOpen)
  2044. {
  2045. printf("Error: file_GetStr: No file was opened.");
  2046. return 0;
  2047. }
  2048.  
  2049. for(new i; i < MAX_RECORDS; i++)
  2050. {
  2051. if(file_IsLineNull(i))
  2052. break;
  2053.  
  2054. if(!strcmp(ini_KeyData[i], key, false, MAX_KEY_LENGTH))
  2055. {
  2056. dest[0] = EOS;
  2057. strcat(dest, ini_ValData[i], len);
  2058. return 1;
  2059. }
  2060. }
  2061.  
  2062. return 0;
  2063. }
  2064.  
  2065. stock file_GetVal(key[])
  2066. {
  2067. if(!ini_FileOpen)
  2068. {
  2069. printf("Error: file_GetVal: No file was opened.");
  2070. return 0;
  2071. }
  2072.  
  2073. for(new i; i < MAX_RECORDS; i++)
  2074. {
  2075. if(file_IsLineNull(i))
  2076. break;
  2077.  
  2078. if(!strcmp(ini_KeyData[i], key, false, MAX_KEY_LENGTH))
  2079. return strval(ini_ValData[i]);
  2080. }
  2081.  
  2082. return 0;
  2083. }
  2084.  
  2085. stock Float:file_GetFloat(key[])
  2086. {
  2087. if(!ini_FileOpen)
  2088. {
  2089. printf("Error: file_GetFloat: No file was opened.");
  2090. return 0.0;
  2091. }
  2092.  
  2093. for(new i; i < MAX_RECORDS; i++)
  2094. {
  2095. if(file_IsLineNull(i))
  2096. break;
  2097.  
  2098. if(!strcmp(ini_KeyData[i], key, false, MAX_KEY_LENGTH))
  2099. return floatstr(ini_ValData[i]);
  2100. }
  2101.  
  2102. return Float:0.0;
  2103. }
  2104.  
  2105. stock file_IsKey(key[])
  2106. {
  2107. if(!ini_FileOpen)
  2108. {
  2109. printf("Error: file_IsKey: No file was opened.");
  2110. return 0;
  2111. }
  2112.  
  2113. for(new i; i < MAX_RECORDS; i++)
  2114. {
  2115. if(file_IsLineNull(i))
  2116. break;
  2117.  
  2118. if(!strcmp(ini_KeyData[i], key, false, MAX_KEY_LENGTH))
  2119. return true;
  2120. }
  2121.  
  2122. return false;
  2123. }
  2124.  
  2125.  
  2126. /*==============================================================================
  2127.  
  2128. Internal Functions
  2129.  
  2130. ==============================================================================*/
  2131.  
  2132.  
  2133. stock file_PrintAll()
  2134. {
  2135. if(!ini_FileOpen)
  2136. {
  2137. printf("Error: file_PrintAll: No file was opened.");
  2138. return 0;
  2139. }
  2140.  
  2141. new i;
  2142.  
  2143. while(i<MAX_RECORDS)
  2144. {
  2145. if(file_IsLineMarkedToSkip(i))
  2146. continue;
  2147.  
  2148. if(file_IsLineNull(i))
  2149. break;
  2150.  
  2151. printf("[ID:%d] %s = %s", i, ini_KeyData[i], ini_ValData[i]);
  2152.  
  2153. i++;
  2154. }
  2155.  
  2156. return 1;
  2157. }
  2158.  
  2159. stock file_IsLineNull(id)
  2160. {
  2161. if(__isnull(ini_KeyData[id]) && __isnull(ini_ValData[id]))
  2162. return 1;
  2163.  
  2164. return 0;
  2165. }
  2166.  
  2167. stock file_IsLineMarkedToSkip(id)
  2168. {
  2169. if(ini_KeyData[id][0] == 0x1E)
  2170. return 1;
  2171.  
  2172. return 0;
  2173. }
  2174.  
  2175. stock file_IsLineComment(id)
  2176. {
  2177. if(__isnull(ini_KeyData[id]) && !__isnull(ini_ValData[id]))
  2178. return 1;
  2179.  
  2180. return 0;
  2181. }
  2182.  
  2183. stock file_FindLine(key[])
  2184. {
  2185. new i;
  2186.  
  2187. while(i < MAX_RECORDS)
  2188. {
  2189. if(file_IsLineMarkedToSkip(i))
  2190. continue;
  2191.  
  2192. if(file_IsLineNull(i))
  2193. break;
  2194.  
  2195. if(!strcmp(ini_KeyData[i], key, false, MAX_KEY_LENGTH))
  2196. break;
  2197.  
  2198. i++;
  2199. }
  2200.  
  2201. return i;
  2202. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement