Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Decompiled using luadec 2.1 UNICODE r69 from http://code.google.com/p/luadec
- -- Command line: -l2 LDS2 inventory.luac
- local l_0_0 = nil
- inventoryItems, l_0_0 = l_0_0, {
- Weapons = {
- ["Primary Weapon"] = {
- {"M4", 3},
- {"CZ 550", 3},
- {"Winchester 1866", 3},
- {"SPAZ-12 Combat Shotgun", 3},
- {"Sawn-Off Shotgun", 3},
- {"AK-47", 3},
- {"Lee Enfield", 3}},
- ["Secondary Weapon"] = {
- {"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}},
- ["Specially Weapon"] = {
- {"Parachute", 1},
- {"Tear Gas", 1},
- {"Grenade", 1},
- {"Binoculars", 1}}},
- Ammo = {
- {"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}},
- Food = {
- {"Water Bottle", 1},
- {"Pasta Can", 1},
- {"Beans Can", 1},
- {"Burger", 1},
- {"Pizza", 1},
- {"Soda Bottle", 1},
- {"Milk", 1},
- {"Cooked Meat", 1}},
- Items = {
- {"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},
- {"Engine", 5},
- {"Tank Parts", 3},
- {"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}},
- Toolbelt = {
- {"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}}}
- inventoryWindows = guiCreateWindow(0.15, 0.28, 0.72, 0.63, "", true)
- guiLabelSetHorizontalAlign(l_0_0.loot, "center")
- l_0_0 = {loot = guiCreateLabel(0.06, 0.05, 0.34, 0.09, "GEAR", true, inventoryWindows)}
- guiSetFont(l_0_0.loot, "default-bold-small")
- l_0_0.inventory = guiCreateLabel(0.6, 0.05, 0.34, 0.09, "INVENTORY", true, inventoryWindows)
- guiLabelSetHorizontalAlign(l_0_0.inventory, "center")
- guiSetFont(l_0_0.inventory, "default-bold-small")
- -- DECOMPILER ERROR: Confused about usage of registers, missing locals? Creating them
- local l_0_1 = {loot = guiCreateGridList(0.03, 0.1, 0.39, 0.83, true, inventoryWindows)}
- l_0_1.loot_colum = guiGridListAddColumn(({loot = guiCreateGridList(0.03, 0.1, 0.39, 0.83, true, inventoryWindows)}).loot, "Loot", 0.7)
- l_0_1.loot_colum_amount = guiGridListAddColumn(l_0_1.loot, "", 0.2)
- l_0_1.inventory = guiCreateGridList(0.57, 0.11, 0.39, 0.83, true, inventoryWindows)
- l_0_1.inventory_colum = guiGridListAddColumn(l_0_1.inventory, "Inventory", 0.7)
- l_0_1.inventory_colum_amount = guiGridListAddColumn(l_0_1.inventory, "", 0.2)
- l_0_0.slots = guiCreateLabel(0.62, 0.94, 0.29, 0.04, "SLOTS:", true, inventoryWindows)
- guiLabelSetHorizontalAlign(l_0_0.slots, "center")
- guiLabelSetVerticalAlign(l_0_0.slots, "center")
- guiSetFont(l_0_0.slots, "default-bold-small")
- l_0_0.slots_loot = guiCreateLabel(0.07, 0.94, 0.29, 0.04, "SLOTS:", true, inventoryWindows)
- guiLabelSetHorizontalAlign(l_0_0.slots_loot, "center")
- guiLabelSetVerticalAlign(l_0_0.slots_loot, "center")
- guiSetFont(l_0_0.slots_loot, "default-bold-small")
- guiSetVisible(inventoryWindows, false)
- showInventory = function(ERROR_nil, ERROR_nil)
- if getElementData(getLocalPlayer(), "logedin") and ERROR_nil == "down" then
- guiSetVisible(inventoryWindows, not guiGetVisible(inventoryWindows))
- showCursor(not isCursorShowing())
- refreshInventory()
- if guiGetVisible(inventoryWindows) == true then
- onClientOpenInventoryStopMenu()
- else
- hideRightClickInventoryMenu()
- end
- end
- if isPlayerInLoot() then
- refreshLoot(getElementData(getLocalPlayer(), "currentCol"), getElementData(getLocalPlayer(), "lootname"))
- end
- end
- bindKey("j", "down", showInventory)
- showInventoryManual = function()
- guiSetVisible(inventoryWindows, not guiGetVisible(inventoryWindows))
- showCursor(not isCursorShowing())
- refreshInventory()
- if guiGetVisible(inventoryWindows) == true then
- onClientOpenInventoryStopMenu()
- end
- end
- hideInventoryManual = function()
- guiSetVisible(inventoryWindows, false)
- showCursor(false)
- hideRightClickInventoryMenu()
- end
- addEvent("hideInventoryManual", true)
- addEventHandler("hideInventoryManual", getLocalPlayer(), hideInventoryManual)
- refreshInventoryManual = function()
- refreshInventory()
- end
- addEvent("refreshInventoryManual", true)
- addEventHandler("refreshInventoryManual", getLocalPlayer(), refreshInventoryManual)
- refreshLootManual = function(ERROR_nil)
- refreshLoot(ERROR_nil)
- end
- addEvent("refreshLootManual", true)
- addEventHandler("refreshLootManual", getLocalPlayer(), refreshLootManual)
- refreshInventory = function()
- -- upvalues: l_0_1 , l_0_0
- if l_0_1.inventory_colum then
- row1, column1 = guiGridListGetSelectedItem(l_0_1.inventory), l_0_1.inventory
- guiGridListClear(l_0_1.inventory)
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, "PRIMARY WEAPON", true, false)
- -- WARNING: pending registers. Declaring locals.
- local l_6_0 = guiGridListAddRow(l_0_1.inventory)
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Primary Weapon"]) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum_amount, getElementData(getLocalPlayer(), i_2[1]), false, false)
- end
- end
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, "SECONDARY WEAPON", true, false)
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Secondary Weapon"]) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum_amount, getElementData(getLocalPlayer(), i_2[1]), false, false)
- end
- end
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, "SPECIAL WEAPON", true, false)
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Specially Weapon"]) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum_amount, getElementData(getLocalPlayer(), i_2[1]), false, false)
- end
- end
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, "AMMO", true, false)
- for i_1,i_2 in ipairs(inventoryItems.Ammo) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum_amount, getElementData(getLocalPlayer(), i_2[1]), false, false)
- end
- end
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, "FOOD & DRINKS", true, false)
- for i_1,i_2 in ipairs(inventoryItems.Food) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum_amount, getElementData(getLocalPlayer(), i_2[1]), false, false)
- end
- end
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, "MISC.", true, false)
- for i_1,i_2 in ipairs(inventoryItems.Items) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum_amount, getElementData(getLocalPlayer(), i_2[1]), false, false)
- end
- end
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, "TOOLBELT", true, false)
- for i_1,i_2 in ipairs(inventoryItems.Toolbelt) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.inventory, guiGridListAddRow(l_0_1.inventory), l_0_1.inventory_colum_amount, getElementData(getLocalPlayer(), i_2[1]), false, false)
- end
- end
- if row1 and column1 then
- guiGridListSetSelectedItem(l_0_1.inventory, row1, column1)
- end
- guiSetText(l_0_0.slots, "SLOTS: " .. getPlayerCurrentSlots() .. "/" .. getPlayerMaxAviableSlots())
- end
- end
- refreshLoot = function(ERROR_nil, ERROR_nil)
- -- upvalues: l_0_1 , l_0_0
- if ERROR_nil == false then
- guiGridListClear(l_0_1.loot)
- guiSetText(l_0_0.loot, "Empty")
- return
- end
- if l_0_1.loot_colum then
- row2, column2 = guiGridListGetSelectedItem(l_0_1.inventory), l_0_1.inventory
- guiGridListClear(l_0_1.loot)
- if ERROR_nil then
- guiSetText(l_0_0.loot, ERROR_nil)
- end
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, "PRIMARY WEAPON", true, false)
- -- WARNING: pending registers. Declaring locals.
- local l_7_2 = guiGridListAddRow(l_0_1.loot)
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Primary Weapon"]) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum_amount, getElementData(ERROR_nil, i_2[1]), false, false)
- end
- end
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, "SECONDARY WEAPON", true, false)
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Secondary Weapon"]) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum_amount, getElementData(ERROR_nil, i_2[1]), false, false)
- end
- end
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, "SPECIAL WEAPON", true, false)
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Specially Weapon"]) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum_amount, getElementData(ERROR_nil, i_2[1]), false, false)
- end
- end
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, "AMMO", true, false)
- for i_1,i_2 in ipairs(inventoryItems.Ammo) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum_amount, getElementData(ERROR_nil, i_2[1]), false, false)
- end
- end
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, "FOOD & DRINKS", true, false)
- for i_1,i_2 in ipairs(inventoryItems.Food) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum_amount, getElementData(ERROR_nil, i_2[1]), false, false)
- end
- end
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, "MISC.", true, false)
- for i_1,i_2 in ipairs(inventoryItems.Items) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum_amount, getElementData(ERROR_nil, i_2[1]), false, false)
- end
- end
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, "TOOLBELT", true, false)
- for i_1,i_2 in ipairs(inventoryItems.Toolbelt) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum, i_2[1], false, false)
- guiGridListSetItemText(l_0_1.loot, guiGridListAddRow(l_0_1.loot), l_0_1.loot_colum_amount, getElementData(ERROR_nil, i_2[1]), false, false)
- end
- end
- guiSetText(l_0_0.slots_loot, "SLOTS: " .. getLootCurrentSlots(ERROR_nil) .. "/" .. ((not row2 or column2) and getLootMaxAviableSlots(ERROR_nil) or 0))
- end
- end
- getPlayerMaxAviableSlots = function()
- return getElementData(getLocalPlayer(), "MAX_Slots")
- end
- getLootMaxAviableSlots = function(ERROR_nil)
- return getElementData(ERROR_nil, "MAX_Slots")
- end
- getPlayerCurrentSlots = function()
- -- WARNING: pending registers. Declaring locals.
- local l_10_0 = 0
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Primary Weapon"]) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- l_10_0 = l_10_0 + i_2[2] * getElementData(getLocalPlayer(), i_2[1])
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Secondary Weapon"]) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- l_10_0 = l_10_0 + i_2[2] * getElementData(getLocalPlayer(), i_2[1])
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Specially Weapon"]) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- l_10_0 = l_10_0 + i_2[2] * getElementData(getLocalPlayer(), i_2[1])
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Ammo) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- l_10_0 = l_10_0 + i_2[2] * getElementData(getLocalPlayer(), i_2[1])
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Food) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- l_10_0 = l_10_0 + i_2[2] * getElementData(getLocalPlayer(), i_2[1])
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Items) do
- if getElementData(getLocalPlayer(), i_2[1]) and getElementData(getLocalPlayer(), i_2[1]) >= 1 then
- l_10_0 = l_10_0 + i_2[2] * getElementData(getLocalPlayer(), i_2[1])
- end
- end
- return math.floor(l_10_0)
- end
- getLootCurrentSlots = function(ERROR_nil)
- -- WARNING: pending registers. Declaring locals.
- local l_11_1 = 0
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Primary Weapon"]) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- l_11_1 = l_11_1 + i_2[2] * getElementData(ERROR_nil, i_2[1])
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Secondary Weapon"]) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- l_11_1 = l_11_1 + i_2[2] * getElementData(ERROR_nil, i_2[1])
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Specially Weapon"]) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- l_11_1 = l_11_1 + i_2[2] * getElementData(ERROR_nil, i_2[1])
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Ammo) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- l_11_1 = l_11_1 + i_2[2] * getElementData(ERROR_nil, i_2[1])
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Food) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- l_11_1 = l_11_1 + i_2[2] * getElementData(ERROR_nil, i_2[1])
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Items) do
- if getElementData(ERROR_nil, i_2[1]) and getElementData(ERROR_nil, i_2[1]) >= 1 then
- l_11_1 = l_11_1 + i_2[2] * getElementData(ERROR_nil, i_2[1])
- end
- end
- return math.floor(l_11_1)
- end
- getItemSlots = function(ERROR_nil)
- -- WARNING: pending registers. Declaring locals.
- local l_12_1 = 0
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Primary Weapon"]) do
- if ERROR_nil == i_2[1] then
- return i_2[2]
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Secondary Weapon"]) do
- if ERROR_nil == i_2[1] then
- return i_2[2]
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Specially Weapon"]) do
- if ERROR_nil == i_2[1] then
- return i_2[2]
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Ammo) do
- if ERROR_nil == i_2[1] then
- return i_2[2]
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Food) do
- if ERROR_nil == i_2[1] then
- return i_2[2]
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Items) do
- if ERROR_nil == i_2[1] then
- return i_2[2]
- end
- end
- return false
- end
- isToolbeltItem = function(ERROR_nil)
- -- WARNING: pending registers. Declaring locals.
- local l_13_1 = 0
- for i_1,i_2 in ipairs(inventoryItems.Toolbelt) do
- if ERROR_nil == i_2[1] then
- return true
- end
- end
- return false
- end
- vehicleAddonsInfo = {
- {422, 4, 1, 1},
- {470, 4, 1, 1},
- {468, 2, 1, 1},
- {433, 6, 1, 1},
- {437, 6, 1, 1},
- {509, 0, 0, 0},
- {487, 0, 1, 1},
- {497, 0, 1, 1},
- {453, 0, 1, 1}}
- getVehicleAddonInfos = function(ERROR_nil)
- for i_1,i_2 in ipairs(vehicleAddonsInfo) do
- if i_2[1] == ERROR_nil then
- return i_2[2], i_2[3], i_2[4]
- end
- end
- end
- vehicleFuelTable = {
- {422, 80},
- {470, 100},
- {468, 30},
- {433, 140},
- {437, 140},
- {509, 0},
- {487, 60},
- {497, 60},
- {453, 60}}
- getVehicleMaxFuel = function(ERROR_nil)
- -- WARNING: pending registers. Declaring locals.
- local l_15_1 = getElementModel(getElementData(ERROR_nil, "parent"))
- for i_1,i_2 in ipairs(vehicleFuelTable) do
- if l_15_1 == i_2[1] then
- return i_2[2]
- end
- end
- return false
- end
- onPlayerMoveItemOutOfInventory = function()
- -- upvalues: l_0_1 , l_0_0
- if playerMovedInInventory then
- startRollMessage2("Inventory", "Abusing exploits will result in a ban!", 255, 22, 0)
- return
- end
- if guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1) ~= "Tire" or ((not getElementData(isPlayerInLoot(), "Tire_inVehicle") and not getElementData(getLocalPlayer(), guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1)) or getElementData(getLocalPlayer(), guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1)) < 1 or 0 < getVehicleAddonInfos(getElementModel(getElementData(isPlayerInLoot(), "parent")))) or ((not getElementData(isPlayerInLoot(), "Engine_inVehicle") and not isPlayerInLoot() or 0 < getElementModel(getElementData(isPlayerInLoot(), "parent"))) or guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1) == "Tank Parts" and (getElementData(isPlayerInLoot(), "Parts_inVehicle") or not getElementData(isPlayerInLoot(), "vehicle") or getElementData(isPlayerInLoot(), "tent") or 0 < .end))) then
- if guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1) == "Tank Parts" then
- triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), "Parts" .. "_inVehicle", isPlayerInLoot())
- playerMovedInInventory = true
- setTimer(function()
- playerMovedInInventory = false
- end, 700, 1)
- -- DECOMPILER ERROR: Confused about usage of registers, missing locals? Creating them
- local l_16_0 = "Parts"
- else
- if isToolbeltItem(l_16_0) then
- triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), l_16_0, isPlayerInLoot())
- playerMovedInInventory = true
- setTimer(function()
- playerMovedInInventory = false
- end, 700, 1)
- end
- else
- if getLootCurrentSlots(getElementData(getLocalPlayer(), "currentCol")) + getItemSlots(l_16_0) <= getLootMaxAviableSlots(isPlayerInLoot()) then
- triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), l_16_0, isPlayerInLoot())
- playerMovedInInventory = true
- setTimer(function()
- playerMovedInInventory = false
- end, 700, 1)
- end
- else
- startRollMessage2("Inventory", "Inventory is full!", 255, 22, 0)
- return
- end
- do return end
- if isToolbeltItem(l_16_0) then
- triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), l_16_0, isPlayerInLoot())
- playerMovedInInventory = true
- setTimer(function()
- playerMovedInInventory = false
- end, 700, 1)
- else
- if getLootCurrentSlots(getElementData(getLocalPlayer(), "currentCol")) + getItemSlots(l_16_0) <= getLootMaxAviableSlots(isPlayerInLoot()) then
- triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), l_16_0, isPlayerInLoot())
- playerMovedInInventory = true
- setTimer(function()
- playerMovedInInventory = false
- end, 700, 1)
- end
- else
- startRollMessage2("Inventory", "Inventory is full!", 255, 22, 0)
- return
- end
- do return end
- triggerEvent("onPlayerMoveItemOutOFInventory", getLocalPlayer(), l_16_0, isPlayerInLoot())
- playerMovedInInventory = true
- setTimer(function()
- playerMovedInInventory = false
- end, 700, 1)
- setTimer(refreshInventory, 200, 2)
- if isPlayerInLoot() then
- setTimer(refreshLoot, 200, 2, getElementData(getLocalPlayer(), "currentCol"), guiGetText(l_0_0.loot))
- end
- -- WARNING: missing end command somewhere! Added here
- end
- -- WARNING: F->nextEndif is not empty. Unhandled nextEndif->addr = 102
- end
- addEventHandler("onClientGUIClick", ({loot = guiCreateButton(0.42, 0.17, 0.04, 0.69, "->", true, inventoryWindows), inventory = guiCreateButton(0.53, 0.17, 0.04, 0.69, "<-", true, inventoryWindows)}).inventory, onPlayerMoveItemOutOfInventory)
- onPlayerMoveItemOutOFInventory = function(ERROR_nil, ERROR_nil)
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- local l_17_2 = l_17_2
- if ERROR_nil == "M1911 Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "M9 SD Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "Desert Eagle Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "PDW Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "MP5A5 Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "AK Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "M4 Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "1866 Slug" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "2Rnd. Slug" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "SPAZ-12 Pellet" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "CZ 550 Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "Lee Enfield Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "M136 Rocket" then
- do return end
- end
- if ERROR_nil == "M4" or ERROR_nil == "AK-47" or ERROR_nil == "CZ 550" or ERROR_nil == "Winchester 1866" or ERROR_nil == "SPAZ-12 Combat Shotgun" or ERROR_nil == "Sawn-Off Shotgun" or ERROR_nil == "Heat-Seeking RPG" or ERROR_nil == "M136 Rocket Launcher" or ERROR_nil == "Lee Enfield" then
- triggerServerEvent("removeBackWeaponOnDrop", getLocalPlayer())
- end
- if ERROR_nil and not getElementData(ERROR_nil, "itemloot") and getElementType(getElementData(ERROR_nil, "parent")) == "vehicle" and ERROR_nil == "Full Gas Canister" then
- if getElementData(ERROR_nil, "fuel") + 20 < getVehicleMaxFuel(ERROR_nil) then
- do return end
- end
- if getVehicleMaxFuel(ERROR_nil) + 15 < getElementData(ERROR_nil, "fuel") + 20 then
- triggerEvent("displayClientInfo", getLocalPlayer(), "Vehicle", "The tank is full!", 255, 22, 0)
- return
- else
- setElementData(ERROR_nil, "fuel", getElementData(ERROR_nil, "fuel") + addingfuel)
- setElementData(getLocalPlayer(), ERROR_nil, getElementData(getLocalPlayer(), ERROR_nil) - l_17_2)
- setElementData(getLocalPlayer(), "Empty Gas Canister", (getElementData(getLocalPlayer(), "Empty Gas Canister") or 0) + l_17_2)
- triggerEvent("displayClientInfo", getLocalPlayer(), "Vehicle", "Filled gas into vehicle!", 22, 255, 0)
- return
- end
- if (((ERROR_nil == "Tire_inVehicle" and ERROR_nil ~= "Engine_inVehicle") or ERROR_nil == "Parts_inVehicle") and getElementData(getLocalPlayer(), itemName2) or 0) / l_17_2 < 1 then
- triggerEvent("displayClientInfo", getLocalPlayer(), "Inventory", "Can't drop this!", 255, 22, 0)
- return
- end
- if not getElementData(ERROR_nil, ERROR_nil) then
- setElementData(ERROR_nil, ERROR_nil, (not ERROR_nil or 0) + 1)
- end
- if #getElementsWithinColShape(ERROR_nil, "player") > 1 then
- triggerServerEvent("onPlayerChangeLoot", getRootElement(), ERROR_nil)
- end
- if not getElementData(ERROR_nil, "itemloot") and getElementType(getElementData(ERROR_nil, "parent")) == "vehicle" then
- do return end
- end
- triggerServerEvent("playerDropAItem", getLocalPlayer(), ERROR_nil)
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if (ERROR_nil == "Tire_inVehicle" and ERROR_nil ~= "Engine_inVehicle") or ERROR_nil == "Parts_inVehicle" then
- setElementData(getLocalPlayer(), ERROR_nil, getElementData(getLocalPlayer(), ERROR_nil) - l_17_2)
- if ERROR_nil and getElementData(ERROR_nil, "itemloot") then
- triggerServerEvent("refreshItemLoot", getRootElement(), ERROR_nil, getElementData(ERROR_nil, "parent"))
- end
- -- WARNING: undefined locals caused missing assignments!
- -- WARNING: missing end command somewhere! Added here
- end
- -- WARNING: missing end command somewhere! Added here
- end
- -- WARNING: F->nextEndif is not empty. Unhandled nextEndif->addr = 140 278
- end
- addEvent("onPlayerMoveItemOutOFInventory", true)
- addEventHandler("onPlayerMoveItemOutOFInventory", getRootElement(), onPlayerMoveItemOutOFInventory)
- onPlayerMoveItemInInventory = function()
- -- upvalues: l_0_1 , l_0_0
- if isPlayerInLoot() then
- if getElementData(isPlayerInLoot(), guiGridListGetItemText(l_0_1.loot, guiGridListGetSelectedItem(l_0_1.loot), 1)) and getElementData(isPlayerInLoot(), guiGridListGetItemText(l_0_1.loot, guiGridListGetSelectedItem(l_0_1.loot), 1)) >= 1 then
- if not isToolbeltItem(guiGridListGetItemText(l_0_1.loot, guiGridListGetSelectedItem(l_0_1.loot), 1)) then
- if getPlayerCurrentSlots() + getItemSlots(guiGridListGetItemText(l_0_1.loot, guiGridListGetSelectedItem(l_0_1.loot), 1)) <= getPlayerMaxAviableSlots() then
- if not playerMovedInInventory then
- triggerEvent("onPlayerMoveItemInInventory", getLocalPlayer(), guiGridListGetItemText(l_0_1.loot, guiGridListGetSelectedItem(l_0_1.loot), 1), isPlayerInLoot())
- playerMovedInInventory = true
- setTimer(function()
- playerMovedInInventory = false
- end, 700, 1)
- end
- else
- startRollMessage2("Inventory", "Abusing exploits will result in a ban!", 255, 22, 0)
- return
- end
- else
- startRollMessage2("Inventory", "Inventory is full!", 255, 22, 0)
- return
- end
- else
- playerMovedInInventory = true
- setTimer(function()
- playerMovedInInventory = false
- end, 700, 1)
- triggerEvent("onPlayerMoveItemInInventory", getLocalPlayer(), guiGridListGetItemText(l_0_1.loot, guiGridListGetSelectedItem(l_0_1.loot), 1), isPlayerInLoot())
- end
- end
- if isPlayerInLoot() then
- setTimer(refreshInventory, 200, 2)
- setTimer(refreshLoot, 200, 2, getElementData(getLocalPlayer(), "currentCol"), guiGetText(l_0_0.loot))
- end
- end
- -- DECOMPILER ERROR: Confused about usage of registers, missing locals? Creating them
- local l_0_2 = {loot = guiCreateButton(0.42, 0.17, 0.04, 0.69, "->", true, inventoryWindows), inventory = guiCreateButton(0.53, 0.17, 0.04, 0.69, "<-", true, inventoryWindows)}
- addEventHandler("onClientGUIClick", l_0_2.loot, onPlayerMoveItemInInventory)
- onPlayerMoveItemInInventory = function(ERROR_nil, ERROR_nil)
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- local l_19_2 = l_19_2
- if ERROR_nil == "M1911 Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "M9 SD Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "Desert Eagle Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "PDW Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "MP5A5 Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "AK Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "M4 Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "1866 Slug" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "2Rnd. Slug" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "SPAZ-12 Pellet" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "CZ 550 Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "Lee Enfield Mag" then
- do return end
- end
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- if ERROR_nil == "M136 Rocket" then
- do return end
- end
- if ERROR_nil == "Assault Pack (ACU)" then
- if getElementData(getLocalPlayer(), "MAX_Slots") == 12 then
- triggerEvent(getLocalPlayer(), "displayClientInfo", getLocalPlayer(), "Inventory", "You are using this backpack already!", 255, 22, 0)
- return
- end
- if getElementData(getLocalPlayer(), "MAX_Slots") > 12 then
- triggerEvent(getLocalPlayer(), "displayClientInfo", getLocalPlayer(), "Inventory", "The currently equipped backpack has more space!", 255, 22, 0)
- return
- end
- setElementData(getLocalPlayer(), "MAX_Slots", 12)
- setElementData(ERROR_nil, ERROR_nil, getElementData(ERROR_nil, ERROR_nil) - 1)
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- elseif ERROR_nil == "Alice Pack" then
- if getElementData(getLocalPlayer(), "MAX_Slots") == 16 then
- triggerEvent(getLocalPlayer(), "displayClientInfo", getLocalPlayer(), "Inventory", "You are using this backpack already!", 255, 22, 0)
- return
- end
- if getElementData(getLocalPlayer(), "MAX_Slots") > 16 then
- triggerEvent(getLocalPlayer(), "displayClientInfo", getLocalPlayer(), "Inventory", "The currently equipped backpack has more space!", 255, 22, 0)
- return
- end
- setElementData(getLocalPlayer(), "MAX_Slots", 16)
- setElementData(ERROR_nil, ERROR_nil, getElementData(ERROR_nil, ERROR_nil) - 1)
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- elseif ERROR_nil == "Czech Backpack" then
- if getElementData(getLocalPlayer(), "MAX_Slots") == 26 then
- triggerEvent(getLocalPlayer(), "displayClientInfo", getLocalPlayer(), "Inventory", "You are using this backpack already!", 255, 22, 0)
- return
- end
- if getElementData(getLocalPlayer(), "MAX_Slots") > 26 then
- triggerEvent(getLocalPlayer(), "displayClientInfo", getLocalPlayer(), "Inventory", "The currently equipped backpack has more space!", 255, 22, 0)
- return
- end
- setElementData(getLocalPlayer(), "MAX_Slots", 26)
- setElementData(ERROR_nil, ERROR_nil, getElementData(ERROR_nil, ERROR_nil) - 1)
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- elseif ERROR_nil == "Coyote Backpack" then
- if getElementData(getLocalPlayer(), "MAX_Slots") == 36 then
- triggerEvent(getLocalPlayer(), "displayClientInfo", getLocalPlayer(), "Inventory", "You already have the best backpack!", 255, 22, 0)
- return
- end
- setElementData(getLocalPlayer(), "MAX_Slots", 36)
- setElementData(ERROR_nil, ERROR_nil, getElementData(ERROR_nil, ERROR_nil) - 1)
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- end
- if not getElementData(getLocalPlayer(), ERROR_nil) then
- setElementData(getLocalPlayer(), ERROR_nil, (not ERROR_nil or 0) + l_19_2)
- end
- if l_19_2 == 0 then
- setElementData(ERROR_nil, ERROR_nil, getElementData(ERROR_nil, ERROR_nil) - 0)
- else
- setElementData(ERROR_nil, ERROR_nil, getElementData(ERROR_nil, ERROR_nil) - 1)
- end
- if #getElementsWithinColShape(ERROR_nil, "player") > 1 then
- triggerServerEvent("onPlayerChangeLoot", getRootElement(), ERROR_nil)
- end
- if getElementData(ERROR_nil, "itemloot") then
- triggerServerEvent("refreshItemLoot", getRootElement(), ERROR_nil, getElementData(ERROR_nil, "parent"))
- end
- -- WARNING: undefined locals caused missing assignments!
- end
- addEvent("onPlayerMoveItemInInventory", true)
- addEventHandler("onPlayerMoveItemInInventory", getRootElement(), onPlayerMoveItemInInventory)
- onClientOpenInventoryStopMenu = function()
- triggerEvent("disableMenu", getLocalPlayer())
- end
- isPlayerInLoot = function()
- if getElementData(getLocalPlayer(), "loot") then
- return getElementData(getLocalPlayer(), "currentCol")
- end
- return false
- end
- onPlayerPressRightKeyInInventory = function()
- -- upvalues: l_0_1
- if isCursorShowing() and guiGetVisible(inventoryWindows) and guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1) then
- if getInventoryInfosForRightClickMenu(guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1)) == "Box of Matches" and getElementData(getLocalPlayer(), "Wood Pile") == 0 then
- return
- end
- if getInventoryInfosForRightClickMenu(guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1)) == "Bandage" and getElementData(getLocalPlayer(), "bleeding") == 0 then
- return
- end
- if getInventoryInfosForRightClickMenu(guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1)) == "Medic Kit" and getElementData(getLocalPlayer(), "blood") > 10500 then
- return
- end
- if getInventoryInfosForRightClickMenu(guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1)) == "Heat Pack" and getElementData(getLocalPlayer(), "temperature") > 35 then
- return
- end
- if getInventoryInfosForRightClickMenu(guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1)) == "Painkiller" and not getElementData(getLocalPlayer(), "pain") then
- return
- end
- if getInventoryInfosForRightClickMenu(guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1)) == "Morphine" and not getElementData(getLocalPlayer(), "brokenbone") then
- return
- end
- if getInventoryInfosForRightClickMenu(guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1)) == "Blood Bag" then
- return
- end
- showRightClickInventoryMenu(getInventoryInfosForRightClickMenu(guiGridListGetItemText(l_0_1.inventory, guiGridListGetSelectedItem(l_0_1.inventory), 1)), R5_PC89)
- end
- end
- bindKey("mouse2", "down", onPlayerPressRightKeyInInventory)
- getInventoryInfosForRightClickMenu = function(ERROR_nil)
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Primary Weapon"]) do
- if ERROR_nil == i_2[1] then
- return ERROR_nil, "Equip Primary Weapon"
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Secondary Weapon"]) do
- if ERROR_nil == i_2[1] then
- return ERROR_nil, "Equip Secondary Weapon"
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Weapons["Specially Weapon"]) do
- if ERROR_nil == i_2[1] then
- return ERROR_nil, "Equip Special Weapon"
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Ammo) do
- if ERROR_nil == i_2[1] then
- return ERROR_nil, false
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Food) do
- if ERROR_nil == i_2[1] then
- if i_2[1] == "Water Bottle" or i_2[1] == "Milk" or i_2[1] == "Soda Bottle" then
- info = "Drink"
- else
- info = "Eat"
- end
- return ERROR_nil, info
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Items) do
- if not i_2[3] then
- return ERROR_nil, ERROR_nil ~= i_2[1] or false
- end
- end
- for i_1,i_2 in ipairs(inventoryItems.Toolbelt) do
- if not i_2[3] then
- return ERROR_nil, ERROR_nil ~= i_2[1] or false
- end
- end
- end
- rightclickWindow = guiCreateStaticImage(0, 0, 0.05, 0.0215, "images/scrollmenu_1.png", true)
- l_0_0.rightclickmenu = guiCreateLabel(0, 0, 1, 1, "", true, rightclickWindow)
- guiLabelSetHorizontalAlign(l_0_0.rightclickmenu, "center")
- guiLabelSetVerticalAlign(l_0_0.rightclickmenu, "center")
- guiSetFont(l_0_0.rightclickmenu, "default-bold-small")
- guiSetVisible(rightclickWindow, false)
- showRightClickInventoryMenu = function(ERROR_nil, ERROR_nil)
- -- upvalues: l_0_0
- if ERROR_nil then
- guiSetVisible(rightclickWindow, true)
- guiSetText(l_0_0.rightclickmenu, ERROR_nil)
- guiSetPosition(rightclickWindow, getCursorPosition(), R11_PC22, true)
- guiSetSize(R11_PC22, guiLabelGetTextExtent(l_0_0.rightclickmenu), R13_PC32, false)
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- guiBringToFront(R11_PC22)
- -- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them
- setElementData(R11_PC22, "iteminfo", R13_PC32)
- end
- -- WARNING: undefined locals caused missing assignments!
- end
- hideRightClickInventoryMenu = function()
- guiSetVisible(rightclickWindow, false)
- end
- onPlayerClickOnRightClickMenu = function(ERROR_nil, ERROR_nil)
- if ERROR_nil == "left" then
- hideRightClickInventoryMenu()
- playerUseItem(getElementData(rightclickWindow, "iteminfo")[1], getElementData(rightclickWindow, "iteminfo")[2])
- end
- end
- addEventHandler("onClientGUIClick", l_0_0.rightclickmenu, onPlayerClickOnRightClickMenu, false)
- addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), weaponSwitch)
- addEventHandler("onClientPlayerVehicleEnter", getRootElement(), makeRadioStayOff)
- addEventHandler("onClientPlayerRadioSwitch", getRootElement(), makeRadioStayOff)
- -- WARNING: undefined locals caused missing assignments!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement