darlln / kiraban

0 stars 0 forks source link

inv #1

Open darlln opened 8 years ago

darlln commented 8 years ago

local inventoryItems = { [1] = { {"M4", 3}, {"CZ 550", 3}, {"Winchester 1866", 3}, {"SPAZ-12 Combat Shotgun", 3}, {"Sawn-Off Shotgun", 3}, {"AK-47", 3}, {"Lee Enfield", 3} }, [2] = { {"M1911", 2}, {"M9 SD", 2}, {"PDW", 2}, {"MP5A5", 3}, {"Desert Eagle", 2}, {"Hunting Knife", 1}, {"Hatchet", 2}, {"Baseball Bat", 2}, {"Shovel", 2}, {"Golf Club", 2} }, [3] = { {"Tear Gas", 1}, {"Grenade", 1}, {"Binoculars", 1} }, [4] = { {"M1911 Mag", 0.085}, {"M9 SD Mag", 0.085}, {"Desert Eagle Mag", 0.085}, {"PDW Mag", 0.025}, {"MP5A5 Mag", 0.025}, {"AK Mag", 0.035}, {"M4 Mag", 0.035}, {"1866 Slug", 0.067}, {"2Rnd. Slug", 0.067}, {"SPAZ-12 Pellet", 0.067}, {"CZ 550 Mag", 0.1}, {"Lee Enfield Mag", 0.1} }, [5] = { {"Water Bottle", 1}, {"Pasta Can", 1}, {"Beans Can", 1}, {"Burger", 1}, {"Pizza", 1}, {"Soda Bottle", 1}, {"Milk", 1}, {"Cooked Meat", 1} }, [6] = { {"Wood Pile", 2}, {"Bandage", 1, "Bandage yourself"}, {"Roadflare", 1, "Place"}, {"Empty Gas Canister", 2}, {"Full Gas Canister", 2}, {"Medic Kit", 2, "Use"}, {"Heat Pack", 1, "Use"}, {"Painkiller", 1, "Use"}, {"Morphine", 1, "Use"}, {"Blood Bag", 1, "Use"}, {"Wire Fence", 1, "Build a wire fence"}, {"Raw Meat", 1}, {"Tire", 2}, {"Tank Parts", 2}, {"Engine", 5}, {"Tent", 3, "Pitch a tent"}, {"Camouflage Clothing", 1, "Put clothes on"}, {"Civilian Clothing", 1, "Put clothes on"}, {"Survivor Clothing", 1, "Put clothes on"}, {"Ghillie Suit", 1, "Put clothes on"}, {"Empty Water Bottle", 1, "Fill bottle up"}, {"Empty Soda Cans", 1}, {"Scruffy Burgers", 1}, {"Assault Pack (ACU)", 1}, {"Alice Pack", 1}, {"Czech Backpack", 1}, {"Coyote Backpack", 1} }, [7] = { {"Night Vision Goggles", 1}, {"Infrared Goggles", 1}, {"Map", 1}, {"Box of Matches", 1, "Make a Fire"}, {"Watch", 1}, {"GPS", 1}, {"Toolbox", 1}, {"Radio Device", 1} }, [8] = {
-- clothers --relogio {"Watches: watchpink",1,"Coloca Roupa"}, {"Watches: watchyellow",1,"Coloca Roupa"}, {"Watches: watchpro",1,"Coloca Roupa"}, {"Watches: watchpro2",1,"Coloca Roupa"}, {"Watches: watchsub1",1,"Coloca Roupa"}, {"Watches: watchsub2",1,"Coloca Roupa"}, {"Watches: watchzip1",1,"Coloca Roupa"}, {"Watches: watchzip2",1,"Coloca Roupa"}, {"Watches: watchgno",1,"Coloca Roupa"}, {"Watches: watchgno2",1,"Coloca Roupa"}, {"Watches: watchcro",1,"Coloca Roupa"}, {"Watches: watchcro2",1,"Coloca Roupa"},
-- Camisas --{"Sweater green",1,"Coloca Roupa"}, {"Shirt: vestblack",1,"Coloca Roupa"}, {"Shirt: vest",1,"Coloca Roupa"}, {"Shirt: tshirt2horiz",1,"Coloca Roupa"}, {"Shirt: tshirtwhite",1,"Coloca Roupa"}, {"Shirt: tshirtilovels",1,"Coloca Roupa"}, {"Shirt: tshirtblunts",1,"Coloca Roupa"}, {"Shirt: shirtbplaid",1,"Coloca Roupa"}, {"Shirt: shirtbcheck",1,"Coloca Roupa"}, {"Shirt: field",1,"Coloca Roupa"}, {"Shirt: tshirterisyell",1,"Coloca Roupa"}, {"Shirt: tshirterisorn",1,"Coloca Roupa"}, {"Shirt: trackytop2eris",1,"Coloca Roupa"}, {"Shirt: bbjackrim",1,"Coloca Roupa"}, {"Shirt: bballjackrstar",1,"Coloca Roupa"}, {"Shirt: baskballdrib",1,"Coloca Roupa"}, {"Shirt: baskballrim",1,"Coloca Roupa"}, {"Shirt: sixtyniners",1,"Coloca Roupa"}, {"Shirt: bandits",1,"Coloca Roupa"}, {"Shirt: tshirtprored",1,"Coloca Roupa"}, {"Shirt: tshirtproblk",1,"Coloca Roupa"}, {"Shirt: trackytop1pro",1,"Coloca Roupa"}, {"Shirt: hockeytop",1,"Coloca Roupa"}, {"Shirt: bbjersey",1,"Coloca Roupa"}, {"Shirt: shellsuit",1,"Coloca Roupa"}, {"Shirt: tshirtheatwht",1,"Coloca Roupa"}, {"Shirt: tshirtbobomonk",1,"Coloca Roupa"}, {"Shirt: tshirtbobored",1,"Coloca Roupa"}, {"Shirt: tshirtbase5",1,"Coloca Roupa"}, {"Shirt: tshirtsuburb",1,"Coloca Roupa"}, {"Shirt: hoodyamerc",1,"Coloca Roupa"}, {"Shirt: hoodyabase5",1,"Coloca Roupa"}, {"Shirt: hoodyarockstar",1,"Coloca Roupa"}, {"Shirt: wcoatblue",1,"Coloca Roupa"}, {"Shirt: coach",1,"Coloca Roupa"}, {"Shirt: coachsemi",1,"Coloca Roupa"}, {"Shirt: sweatrstar",1,"Coloca Roupa"}, {"Shirt: hoodyAblue",1,"Coloca Roupa"}, {"Shirt: hoodyAblack",1,"Coloca Roupa"}, {"Shirt: hoodyAgreen",1,"Coloca Roupa"}, {"Shirt: sleevtbrown",1,"Coloca Roupa"}, {"Shirt: shirtablue",1,"Coloca Roupa"}, {"Shirt: shirtayellow",1,"Coloca Roupa"}, {"Shirt: shirtagrey",1,"Coloca Roupa"}, {"Shirt: shirtbgang",1,"Coloca Roupa"}, {"Shirt: tshirtzipcrm",1,"Coloca Roupa"}, {"Shirt: tshirtzipgry",1,"Coloca Roupa"}, {"Shirt: denimfade",1,"Coloca Roupa"}, {"Shirt: bowling",1,"Coloca Roupa"}, {"Shirt: hoodjackbeige",1,"Coloca Roupa"}, {"Shirt: baskballloc",1,"Coloca Roupa"}, {"Shirt: tshirtlocgrey",1,"Coloca Roupa"}, {"Shirt: tshirtmaddgrey",1,"Coloca Roupa"}, {"Shirt: tshirtmaddgrn",1,"Coloca Roupa"}, {"Shirt: suit1grey",1,"Coloca Roupa"}, {"Shirt: suit1blk",1,"Coloca Roupa"}, {"Shirt: leather",1,"Coloca Roupa"}, {"Shirt: painter",1,"Coloca Roupa"}, {"Shirt: hawaiiwht",1,"Coloca Roupa"}, {"Shirt: hawaiired",1,"Coloca Roupa"}, {"Shirt: sportjack",1,"Coloca Roupa"}, {"Shirt: suit1red",1,"Coloca Roupa"}, {"Shirt: suit1blue",1,"Coloca Roupa"}, {"Shirt: suit1yellow",1,"Coloca Roupa"}, {"Shirt: suit2grn",1,"Coloca Roupa"}, {"Shirt: tuxedo",1,"Coloca Roupa"}, {"Shirt: suit1gang",1,"Coloca Roupa"}, {"Shirt: letter",1,"Coloca Roupa"}, -- cabelos {"hair: hairblond",1,"Coloca Roupa"}, {"hair: hairred",1,"Coloca Roupa"}, {"hair: hairblue",1,"Coloca Roupa"}, {"hair: hairgreen",1,"Coloca Roupa"}, {"hair: hairpink",1,"Coloca Roupa"}, {"hair: bald",1,"Coloca Roupa"}, {"hair: baldbeard",1,"Coloca Roupa"}, {"hair: baldtash",1,"Coloca Roupa"}, {"hair: baldgoatee",1,"Coloca Roupa"}, {"hair: highfade",1,"Coloca Roupa"}, {"hair: highafro",1,"Coloca Roupa"}, {"hair: wedge",1,"Coloca Roupa"}, {"hair: slope",1,"Coloca Roupa"}, {"hair: jhericurl",1,"Coloca Roupa"}, {"hair: cornrows",1,"Coloca Roupa"}, {"hair: cornrowsb",1,"Coloca Roupa"}, {"hair: tramline",1,"Coloca Roupa"}, {"hair: groovecut",1,"Coloca Roupa"}, {"hair: mohawk",1,"Coloca Roupa"}, {"hair: mohawkblond",1,"Coloca Roupa"}, {"hair: mohawkpink",1,"Coloca Roupa"}, {"hair: mohawkbeard",1,"Coloca Roupa"}, {"hair: afro",1,"Coloca Roupa"}, {"hair: afrotash",1,"Coloca Roupa"}, {"hair: afrobeard",1,"Coloca Roupa"}, {"hair: afroblond",1,"Coloca Roupa"}, {"hair: flattop",1,"Coloca Roupa"}, {"hair: elvishair",1,"Coloca Roupa"}, {"hair: beard",1,"Coloca Roupa"}, {"hair: tash",1,"Coloca Roupa"}, {"hair: goatee",1,"Coloca Roupa"}, {"hair: afrogoatee",1,"Coloca Roupa"},
-- Calças {"Pants: worktrcamogrn",1,"Coloca Roupa"}, {"Pants: worktrcamogry",1,"Coloca Roupa"}, {"Pants: worktrgrey",1,"Coloca Roupa"}, {"Pants: worktrkhaki",1,"Coloca Roupa"}, {"Pants: tracktr",1,"Coloca Roupa"}, {"Pants: tracktreris",1,"Coloca Roupa"}, {"Pants: jeansdenim",1,"Coloca Roupa"}, {"Pants: legsblack",1,"Coloca Roupa"}, {"Pants: legsheart",1,"Coloca Roupa"}, {"Pants: biegetr",1,"Coloca Roupa"}, {"Pants: tracktrpro",1,"Coloca Roupa"}, {"Pants: tracktrwhstr",1,"Coloca Roupa"}, {"Pants: tracktrblue",1,"Coloca Roupa"}, {"Pants: tracktrgang",1,"Coloca Roupa"}, {"Pants: bbshortwht",1,"Coloca Roupa"}, {"Pants: boxshort",1,"Coloca Roupa"}, {"Pants: bbshortred",1,"Coloca Roupa"}, {"Pants: shellsuittr",1,"Coloca Roupa"}, {"Pants: shortsgrey",1,"Coloca Roupa"}, {"Pants: shortskhaki",1,"Coloca Roupa"}, {"Pants: chongergrey",1,"Coloca Roupa"}, {"Pants: chongergang",1,"Coloca Roupa"}, {"Pants: chongerred",1,"Coloca Roupa"}, {"Pants: chongerblue",1,"Coloca Roupa"}, {"Pants: shortsgang",1,"Coloca Roupa"}, {"Pants: denimsgang",1,"Coloca Roupa"}, {"Pants: denimsred",1,"Coloca Roupa"}, {"Pants: chinosbiege",1,"Coloca Roupa"}, {"Pants: chinoskhaki",1,"Coloca Roupa"}, {"Pants: cutoffchinos",1,"Coloca Roupa"}, {"Pants: cutoffchinosblue",1,"Coloca Roupa"}, {"Pants: chinosblack",1,"Coloca Roupa"}, {"Pants: chinosblue",1,"Coloca Roupa"}, {"Pants: leathertr",1,"Coloca Roupa"}, {"Pants: leathertrchaps",1,"Coloca Roupa"}, {"Pants: suit1trgrey",1,"Coloca Roupa"}, {"Pants: suit1trblk",1,"Coloca Roupa"}, {"Pants: cutoffdenims",1,"Coloca Roupa"}, {"Pants: suit1trred",1,"Coloca Roupa"}, {"Pants: suit1trblue",1,"Coloca Roupa"}, {"Pants: suit1tryellow",1,"Coloca Roupa"}, {"Pants: suit1trgreen",1,"Coloca Roupa"}, {"Pants: suit1trblk2",1,"Coloca Roupa"}, {"Pants: suit1trgang",1,"Coloca Roupa"}, -- tennis {"shoe: cowboyboot2",1,"Coloca Roupa"}, {"shoe: bask2semi",1,"Coloca Roupa"}, {"shoe: bask1eris",1,"Coloca Roupa"}, {"shoe: sneakerbincgang",1,"Coloca Roupa"}, {"shoe: sneakerbincblue",1,"Coloca Roupa"}, {"shoe: sneakerbincblk",1,"Coloca Roupa"}, {"shoe: sandal",1,"Coloca Roupa"}, {"shoe: sandalsock",1,"Coloca Roupa"}, {"shoe: flipflop",1,"Coloca Roupa"}, {"shoe: hitop",1,"Coloca Roupa"}, {"shoe: convproblk",1,"Coloca Roupa"}, {"shoe: convproblu",1,"Coloca Roupa"}, {"shoe: convprogrn",1,"Coloca Roupa"}, {"shoe: sneakerprored",1,"Coloca Roupa"}, {"shoe: sneakerproblu",1,"Coloca Roupa"}, {"shoe: sneakerprowht",1,"Coloca Roupa"}, {"shoe: bask1prowht",1,"Coloca Roupa"}, {"shoe: bask1problk",1,"Coloca Roupa"}, {"shoe: boxingshoe",1,"Coloca Roupa"}, {"shoe: convheatblk",1,"Coloca Roupa"}, {"shoe: convheatred",1,"Coloca Roupa"}, {"shoe: convheatorn",1,"Coloca Roupa"}, {"shoe: sneakerheatwht",1,"Coloca Roupa"}, {"shoe: sneakerheatgry",1,"Coloca Roupa"}, {"shoe: sneakerheatblk",1,"Coloca Roupa"}, {"shoe: bask2heatwht",1,"Coloca Roupa"}, {"shoe: bask2heatband",1,"Coloca Roupa"}, {"shoe: timbergrey",1,"Coloca Roupa"}, {"shoe: timberred",1,"Coloca Roupa"}, {"shoe: timberfawn",1,"Coloca Roupa"}, {"shoe: timberhike",1,"Coloca Roupa"}, {"shoe: cowboyboot",1,"Coloca Roupa"}, {"shoe: biker",1,"Coloca Roupa"}, {"shoe: snakeskin",1,"Coloca Roupa"}, {"shoe: shoedressblk",1,"Coloca Roupa"}, {"shoe: shoedressbrn",1,"Coloca Roupa"}, {"shoe: shoespatz",1,"Coloca Roupa"}, --colar {"necklace: dogtag",1,"Coloca Roupa"}, {"necklace: neckafrica",1,"Coloca Roupa"}, {"necklace: stopwatch",1,"Coloca Roupa"}, {"necklace: necksaints",1,"Coloca Roupa"}, {"necklace: neckhash",1,"Coloca Roupa"}, {"necklace: necksilver",1,"Coloca Roupa"}, {"necklace: neckgold",1,"Coloca Roupa"}, {"necklace: neckropes",1,"Coloca Roupa"}, {"necklace: neckropeg",1,"Coloca Roupa"}, {"necklace: neckls",1,"Coloca Roupa"}, {"necklace: neckdollar",1,"Coloca Roupa"}, {"necklace: neckcross",1,"Coloca Roupa"}, --grasses {"Glasse: groucho",1,"Coloca Roupa"}, {"Glasse: zorro",1,"Coloca Roupa"}, {"Glasse: eyepatch",1,"Coloca Roupa"}, {"Glasse: glasses01",1,"Coloca Roupa"}, {"Glasse: glasses04",1,"Coloca Roupa"}, {"Glasse: bandred3",1,"Coloca Roupa"}, {"Glasse: bandblue3",1,"Coloca Roupa"}, {"Glasse: bandgang3",1,"Coloca Roupa"}, {"Glasse: bandblack3",1,"Coloca Roupa"}, {"Glasse: glasses01dark",1,"Coloca Roupa"}, {"Glasse: glasses04dark",1,"Coloca Roupa"}, {"Glasse: glasses03",1,"Coloca Roupa"}, {"Glasse: glasses03red",1,"Coloca Roupa"}, {"Glasse: glasses03blue",1,"Coloca Roupa"}, {"Glasse: glasses03dark",1,"Coloca Roupa"}, {"Glasse: glasses05dark",1,"Coloca Roupa"}, {"Glasse: glasses05",1,"Coloca Roupa"}, --chapeus {"hat: bandred",1,"Coloca Roupa"}, {"hat: bandblue",1,"Coloca Roupa"}, {"hat: bandgang",1,"Coloca Roupa"}, {"hat: bandblack",1,"Coloca Roupa"}, {"hat: bandred2",1,"Coloca Roupa"}, {"hat: bandblue2",1,"Coloca Roupa"}, {"hat: bandblack2",1,"Coloca Roupa"}, {"hat: bandgang2",1,"Coloca Roupa"}, {"hat: capknitgrn",1,"Coloca Roupa"}, {"hat: captruck",1,"Coloca Roupa"}, {"hat: cowboy",1,"Coloca Roupa"}, {"hat: hattiger",1,"Coloca Roupa"}, {"hat: helmet",1,"Coloca Roupa"}, {"hat: moto",1,"Coloca Roupa"}, {"hat: boxingcap",1,"Coloca Roupa"}, {"hat: hockey",1,"Coloca Roupa"}, {"hat: capgang",1,"Coloca Roupa"}, {"hat: capgangback",1,"Coloca Roupa"},
{"hat: capgangside",1,"Coloca Roupa"},
{"hat: capgangover",1,"Coloca Roupa"},
{"hat: capgangup",1,"Coloca Roupa"}, {"hat: bikerhelmet",1,"Coloca Roupa"},
{"hat: capred",1,"Coloca Roupa"}, {"hat: capredback",1,"Coloca Roupa"}, {"hat: capredside",1,"Coloca Roupa"}, {"hat: capredover",1,"Coloca Roupa"}, {"hat: capredup",1,"Coloca Roupa"}, {"hat: capblue",1,"Coloca Roupa"}, {"hat: capblueback",1,"Coloca Roupa"},
{"hat: capblueside",1,"Coloca Roupa"},
{"hat: capblueover",1,"Coloca Roupa"},
{"hat: capblueup",1,"Coloca Roupa"}, {"hat: skullyblk",1,"Coloca Roupa"}, {"hat: skullygrn",1,"Coloca Roupa"}, {"hat: hatmancblk",1,"Coloca Roupa"}, {"hat: hatmancplaid",1,"Coloca Roupa"}, {"hat: capzip",1,"Coloca Roupa"}, {"hat: capzipback",1,"Coloca Roupa"}, {"hat: capzipside",1,"Coloca Roupa"}, {"hat: capzipover",1,"Coloca Roupa"}, {"hat: capzipup",1,"Coloca Roupa"}, {"hat: beretred",1,"Coloca Roupa"}, {"hat: beretblk",1,"Coloca Roupa"}, {"hat: capblk",1,"Coloca Roupa"}, {"hat: capblkback",1,"Coloca Roupa"}, {"hat: capblkside",1,"Coloca Roupa"}, {"hat: capblkover",1,"Coloca Roupa"}, {"hat: capblkup",1,"Coloca Roupa"}, {"hat: trilbydrk",1,"Coloca Roupa"}, {"hat: trilbylght",1,"Coloca Roupa"}, {"hat: bowler",1,"Coloca Roupa"}, {"hat: bowlerred",1,"Coloca Roupa"}, {"hat: bowlerblue",1,"Coloca Roupa"}, {"hat: bowleryellow",1,"Coloca Roupa"}, {"hat: boater",1,"Coloca Roupa"}, {"hat: bowlergang",1,"Coloca Roupa"}, {"hat: boaterblk",1,"Coloca Roupa"},
}, };

local clothPack = { -- relogio {"Watches: watchpink",0,14,"Watches"}, {"Watches: watchyellow",1,14,"Watches"}, {"Watches: watchpro",2,14,"Watches"}, {"Watches: watchpro2",3,14,"Watches"}, {"Watches: watchsub1",4,14,"Watches"}, {"Watches: watchsub2",5,14,"Watches"}, {"Watches: watchzip1",6,14,"Watches"}, {"Watches: watchzip2",7,14,"Watches"}, {"Watches: watchgno",8,14,"Watches"}, {"Watches: watchgno2",9,14,"Watches"}, {"Watches: watchcro",10,14,"Watches"}, {"Watches: watchcro2",11,14,"Watches"}, -- Camisas
{"Shirt: vestblack",1,0,"Shirt"}, {"Shirt: vest",2,0,"Shirt"}, {"Shirt: tshirt2horiz",3,0,"Shirt"}, {"Shirt: tshirtwhite",4,0,"Shirt"}, {"Shirt: tshirtilovels",5,0,"Shirt"}, {"Shirt: tshirtblunts",6,0,"Shirt"}, {"Shirt: shirtbplaid",7,0,"Shirt"}, {"Shirt: shirtbcheck",8,0,"Shirt"}, {"Shirt: field",9,0,"Shirt"}, {"Shirt: tshirterisyell",10,0,"Shirt"}, {"Shirt: tshirterisorn",11,0,"Shirt"}, {"Shirt: trackytop2eris",12,0,"Shirt"}, {"Shirt: bbjackrim",13,0,"Shirt"}, {"Shirt: bballjackrstar",14,0,"Shirt"}, {"Shirt: baskballdrib",15,0,"Shirt"}, {"Shirt: baskballrim",16,0,"Shirt"}, {"Shirt: sixtyniners",17,0,"Shirt"}, {"Shirt: bandits",18,0,"Shirt"}, {"Shirt: tshirtprored",19,0,"Shirt"}, {"Shirt: tshirtproblk",20,0,"Shirt"}, {"Shirt: trackytop1pro",21,0,"Shirt"}, {"Shirt: hockeytop",22,0,"Shirt"}, {"Shirt: bbjersey",23,0,"Shirt"}, {"Shirt: shellsuit",24,0,"Shirt"}, {"Shirt: tshirtheatwht",25,0,"Shirt"}, {"Shirt: tshirtbobomonk",26,0,"Shirt"}, {"Shirt: tshirtbobored",27,0,"Shirt"}, {"Shirt: tshirtbase5",28,0,"Shirt"}, {"Shirt: tshirtsuburb",29,0,"Shirt"}, {"Shirt: hoodyamerc",30,0,"Shirt"}, {"Shirt: hoodyabase5",31,0,"Shirt"}, {"Shirt: hoodyarockstar",32,0,"Shirt"}, {"Shirt: wcoatblue",33,0,"Shirt"}, {"Shirt: coach",34,0,"Shirt"}, {"Shirt: coachsemi",35,0,"Shirt"}, {"Shirt: sweatrstar",36,0,"Shirt"}, {"Shirt: hoodyAblue",37,0,"Shirt"}, {"Shirt: hoodyAblack",38,0,"Shirt"}, {"Shirt: hoodyAgreen",39,0,"Shirt"}, {"Shirt: sleevtbrown",40,0,"Shirt"}, {"Shirt: shirtablue",41,0,"Shirt"}, {"Shirt: shirtayellow",42,0,"Shirt"}, {"Shirt: shirtagrey",43,0,"Shirt"}, {"Shirt: shirtbgang",44,0,"Shirt"}, {"Shirt: tshirtzipcrm",45,0,"Shirt"}, {"Shirt: tshirtzipgry",46,0,"Shirt"}, {"Shirt: denimfade",47,0,"Shirt"}, {"Shirt: bowling",48,0,"Shirt"}, {"Shirt: hoodjackbeige",49,0,"Shirt"}, {"Shirt: baskballloc",50,0,"Shirt"}, {"Shirt: tshirtlocgrey",51,0,"Shirt"}, {"Shirt: tshirtmaddgrey",52,0,"Shirt"}, {"Shirt: tshirtmaddgrn",53,0,"Shirt"}, {"Shirt: suit1grey",54,0,"Shirt"}, {"Shirt: suit1blk",55,0,"Shirt"}, {"Shirt: leather",56,0,"Shirt"}, {"Shirt: painter",57,0,"Shirt"}, {"Shirt: hawaiiwht",58,0,"Shirt"}, {"Shirt: hawaiired",59,0,"Shirt"}, {"Shirt: sportjack",60,0,"Shirt"}, {"Shirt: suit1red",61,0,"Shirt"}, {"Shirt: suit1blue",62,0,"Shirt"}, {"Shirt: suit1yellow",63,0,"Shirt"}, {"Shirt: suit2grn",64,0,"Shirt"}, {"Shirt: tuxedo",65,0,"Shirt"}, {"Shirt: suit1gang",66,0,"Shirt"}, {"Shirt: letter",67,0,"Shirt"}, -- cabelos {"hair: hairblond",1,1,"Head"}, {"hair: hairred",2,1,"Head"}, {"hair: hairblue",3,1,"Head"}, {"hair: hairgreen",4,1,"Head"}, {"hair: hairpink",5,1,"Head"}, {"hair: bald",6,1,"Head"}, {"hair: baldbeard",7,1,"Head"}, {"hair: baldtash",8,1,"Head"}, {"hair: baldgoatee",9,1,"Head"}, {"hair: highfade",10,1,"Head"}, {"hair: highafro",11,1,"Head"}, {"hair: wedge",12,1,"Head"}, {"hair: slope",13,1,"Head"}, {"hair: jhericurl",14,1,"Head"}, {"hair: cornrows",15,1,"Head"}, {"hair: cornrowsb",16,1,"Head"}, {"hair: tramline",17,1,"Head"}, {"hair: groovecut",18,1,"Head"}, {"hair: mohawk",19,1,"Head"}, {"hair: mohawkblond",20,1,"Head"}, {"hair: mohawkpink",21,1,"Head"}, {"hair: mohawkbeard",22,1,"Head"}, {"hair: afro",23,1,"Head"}, {"hair: afrotash",24,1,"Head"}, {"hair: afrobeard",25,1,"Head"}, {"hair: afroblond",26,1,"Head"}, {"hair: flattop",27,1,"Head"}, {"hair: elvishair",28,1,"Head"}, {"hair: beard",29,1,"Head"}, {"hair: tash",30,1,"Head"}, {"hair: goatee",31,1,"Head"}, {"hair: afrogoatee",32,1,"Head"}, -- Calças {"Pants: worktrcamogrn",1,2,"Trousers"}, {"Pants: worktrcamogry",2,2,"Trousers"}, {"Pants: worktrgrey",3,2,"Trousers"}, {"Pants: worktrkhaki",4,2,"Trousers"}, {"Pants: tracktr",5,2,"Trousers"}, {"Pants: tracktreris",6,2,"Trousers"}, {"Pants: jeansdenim",7,2,"Trousers"}, {"Pants: legsblack",8,2,"Trousers"}, {"Pants: legsheart",9,2,"Trousers"}, {"Pants: biegetr",10,2,"Trousers"}, {"Pants: tracktrpro",11,2,"Trousers"}, {"Pants: tracktrwhstr",12,2,"Trousers"}, {"Pants: tracktrblue",13,2,"Trousers"}, {"Pants: tracktrgang",14,2,"Trousers"}, {"Pants: bbshortwht",15,2,"Trousers"}, {"Pants: boxshort",16,2,"Trousers"}, {"Pants: bbshortred",17,2,"Trousers"}, {"Pants: shellsuittr",18,2,"Trousers"}, {"Pants: shortsgrey",19,2,"Trousers"}, {"Pants: shortskhaki",20,2,"Trousers"}, {"Pants: chongergrey",21,2,"Trousers"}, {"Pants: chongergang",22,2,"Trousers"}, {"Pants: chongerred",23,2,"Trousers"}, {"Pants: chongerblue",24,2,"Trousers"}, {"Pants: shortsgang",25,2,"Trousers"}, {"Pants: denimsgang",26,2,"Trousers"}, {"Pants: denimsred",27,2,"Trousers"}, {"Pants: chinosbiege",28,2,"Trousers"}, {"Pants: chinoskhaki",29,2,"Trousers"}, {"Pants: cutoffchinos",30,2,"Trousers"}, {"Pants: cutoffchinosblue",31,2,"Trousers"}, {"Pants: chinosblack",32,2,"Trousers"}, {"Pants: chinosblue",33,2,"Trousers"}, {"Pants: leathertr",34,2,"Trousers"}, {"Pants: leathertrchaps",35,2,"Trousers"}, {"Pants: suit1trgrey",36,2,"Trousers"}, {"Pants: suit1trblk",37,2,"Trousers"}, {"Pants: cutoffdenims",38,2,"Trousers"}, {"Pants: suit1trred",39,2,"Trousers"}, {"Pants: suit1trblue",40,2,"Trousers"}, {"Pants: suit1tryellow",41,2,"Trousers"}, {"Pants: suit1trgreen",42,2,"Trousers"}, {"Pants: suit1trblk2",43,2,"Trousers"}, {"Pants: suit1trgang",44,2,"Trousers"}, -- tennis
{"shoe: cowboyboot2",1,3,"Shoes"}, {"shoe: bask2semi",2,3,"Shoes"}, {"shoe: bask1eris",3,3,"Shoes"}, {"shoe: sneakerbincgang",4,3,"Shoes"}, {"shoe: sneakerbincblue",5,3,"Shoes"}, {"shoe: sneakerbincblk",6,3,"Shoes"}, {"shoe: sandal",7,3,"Shoes"}, {"shoe: sandalsock",8,3,"Shoes"}, {"shoe: flipflop",9,3,"Shoes"}, {"shoe: hitop",10,3,"Shoes"}, {"shoe: convproblk",11,3,"Shoes"},
{"shoe: convproblu",12,3,"Shoes"}, {"shoe: convprogrn",13,3,"Shoes"}, {"shoe: sneakerprored",14,3,"Shoes"}, {"shoe: sneakerproblu",15,3,"Shoes"}, {"shoe: sneakerprowht",16,3,"Shoes"}, {"shoe: bask1prowht",17,3,"Shoes"}, {"shoe: bask1problk",18,3,"Shoes"}, {"shoe: boxingshoe",19,3,"Shoes"}, {"shoe: convheatblk",20,3,"Shoes"}, {"shoe: convheatred",21,3,"Shoes"}, {"shoe: convheatorn",22,3,"Shoes"}, {"shoe: sneakerheatwht",23,3,"Shoes"}, {"shoe: sneakerheatgry",24,3,"Shoes"}, {"shoe: sneakerheatblk",25,3,"Shoes"}, {"shoe: bask2heatwht",26,3,"Shoes"}, {"shoe: bask2heatband",27,3,"Shoes"}, {"shoe: timbergrey",28,3,"Shoes"}, {"shoe: timberred",29,3,"Shoes"}, {"shoe: timberfawn",30,3,"Shoes"}, {"shoe: timberhike",31,3,"Shoes"}, {"shoe: cowboyboot",32,3,"Shoes"}, {"shoe: biker",33,3,"Shoes"}, {"shoe: snakeskin",34,3,"Shoes"}, {"shoe: shoedressblk",35,3,"Shoes"}, {"shoe: shoedressbrn",36,3,"Shoes"}, {"shoe: shoespatz",37,3,"Shoes"}, --colar {"necklace: dogtag",0,13,"Necklace"}, {"necklace: neckafrica",1,13,"Necklace"}, {"necklace: stopwatch",2,13,"Necklace"}, {"necklace: necksaints",3,13,"Necklace"}, {"necklace: neckhash",4,13,"Necklace"}, {"necklace: necksilver",5,13,"Necklace"}, {"necklace: neckgold",6,13,"Necklace"}, {"necklace: neckropes",7,13,"Necklace"}, {"necklace: neckropeg",8,13,"Necklace"}, {"necklace: neckls",9,13,"Necklace"}, {"necklace: neckdollar",10,13,"Necklace"}, {"necklace: neckcross",11,13,"Necklace"},
--Glasses {"Glasse: groucho",0,15,"Glasses"}, {"Glasse: zorro",1,15,"Glasses"}, {"Glasse: eyepatch",2,15,"Glasses"}, {"Glasse: glasses01",3,15,"Glasses"}, {"Glasse: glasses04",4,15,"Glasses"}, {"Glasse: bandred3",5,15,"Glasses"}, {"Glasse: bandblue3",6,15,"Glasses"}, {"Glasse: bandgang3",7,15,"Glasses"}, {"Glasse: bandblack3",8,15,"Glasses"}, {"Glasse: glasses01dark",9,15,"Glasses"},
{"Glasse: glasses04dark",10,15,"Glasses"}, {"Glasse: glasses03",11,15,"Glasses"}, {"Glasse: glasses03red",12,15,"Glasses"}, {"Glasse: glasses03blue",13,15,"Glasses"}, {"Glasse: glasses03dark",14,15,"Glasses"}, {"Glasse: glasses05dark",15,15,"Glasses"}, {"Glasse: glasses05",16,15,"Glasses"}, --hatschapeus {"hat: bandred",0,16,"Hats"}, {"hat: bandblue",1,16,"Hats"}, {"hat: bandgang",2,16,"Hats"}, {"hat: bandblack",3,16,"Hats"}, {"hat: bandred2",4,16,"Hats"}, {"hat: bandblue2",5,16,"Hats"}, {"hat: bandblack2",6,16,"Hats"}, {"hat: bandgang2",7,16,"Hats"}, {"hat: capknitgrn",8,16,"Hats"}, {"hat: captruck",9,16,"Hats"}, {"hat: cowboy",10,16,"Hats"}, {"hat: hattiger",11,16,"Hats"}, {"hat: helmet",12,16,"Hats"}, {"hat: moto",13,16,"Hats"}, {"hat: boxingcap",14,16,"Hats"}, {"hat: hockey",15,16,"Hats"}, {"hat: capgang",16,16,"Hats"}, {"hat: capgangback",17,16,"Hats"}, {"hat: capgangside",18,16,"Hats"}, {"hat: capgangover",19,16,"Hats"}, {"hat: capgangup",20,16,"Hats"}, {"hat: bikerhelmet",21,16,"Hats"}, {"hat: capred",22,16,"Hats"}, {"hat: capredback",23,16,"Hats"}, {"hat: capredside",24,16,"Hats"}, {"hat: capredover",25,16,"Hats"}, {"hat: capredup",26,16,"Hats"}, {"hat: capblue",27,16,"Hats"}, {"hat: capblueback",28,16,"Hats"}, {"hat: capblueside",29,16,"Hats"}, {"hat: capblueover",30,16,"Hats"}, {"hat: capblueup",31,16,"Hats"}, {"hat: skullyblk",32,16,"Hats"}, {"hat: skullygrn",33,16,"Hats"}, {"hat: hatmancblk",34,16,"Hats"}, {"hat: hatmancplaid",35,16,"Hats"}, {"hat: capzip",36,16,"Hats"}, {"hat: capzipback",37,16,"Hats"}, {"hat: capzipside",38,16,"Hats"}, {"hat: capzipover",39,16,"Hats"}, {"hat: capzipup",40,16,"Hats"}, {"hat: beretred",41,16,"Hats"}, {"hat: beretblk",42,16,"Hats"}, {"hat: capblk",43,16,"Hats"}, {"hat: capblkback",44,16,"Hats"}, {"hat: capblkside",45,16,"Hats"}, {"hat: capblkover",46,16,"Hats"}, {"hat: capblkup",47,16,"Hats"}, {"hat: trilbydrk",48,16,"Hats"}, {"hat: trilbylght",49,16,"Hats"}, {"hat: bowler",50,16,"Hats"}, {"hat: bowlerred",51,16,"Hats"}, {"hat: bowlerblue",52,16,"Hats"}, {"hat: bowleryellow",53,16,"Hats"}, {"hat: boater",54,16,"Hats"}, {"hat: bowlergang",55,16,"Hats"}, {"hat: boaterblk",56,16,"Hats"},
};

local keyTable = { [1] = "Primary Weapon", [2] = "Secondary Weapon", [3] = "Specially Weapon", [4] = "Ammo", [5] = "Food", [6] = "Items", [7] = "Toolbelt", [8] = "Cloth" };

local vehicleAddonsInfo = { --avião {592, 0, 1, 1, 25}, {577, 0, 1, 1, 25}, {511, 0, 1, 1, 25}, {512, 0, 1, 1, 25}, {593, 0, 1, 1, 25}, {520, 0, 1, 1, 25}, {553, 0, 1, 1, 25}, {476, 0, 1, 1, 25}, {519, 0, 1, 1, 25}, {460, 0, 1, 1, 25}, {513, 0, 1, 1, 25}, {548, 0, 1, 1, 25}, {425, 0, 1, 1, 25}, {417, 0, 1, 1, 25}, {487, 0, 1, 1, 25}, {488, 0, 1, 1, 25}, {497, 0, 1, 1, 25}, {563, 0, 1, 1, 25}, {447, 0, 1, 1, 25}, {569, 0, 1, 1, 25}, --bike-motos {581, 2, 1, 0, 25}, {509, 0, 0, 0, 25}, {481, 0, 0, 0, 25}, {462, 0, 1, 0, 25}, {521, 2, 1, 0, 25}, {463, 2, 1, 0, 25}, {510, 0, 0, 0, 25}, {522, 2, 1, 0, 25}, {461, 2, 1, 0, 25}, {448, 0, 1, 0, 25}, {468, 2, 1, 0, 25}, {586, 2, 1, 0, 25}, --carros {602, 4, 1, 1, 25}, {496, 4, 1, 1, 25}, {401, 4, 1, 1, 25}, {518, 4, 1, 1, 25}, {527, 4, 1, 1, 25}, {589, 4, 1, 1, 25}, {419, 4, 1, 1, 25}, {587, 4, 1, 1, 25}, {533, 4, 1, 1, 25}, {526, 4, 1, 1, 25}, {474, 4, 1, 1, 25}, {545, 4, 1, 1, 25}, {517, 4, 1, 1, 25}, {410, 4, 1, 1, 25}, {600, 4, 1, 1, 25}, {436, 4, 1, 1, 25}, {439, 4, 1, 1, 25}, {549, 4, 1, 1, 25}, {491, 4, 1, 1, 25}, {445, 4, 1, 1, 25}, {604, 4, 1, 1, 25}, {507, 4, 1, 1, 25}, {585, 4, 1, 1, 25}, {466, 4, 1, 1, 25}, {492, 4, 1, 1, 25}, {546, 4, 1, 1, 25}, {551, 4, 1, 1, 25}, {516, 4, 1, 1, 25}, {467, 4, 1, 1, 25}, {426, 4, 1, 1, 25}, {547, 4, 1, 1, 25}, {405, 4, 1, 1, 25}, {580, 4, 1, 1, 25}, {409, 4, 1, 1, 25}, {550, 4, 1, 1, 25}, {566, 4, 1, 1, 25}, {540, 4, 1, 1, 25}, {521, 4, 1, 1, 25}, {529, 4, 1, 1, 25}, --carros Civil service {485, 4, 1, 1, 25}, {431, 6, 1, 1, 25}, {438, 4, 1, 1, 25}, {437, 6, 1, 1, 25}, {574, 4, 1, 1, 25}, {420, 4, 1, 1, 25}, {525, 4, 1, 1, 25}, {408, 6, 1, 1, 25}, {552, 4, 1, 1, 25}, --carros Heavy & Utility trucks {499, 4, 1, 1, 25}, {609, 4, 1, 1, 25}, {498, 4, 1, 1, 25}, {524, 6, 1, 1, 25}, {532, 4, 1, 1, 25}, {578, 6, 1, 1, 25}, {486, 4, 1, 1, 25}, {406, 4, 1, 1, 25}, {573, 4, 1, 1, 25}, {455, 6, 1, 1, 25}, {588, 4, 1, 1, 25}, {403, 6, 1, 1, 25}, {523, 4, 1, 1, 25}, {414, 4, 1, 1, 25}, {443, 6, 1, 1, 25}, {515, 6, 1, 1, 25}, {514, 64, 1, 1, 25}, {531, 4, 1, 1, 25}, {456, 4, 1, 1, 25}, --carros Light trucks & Vans {459, 4, 1, 1, 25}, {422, 4, 1, 1, 25}, {482, 4, 1, 1, 25}, {605, 4, 1, 1, 25}, {530, 4, 1, 1, 25}, {418, 4, 1, 1, 25}, {572, 4, 1, 1, 25}, {582, 4, 1, 1, 25}, {413, 4, 1, 1, 25}, {440, 4, 1, 1, 25}, {543, 4, 1, 1, 25}, {583, 4, 1, 1, 25}, {478, 4, 1, 1, 25}, {554, 4, 1, 1, 25}, --carros SUVs & Wagons {579, 4, 1, 1, 25}, {400, 4, 1, 1, 25}, {404, 4, 1, 1, 25}, {489, 4, 1, 1, 25}, {505, 4, 1, 1, 25}, {479, 4, 1, 1, 25}, {442, 4, 1, 1, 25}, {458, 4, 1, 1, 25}, --carros Lowriders {536, 4, 1, 1, 25}, {575, 4, 1, 1, 25}, {534, 4, 1, 1, 25}, {567, 4, 1, 1, 25}, {535, 4, 1, 1, 25}, {576, 4, 1, 1, 25}, {412, 4, 1, 1, 25}, --Muscle cars {402, 4, 1, 1, 25}, {542, 4, 1, 1, 25}, {603, 4, 1, 1, 25}, {475, 4, 1, 1, 25}, --Street racers {429, 4, 1, 1, 25}, {541, 4, 1, 1, 25}, {415, 4, 1, 1, 25}, {480, 4, 1, 1, 25}, {562, 4, 1, 1, 25}, {565, 4, 1, 1, 25}, {434, 4, 1, 1, 25}, {494, 4, 1, 1, 25}, {502, 4, 1, 1, 25}, {503, 4, 1, 1, 25}, {411, 4, 1, 1, 25}, {559, 4, 1, 1, 25}, {561, 4, 1, 1, 25}, {560, 4, 1, 1, 25}, {506, 4, 1, 1, 25}, {451, 4, 1, 1, 25}, {558, 4, 1, 1, 25}, {555, 4, 1, 1, 25}, {477, 4, 1, 1, 25}, --Recreational {568, 4, 1, 1, 25}, {424, 4, 1, 1, 25}, {504, 4, 1, 1, 25}, {457, 4, 1, 1, 25}, {483, 4, 1, 1, 25}, {508, 4, 1, 1, 25}, {571, 4, 1, 1, 25}, {500, 4, 1, 1, 25}, {444, 4, 1, 1, 25}, {556, 4, 1, 1, 25}, {557, 4, 1, 1, 25}, {471, 4, 1, 1, 25}, {495, 4, 1, 1, 25}, {539, 0, 0, 0, 25}, --{422, 4, 1, 1, 25}, --{470, 4, 1, 1, 46}, --{468, 2, 1, 1, 10}, --{433, 6, 1, 1, 70}, --{437, 6, 1, 1, 60}, --{509, 0, 0, 0, 0}, --{487, 0, 1, 1, 20}, --{497, 0, 1, 1, 20}, --{453, 0, 1, 1, 35}, --{492, 4, 1, 1, 32}, --{463, 2, 1, 1, 15}, --{505, 4, 1, 1, 40}, --{560, 4, 1, 1, 33}, --{579, 4, 1, 1, 40}, --{593, 3, 1, 1, 20}, };

local vehicleFuelTable = { --avião {592, 100}, {577, 100}, {511, 100}, {512, 100}, {593, 100}, {520, 100}, {553, 100}, {476, 100}, {519, 100}, {460, 100}, {513, 100}, {548, 100}, {425, 100}, {417, 100}, {487, 100}, {488, 100}, {497, 100}, {563, 100}, {447, 100}, {569, 100}, --bike-motos {581, 100}, {509, 0}, {481, 0}, {462, 100}, {521, 100}, {463, 100}, {510, 0}, {522, 100}, {461, 100}, {448, 100}, {468, 100}, {586, 100}, --carros {602, 100}, {496, 100}, {401, 100}, {518, 100}, {527, 100}, {589, 100}, {419, 100}, {587, 100}, {533, 100}, {526, 100}, {474, 100}, {545, 100}, {517, 100}, {410, 100}, {600, 100}, {436, 100}, {439, 100}, {549, 100}, {491, 100}, {445, 100}, {604, 100}, {507, 100}, {585, 100}, {466, 100}, {492, 100}, {546, 100}, {551, 100}, {516, 100}, {467, 100}, {426, 100}, {547, 100}, {405, 100}, {580, 100}, {409, 100}, {550, 100}, {566, 100}, {540, 100}, {521, 100}, {529, 100}, --carros Civil service {485, 100}, {431, 100}, {438, 100}, {437, 100}, {574, 100}, {420, 100}, {525, 100}, {408, 100}, {552, 100}, --carros Heavy & Utility trucks {499, 100}, {609, 100}, {498, 100}, {524, 100}, {532, 100}, {578, 100}, {486, 100}, {406, 100}, {573, 100}, {455, 100}, {588, 100}, {403, 100}, {523, 100}, {414, 100}, {443, 100}, {515, 100}, {514, 100}, {531, 100}, {456, 100}, --carros Light trucks & Vans {459, 100}, {422, 100}, {482, 100}, {605, 100}, {530, 100}, {418, 100}, {572, 100}, {582, 100}, {413, 100}, {440, 100}, {543, 100}, {583, 100}, {478, 100}, {554, 100}, --carros SUVs & Wagons {579, 100}, {400, 100}, {404, 100}, {489, 100}, {505, 100}, {479, 100}, {442, 100}, {458, 100}, --carros Lowriders {536, 100}, {575, 100}, {534, 100}, {567, 100}, {535, 100}, {576, 100}, {412, 100}, --Muscle cars {402, 100}, {542, 100}, {603, 100}, {475, 100}, --Street racers {429, 100}, {541, 100}, {415, 100}, {480, 100}, {562, 100}, {565, 100}, {434, 100}, {494, 100}, {502, 100}, {503, 100}, {411, 100}, {559, 100}, {561, 100}, {560, 100}, {506, 100}, {451, 100}, {558, 100}, {555, 100}, {477, 100}, --Recreational {568, 100}, {424, 100}, {504, 100}, {457, 100}, {483, 100}, {508, 100}, {571, 100}, {500, 100}, {444, 100}, {556, 100}, {557, 100}, {471, 100}, {495, 100}, {539, 100}, };

local weaponAmmoTable = { ["Weapons"] = { {"M1911 Mag", "M1911", 22}, {"M9 SD Mag", "M9 SD", 23}, {"Desert Eagle Mag", "Desert Eagle", 24}, {"PDW Mag", "PDW", 28}, {"MP5A5 Mag", "MP5A5", 29}, {"AK Mag", "AK-47", 30}, {"M4 Mag", "M4", 31}, {"1866 Slug", "Winchester 1866", 25}, {"2Rnd. Slug", "Sawn-Off Shotgun", 26}, {"SPAZ-12 Pellet", "SPAZ-12 Combat Shotgun", 27}, {"CZ 550 Mag", "CZ 550", 34}, {"Lee Enfield Mag", "Lee Enfield", 33}, }, ["others"] = { {"Parachute", 46}, {"Satchel", 39}, {"Tear Gas", 17}, {"Grenade", 16}, {"Hunting Knife", 4}, {"Hatchet", 8}, {"Binoculars", 43}, {"Baseball Bat", 5}, {"Shovel", 6}, {"Golf Club", 2}, }, };

local headline = {}; local gridlistItems = {}; local buttonItems = {}; local playerFire = {}; local fireCounter = 0;

addEvent("hideInventoryManual", true); addEvent("refreshInventoryManual", true); addEvent("refreshLootManual", true); addEvent("onPlayerMoveItemOutOFInventory", true); addEvent("onPlayerMoveItemInInventory", true);

inventoryWindows = guiCreateStaticImage(0.15, 0.28, 0.78, 0.64, "images/dayz_sa.png", true) -- [ID:0000014 - Remodel Inventory] //L --inventoryWindows = guiCreateWindow(0.15, 0.28, 0.72, 0.63, "Inventory (J)", true); --guiWindowSetSizable(inventoryWindows, false); --guiWindowSetMovable(inventoryWindows, false); headline["loot"] = guiCreateLabel(0.01, 0.05, 0.34, 0.08, "Gear", true, inventoryWindows); guiLabelSetHorizontalAlign (headline["loot"], "center"); guiSetFont (headline["loot"], "default-bold-small"); headline["inventory"] = guiCreateLabel(0.63, 0.05, 0.34, 0.09, "Backpack", true, inventoryWindows); guiLabelSetHorizontalAlign(headline["inventory"], "center"); guiSetFont (headline["inventory"], "default-bold-small"); --personagemGay = guiCreateStaticImage(0.35, 0.05, 0.30, 0.60, "images/viado2.png",true,inventoryWindows) --armaGay = guiCreateStaticImage(0.35, 0.75, 0.25, 0.25, "images/m4.png",true,inventoryWindows) gridlistItems["loot"] = guiCreateGridList(0.01, 0.10, 0.28, 0.77, true, inventoryWindows); gridlistItems["loot_colum"] = guiGridListAddColumn(gridlistItems["loot"], "Loot", 0.7); gridlistItems["loot_colum_amount"] = guiGridListAddColumn(gridlistItems["loot"], "", 0.2); guiSetAlpha(gridlistItems["loot"], 0.71) gridlistItems["inventory"] = guiCreateGridList(0.70, 0.10, 0.28, 0.77, true, inventoryWindows); gridlistItems["inventory_colum"] = guiGridListAddColumn(gridlistItems["inventory"], "Inventory", 0.7); gridlistItems["inventory_colum_amount"] = guiGridListAddColumn(gridlistItems["inventory"], "", 0.2); guiSetAlpha(gridlistItems["inventory"], 0.71) buttonItems["loot"] = guiCreateButton(0.32, 0.05, 0.04, 0.63, "Take", true, inventoryWindows); buttonItems["inventory"] = guiCreateButton(0.64, 0.05, 0.04, 0.63, "Drop", true, inventoryWindows); headline["slots"] = guiCreateLabel(0.75, 0.94, 0.23, 0.04, "Slots:",true, inventoryWindows); guiLabelSetHorizontalAlign(headline["slots"], "center"); guiLabelSetVerticalAlign(headline["slots"], "center"); guiSetFont(headline["slots"], "default-bold-small"); headline["slots_loot"] = guiCreateLabel(0.05, 0.94, 0.23, 0.04, "Slots:", true, inventoryWindows); guiLabelSetHorizontalAlign(headline["slots_loot"], "center"); guiLabelSetVerticalAlign(headline["slots_loot"], "center"); guiSetFont(headline["slots_loot"], "default-bold-small"); guiSetVisible(inventoryWindows, false);

rightclickWindow = guiCreateStaticImage(0, 0, 0.05, 0.0215, "images/scoreboard.png", true); headline["rightclickmenu"] = guiCreateLabel(0, 0, 1, 1, "", true, rightclickWindow); guiLabelSetHorizontalAlign(headline["rightclickmenu"], "center"); guiLabelSetVerticalAlign(headline["rightclickmenu"], "center"); guiSetFont(headline["rightclickmenu"], "default-bold-small"); guiSetVisible(rightclickWindow, false);

bindKey("j", "down", function(key, keyState) if getElementData(getLocalPlayer(), "logedin") then if (keyState == "down") then guiSetVisible(inventoryWindows, not guiGetVisible(inventoryWindows)); showCursor(not isCursorShowing()); refreshInventory(); if (guiGetVisible(inventoryWindows) == true) then onClientOpenInventoryStopMenu(); else hideRightClickInventoryMenu(); end if isPlayerInLoot() then refreshLoot(getElementData(getLocalPlayer(), "currentCol"), getElementData(getLocalPlayer(), "lootname")); end end end end);

function getWeaponAmmoType(weaponName) for ,v in ipairs(weaponAmmoTable["Weapons"]) do if (weaponName == v[2]) then return v[1], v[3]; end end for ,v in ipairs(weaponAmmoTable["others"]) do if (weaponName == v[1]) then return v[1], v[2]; end end return false, false; end

function showInventoryManual() guiSetVisible(inventoryWindows, not guiGetVisible(inventoryWindows)); showCursor(not isCursorShowing()); refreshInventory(); if (guiGetVisible(inventoryWindows) == true) then onClientOpenInventoryStopMenu(); end end

function hideInventoryManual() guiSetVisible(inventoryWindows, false); showCursor(false); hideRightClickInventoryMenu(); end addEventHandler("hideInventoryManual", getLocalPlayer(), hideInventoryManual);

function refreshInventoryManual() refreshInventory(); end addEventHandler("refreshInventoryManual", getLocalPlayer(), refreshInventoryManual);

function refreshLootManual(loot) refreshLoot(loot); end addEventHandler("refreshLootManual", getLocalPlayer(), refreshLootManual);

function refreshInventory() if (gridlistItems["inventorycolum"]) then local row1,column1 = guiGridListGetSelectedItem(gridlistItems["inventory"]); guiGridListClear(gridlistItems["inventory"]); for ,v in pairs({1,2,3,4,5,6,7,8}) do local row = guiGridListAddRow(gridlistItems["inventory"]); guiGridListSetItemText(gridlistItems["inventory"], row, gridlistItems["inventorycolum"], tostring(keyTable[v]), true, false); for ,item in ipairs(inventoryItems[v]) do if ((getElementData(getLocalPlayer(), tostring(item[1])) or 0) > 0) then local row = guiGridListAddRow(gridlistItems["inventory"]); guiGridListSetItemText(gridlistItems["inventory"], row, gridlistItems["inventory_colum"], tostring(item[1]), false, false); guiGridListSetItemText(gridlistItems["inventory"], row, gridlistItems["inventory_colum_amount"], getElementData(getLocalPlayer(), tostring(item[1])), false, false); end end end if (row1 and column1) then guiGridListSetSelectedItem(gridlistItems["inventory"], row1, column1); end guiSetText(headline["slots"], "Slots: "..getElementCurrentSlots(getLocalPlayer()).."/"..getElementMaxSlots(getLocalPlayer())); end end

function refreshLoot(loot, gearName) if (not isElement(loot) or loot == false) then guiGridListClear(gridlistItems["loot"]); guiSetText(headline["loot"], "Empty"); return false; end guiSetText(headline["loot"], "Loot"); if (gridlistItems["lootcolum"]) then local row2,column2 = guiGridListGetSelectedItem(gridlistItems["loot"]); guiGridListClear(gridlistItems["loot"]); for ,v in pairs({1,2,3,4,5,6,7,8}) do local row = guiGridListAddRow(gridlistItems["loot"]); guiGridListSetItemText(gridlistItems["loot"], row, gridlistItems["lootcolum"], tostring(keyTable[v]), true, false); for ,item in ipairs(inventoryItems[v]) do if ((getElementData(loot, tostring(item[1])) or 0) >= 1) then local row = guiGridListAddRow(gridlistItems["loot"]); guiGridListSetItemText(gridlistItems["loot"], row, gridlistItems["loot_colum"], tostring(item[1]), false, false); guiGridListSetItemText(gridlistItems["loot"], row, gridlistItems["loot_colum_amount"], getElementData(loot, tostring(item[1])), false, false); end end end guiSetText(headline["slots_loot"], "Slots: "..getElementCurrentSlots(loot).."/"..(getElementMaxSlots(loot)or 0)); end end

function getElementMaxSlots(element) return getElementData(element, "MAX_Slots"); end

function getElementCurrentSlots(element) local currentSLOTS = 0; for ,k in pairs({1,2,3,4,5,6,7,8}) do for _,v in ipairs(inventoryItems[k]) do if (getElementData(element, v[1]) and getElementData(element, v[1]) >= 1) then current_SLOTS = current_SLOTS+v[2]*getElementData(element, v[1]); end end end return math.floor(current_SLOTS); end

function getItemSlots(itemn) local currentSLOTS = 0; for ,k in pairs({1,2,3,4,5,6,7,8}) do for _,v in ipairs(inventoryItems[k]) do if (itemn == v[1]) then return v[2]; end end end return false; end

function isToolbeltItem(itemn) for _,v in ipairs(inventoryItems[7]) do if (itemn == v[1]) then return true; end end return false; end

function getVehicleAddonInfos (id) for _,v in ipairs(vehicleAddonsInfo) do if (v[1] == id) then return v[2], v[3], v[4], v[5]; end end end

function getVehicleMaxFuel(loot) for _,v in ipairs(vehicleFuelTable) do if (getElementModel(getElementData(loot, "parent")) == v[1]) then return v[2]; end end return false; end

addEventHandler("onClientGUIClick", buttonItems["inventory"], function() if playerMovedInInventory then startRollMessage("You can`t trow items that fast!", 255, 22, 0) return false; end local itemName = guiGridListGetItemText(gridlistItems["inventory"], guiGridListGetSelectedItem(gridlistItems["inventory"]), 1); if (getElementData(getLocalPlayer(), itemName) and getElementData(getLocalPlayer(), itemName) >= 1) then if cloth and getElementData ( localPlayer, cloth ) == itemName then startRollMessage("First remove clothes", 255, 22, 0 ) return true end for _, data in ipairs ( clothPack ) do if itemName == data[1] then if getElementData(getLocalPlayer(),data[4]) == data[2] then startRollMessage("First remove clothes", 255, 22, 0 ) return true end end end if isPlayerInLoot() then if (getElementData(isPlayerInLoot(), "vehicle") and not getElementData(isPlayerInLoot(), "tent")) then local veh = getElementData(isPlayerInLoot(), "parent"); local tires,engine,parts,slots = getVehicleAddonInfos(getElementModel(veh)); if ((itemName == "Tire") and (getElementData(isPlayerInLoot(), "Tire_inVehicle") or 0) < tires or itemName == "Engine" and (getElementData(isPlayerInLoot(), "Engine_inVehicle") or 0) < engine) then triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), itemName.."_inVehicle", isPlayerInLoot()); playerMovedInInventory = true; setTimer(function() playerMovedInInventory = false; end, 700, 1); elseif (itemName == "Tank Parts") and (getElementData(isPlayerInLoot(), "Parts_inVehicle") or 0) < parts then triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), "Parts_inVehicle", isPlayerInLoot()); playerMovedInInventory = true; setTimer(function() playerMovedInInventory = false; end, 700, 1); elseif isToolbeltItem(itemName) then triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), itemName, isPlayerInLoot()); playerMovedInInventory = true; setTimer(function() playerMovedInInventory = false; end, 700, 1); elseif (getElementCurrentSlots(getElementData(getLocalPlayer(), "currentCol"))+getItemSlots(itemName) <= getElementMaxSlots(isPlayerInLoot())) then triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), itemName, isPlayerInLoot()); playerMovedInInventory = true; setTimer(function() playerMovedInInventory = false; end, 700, 1); else startRollMessage("Inventory is full!", 255, 22, 0); return false; end elseif isToolbeltItem(itemName) then triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), itemName, isPlayerInLoot()); playerMovedInInventory = true; setTimer(function() playerMovedInInventory = false; end, 700, 1); elseif getElementCurrentSlots(getElementData(getLocalPlayer(), "currentCol")) + getItemSlots(itemName) <= getElementMaxSlots(isPlayerInLoot()) then triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), itemName, isPlayerInLoot()); playerMovedInInventory = true setTimer(function() playerMovedInInventory = false; end, 700, 1); else startRollMessage("Inventory is full!", 255, 22, 0); return false; end else triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), itemName, isPlayerInLoot()) playerMovedInInventory = true setTimer(function() playerMovedInInventory = false; end, 700, 1); end end local col = getElementData(getLocalPlayer(),"currentCol"); setTimer(refreshInventory, 200, 2); if isPlayerInLoot() then setTimer(refreshLoot, 200, 2, col, guiGetText(headline["loot"])); end end);

addEventHandler("onPlayerMoveItemOutOFInventory", getRootElement(), function(itemName, loot) local itemPlus = 1; if (itemName == "M1911 Mag") then itemPlus = 10; elseif (itemName == "M9 SD Mag") then itemPlus = 15; elseif (itemName == "Desert Eagle Mag") then itemPlus = 7; elseif (itemName == "PDW Mag") then itemPlus = 30; elseif (itemName == "MP5A5 Mag") then itemPlus = 20; elseif (itemName == "AK Mag") then itemPlus = 30; elseif (itemName == "M4 Mag") then itemPlus = 30; elseif (itemName == "1866 Slug") then itemPlus = 7; elseif (itemName == "2Rnd. Slug") then itemPlus = 2; elseif (itemName == "SPAZ-12 Pellet") then itemPlus = 7; elseif (itemName == "CZ 550 Mag") then itemPlus = 5; elseif (itemName == "Lee Enfield Mag") then itemPlus = 10; elseif (itemName == "M4" or itemName == "AK-47" or itemName == "CZ 550" or itemName == "Winchester 1866" or itemName == "SPAZ-12 Combat Shotgun" or itemName == "Sawn-Off Shotgun" or itemName == "Lee Enfield") then triggerServerEvent("removeBackWeaponOnDrop", getLocalPlayer()); end if (loot) then if (not getElementData(loot, "itemloot") and getElementType(getElementData(loot, "parent")) == "vehicle") then if (itemName == "Full Gas Canister") then if ((getElementData(loot, "fuel")+20) < getVehicleMaxFuel(loot)) then addingfuel = 20; elseif ((getElementData(loot, "fuel")+20) > (getVehicleMaxFuel(loot)+15)) then startRollMessage("Fuel tank is full!", 255, 22, 0); return false; else addingfuel = getVehicleMaxFuel(loot)-getElementData(loot, "fuel"); end setElementData(loot, "fuel", getElementData(loot, "fuel")+addingfuel); setElementData(getLocalPlayer(), itemName, getElementData(getLocalPlayer(), itemName)-itemPlus); setElementData(getLocalPlayer(), "Empty Gas Canister", (getElementData(getLocalPlayer(), "Empty Gas Canister") or 0)+itemPlus); startRollMessage("Filled gas into vehicle!", 22, 255, 0); return; end end end itemName2 = itemName; if (itemName == "Tire_inVehicle") then itemName2 = "Tire"; end if (itemName == "Engine_inVehicle") then itemName2 = "Engine"; end if (itemName == "Parts_inVehicle") then itemName2 = "Tank Parts"; end if (((getElementData(getLocalPlayer(), itemName2) or 0)/itemPlus) < 1) then startRollMessage("You can't drop this!", 255, 22, 0); return false; end if (loot) then setElementData(loot, itemName, (getElementData(loot, itemName) or 0)+1); local players = getElementsWithinColShape(loot, "player"); if (#players > 1) then triggerServerEvent("onPlayerChangeLoot", getRootElement(), loot); end if (not getElementData(loot,"itemloot") and getElementType(getElementData(loot,"parent")) == "vehicle") then end else triggerServerEvent("playerDropAItem", getLocalPlayer(), itemName); end if (itemName == "Tire_inVehicle") then itemName = "Tire"; end if (itemName == "Engine_inVehicle") then itemName = "Engine"; end if (itemName == "Parts_inVehicle") then itemName = "Tank Parts"; end setElementData(getLocalPlayer(), itemName, getElementData(getLocalPlayer(), itemName)-itemPlus); if (loot and getElementData(loot, "itemloot")) then triggerServerEvent("refreshItemLoot", getRootElement(), loot, getElementData(loot, "parent")); end end);

addEventHandler("onClientGUIClick", buttonItems["loot"], function() local itemName = guiGridListGetItemText(gridlistItems["loot"], guiGridListGetSelectedItem(gridlistItems["loot"]), 1); if isPlayerInLoot() then if (getElementData(isPlayerInLoot(), itemName) and getElementData(isPlayerInLoot(), itemName) >= 1) then if (not isToolbeltItem(itemName)) then if (getElementCurrentSlots(getLocalPlayer())+getItemSlots(itemName) <= getElementMaxSlots(getLocalPlayer())) then if (not playerMovedInInventory) then triggerEvent("onPlayerMoveItemInInventory", getLocalPlayer(), itemName, isPlayerInLoot()); playerMovedInInventory = true; setTimer(function() playerMovedInInventory = false; end, 700, 1); else startRollMessage("You can`t pick up items that fast!", 255, 22, 0); return false; end else startRollMessage("Inventory is full!", 255, 22, 0); return false; end else playerMovedInInventory = true; setTimer(function() playerMovedInInventory = false end, 700, 1); triggerEvent("onPlayerMoveItemInInventory", getLocalPlayer(), itemName, isPlayerInLoot()); end end if isPlayerInLoot() then setTimer(refreshInventory, 200, 2); setTimer(refreshLoot, 200, 2, getElementData(getLocalPlayer(), "currentCol"), guiGetText(headline["loot"])); end end end);

addEventHandler("onPlayerMoveItemInInventory", getRootElement(), function(itemName, loot) local itemPlus = 1 if (itemName == "M1911 Mag") then itemPlus = 10; elseif (itemName == "M9 SD Mag") then itemPlus = 15; elseif (itemName == "Desert Eagle Mag") then itemPlus = 7; elseif (itemName == "PDW Mag") then itemPlus = 30; elseif (itemName == "MP5A5 Mag") then itemPlus = 20; elseif (itemName == "AK Mag") then itemPlus = 30; elseif (itemName == "M4 Mag") then itemPlus = 30; elseif (itemName == "1866 Slug") then itemPlus = 7; elseif (itemName == "2Rnd. Slug") then itemPlus = 2; elseif (itemName == "SPAZ-12 Pellet") then itemPlus = 7; elseif (itemName == "CZ 550 Mag") then itemPlus = 5; elseif (itemName == "Lee Enfield Mag") then itemPlus = 10; elseif (itemName == "Assault Pack (ACU)") then if (getElementData(getLocalPlayer(), "MAX_Slots") >= 12) then startRollMessage("You already have a biger or equal backpack!", 255, 22, 0) return false; end setElementData(getLocalPlayer(), "MAX_Slots", 12); setElementData(loot, itemName, getElementData(loot, itemName)-1); itemPlus = 0; elseif (itemName == "Alice Pack") then if (getElementData(getLocalPlayer(), "MAX_Slots") >= 16) then startRollMessage("You already have a biger or equal backpack!", 255, 22, 0) return false; end setElementData(getLocalPlayer(), "MAX_Slots", 16); setElementData(loot, itemName, getElementData(loot, itemName)-1); itemPlus = 0; elseif (itemName == "Czech Backpack") then if (getElementData(getLocalPlayer(), "MAX_Slots") >= 26) then startRollMessage("You already have a biger or equal backpack!", 255, 22, 0) return false; end setElementData(getLocalPlayer(), "MAX_Slots", 26) setElementData(loot, itemName, getElementData(loot, itemName)-1); itemPlus = 0; elseif (itemName == "Coyote Backpack") then if (getElementData(getLocalPlayer(), "MAX_Slots") == 36) then startRollMessage("You already have a biger or equal backpack!", 255, 22, 0) return false; end setElementData(getLocalPlayer(), "MAX_Slots", 36); setElementData(loot, itemName, getElementData(loot, itemName)-1); itemPlus = 0; end if (loot) then setElementData(getLocalPlayer(), itemName, (getElementData(getLocalPlayer(), itemName) or 0)+itemPlus); if (itemPlus ~= 0) then setElementData(loot, itemName, getElementData(loot, itemName)-1); end local players = getElementsWithinColShape(loot, "player"); if (#players > 1) then triggerServerEvent("onPlayerChangeLoot", getRootElement(), loot); end end if getElementData(loot, "itemloot") then triggerServerEvent("refreshItemLoot", getRootElement(), loot, getElementData(loot, "parent")); end end);

function onClientOpenInventoryStopMenu() triggerEvent("disableMenu", getLocalPlayer()); end

function isPlayerInLoot() if getElementData(getLocalPlayer(), "loot") then return getElementData(getLocalPlayer(), "currentCol"); end return false; end

bindKey("mouse2", "down", function() local itemName = guiGridListGetItemText(gridlistItems["inventory"], guiGridListGetSelectedItem(gridlistItems["inventory"]), 1); local itemName,itemInfo = getInventoryInfosForRightClickMenu(itemName); if (isCursorShowing() and guiGetVisible(inventoryWindows) and itemInfo) then if (itemName == "Box of Matches") then if (getElementData(getLocalPlayer(), "Wood Pile") == 0) then return false; end elseif (itemName == "Bandage") then if (getElementData(getLocalPlayer(), "bleeding") == 0) then return false; end elseif (itemName == "Medic Kit") then if (getElementData(getLocalPlayer(), "blood") > 10500) then return false; end elseif (itemName == "Heat Pack") then if (getElementData(getLocalPlayer(), "temperature") > 35) then return false; end elseif (itemName == "Painkiller") then if (not getElementData(getLocalPlayer(), "pain")) then return false; end elseif (itemName == "Morphine") then if (not getElementData(getLocalPlayer(), "brokenbone")) then return false; end end if (itemName == "Blood Bag") then return false; end for _, item in ipairs ( clothPack ) do
if itemName == item[1] then local cloth = getPedClothesID(getLocalPlayer(),item[3]) if cloth == item[2] and itemName == item[1] then itemInfo = "Remove Roupa" break end end end showRightClickInventoryMenu(itemName, itemInfo); end end);

function getPedClothesID(thePed, clothingSlot) if not isElement(thePed) or type(clothingSlot) ~= "number" then error("Invalid arguments to setPedClothes()!", 2) end local texture, model = getPedClothes(thePed, clothingSlot) if not texture then return false else local _, id = getTypeIndexFromClothes(texture, model) return id end end

function getClothBodySlot (cloth) for cat_name, cloth_table in pairs ( clothSlots ) do for i, v in pairs (cloth_table) do if i == cloth then return cat_name end end end return false end

function getInventoryInfosForRightClickMenu(itemName) for ,v in ipairs(inventoryItems[1]) do if (itemName == v[1]) then return itemName, "Equip Primary Weapon"; end end for ,v in ipairs(inventoryItems[2]) do if (itemName == v[1]) then return itemName, "Equip Secondary Weapon"; end end for ,v in ipairs(inventoryItems[3]) do if (itemName == v[1]) then return itemName, "Equip Special Weapon"; end end for ,v in ipairs(inventoryItems[4]) do if (itemName == v[1]) then return itemName, false; end end for ,v in ipairs(inventoryItems[5]) do if (itemName == v[1]) then if (v[1] == "Water Bottle" or v[1] == "Milk" or v[1] == "Soda Bottle") then info = "Drink"; else info = "Eat"; end return itemName, info; end end for ,v in ipairs(inventoryItems[6]) do if (itemName == v[1]) then return itemName, v[3] or false; end end for ,v in ipairs(inventoryItems[7]) do if (itemName == v[1]) then return itemName, v[3] or false; end end for ,v in ipairs(inventoryItems[8]) do if (itemName == v[1]) then return itemName, v[3] or false; end end end

function showRightClickInventoryMenu(itemName, itemInfo) if (itemInfo) then local screenx,screeny,,,_ = getCursorPosition(); guiSetVisible(rightclickWindow, true); guiSetText(headline["rightclickmenu"], itemInfo); local whith = guiLabelGetTextExtent(headline["rightclickmenu"]); guiSetPosition(rightclickWindow, screenx, screeny, true); local x,y = guiGetSize(rightclickWindow, false); guiSetSize(rightclickWindow, whith, y, false); guiBringToFront(rightclickWindow); setElementData(rightclickWindow, "iteminfo", {itemName, itemInfo}); end end

function hideRightClickInventoryMenu() guiSetVisible(rightclickWindow, false); end

addEventHandler("onClientGUIClick", headline["rightclickmenu"], function(button, state) if (button == "left") then local itemName,itemInfo = getElementData(rightclickWindow, "iteminfo")[1], getElementData(rightclickWindow, "iteminfo")[2]; hideRightClickInventoryMenu(); playerUseItem(itemName, itemInfo); end end, false);

function playerUseItem(itemName,itemInfo) if (itemInfo == "Drink") then triggerServerEvent("onPlayerRequestChangingStats", getLocalPlayer(), itemName, itemInfo, "thirst"); elseif (itemInfo == "Eat") then triggerServerEvent("onPlayerRequestChangingStats", getLocalPlayer(), itemName, itemInfo, "food");
elseif (itemInfo == "Put clothes on") then triggerServerEvent("onPlayerChangeSkin", getLocalPlayer(), itemName); elseif (itemName == "Empty Water Bottle") then triggerServerEvent("onPlayerRefillWaterBottle", getLocalPlayer(), itemName);
elseif (itemName == "Tent") then triggerServerEvent("onPlayerPitchATent", getLocalPlayer(), itemName); elseif (itemInfo == "Build a wire fence") then triggerServerEvent("onPlayerBuildAWireFence", getLocalPlayer(), itemName); elseif (itemName == "Roadflare") then triggerServerEvent("onPlayerPlaceRoadflare", getLocalPlayer(), itemName); elseif (itemInfo == "Make a Fire") then triggerServerEvent("onPlayerMakeAFire", getLocalPlayer(), itemName); elseif (itemInfo == "Use") then triggerServerEvent("onPlayerUseMedicObject", getLocalPlayer(), itemName); elseif (itemName == "Bandage") then triggerServerEvent("onPlayerUseMedicObject", getLocalPlayer(), itemName); elseif (itemInfo == "Use Googles") then triggerServerEvent("onPlayerChangeView", getLocalPlayer(), itemName); elseif (itemInfo == "Equip Primary Weapon") then triggerServerEvent("onPlayerRearmWeapon", getLocalPlayer(), itemName, 1);
elseif (itemInfo == "Equip Secondary Weapon") then triggerServerEvent("onPlayerRearmWeapon",getLocalPlayer(), itemName, 2); elseif (itemInfo == "Equip Special Weapon") then triggerServerEvent("onPlayerRearmWeapon", getLocalPlayer(), itemName, 3); elseif itemInfo == "Coloca Roupa" then for , item in ipairs ( clothPack ) do if itemName == item[1] then triggerServerEvent ("setPlayerCloth",getLocalPlayer(),getLocalPlayer(),item[3],item[2]) setElementData(getLocalPlayer(),item[4],item[2]) refreshInventory()
end end elseif itemInfo == "Remove Roupa" then for
, item in ipairs ( clothPack ) do
if itemName == item[1] then local cloth = getPedClothesID(getLocalPlayer(),item[3]) if cloth == item[2] and itemName == item[1] then triggerServerEvent ("setPlayerCloth",getLocalPlayer(),getLocalPlayer(),item[3],0) setElementData(getLocalPlayer(),item[4],0) refreshInventory()
end end end end end

function getWeaponAmmoFromId(weaponName) for ,v in ipairs(weaponAmmoTable["Weapons"]) do if (weaponName == v[3]) then return v[1], v[2]; end end for ,v in ipairs(weaponAmmoTable["others"]) do if (weaponName == v[2]) then return v[1], v[2]; end end return false, false; end

addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), function(WeaponID) if (source == getLocalPlayer()) then local ammoName,_ = getWeaponAmmoFromId(WeaponID); if (ammoName) then if (getElementData(getLocalPlayer(), ammoName) and getElementData(getLocalPlayer(), ammoName) >= 1) then setElementData(getLocalPlayer(), ammoName, (getElementData(getLocalPlayer(), ammoName)-1)); end end end end);

darlln commented 8 years ago

;/