Jump to content

Please help


1LoL1

Recommended Posts

How i can this fix? :(

ERROR1: ERROR: Loading script failed: DayZ\inventory.lua:673: "end" expected (to close "if" at line 664) near "else"

ERROR2: ERROR: Loading script failed: DayZ\survivorSystem_client.lua:339: ")" expected near ":"

DayZ\inventory:

inventoryItems = { 
  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
    }
  }
}
local headline = {}
local gridlistItems = {}
local buttonItems = {}
inventoryWindows = guiCreateWindow(0.15, 0.28, 0.72, 0.63, "", true)
headline.loot = guiCreateLabel(0.06, 0.05, 0.34, 0.09, "GEAR", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.loot, "center")
guiSetFont(headline.loot, "default-bold-small")
headline.inventory = guiCreateLabel(0.6, 0.05, 0.34, 0.09, "INVENTORY", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.inventory, "center")
guiSetFont(headline.inventory, "default-bold-small")
gridlistItems.loot = guiCreateGridList(0.03, 0.1, 0.39, 0.83, true, inventoryWindows)
gridlistItems.loot_colum = guiGridListAddColumn(gridlistItems.loot, "Loot", 0.7)
gridlistItems.loot_colum_amount = guiGridListAddColumn(gridlistItems.loot, "", 0.2)
gridlistItems.inventory = guiCreateGridList(0.57, 0.11, 0.39, 0.83, true, inventoryWindows)
gridlistItems.inventory_colum = guiGridListAddColumn(gridlistItems.inventory, "Inventory", 0.7)
gridlistItems.inventory_colum_amount = guiGridListAddColumn(gridlistItems.inventory, "", 0.2)
buttonItems.loot = guiCreateButton(0.42, 0.17, 0.04, 0.69, "->", true, inventoryWindows)
buttonItems.inventory = guiCreateButton(0.53, 0.17, 0.04, 0.69, "<-", true, inventoryWindows)
headline.slots = guiCreateLabel(0.62, 0.94, 0.29, 0.04, "SLOTS:", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.slots, "center")
guiLabelSetVerticalAlign(headline.slots, "center")
guiSetFont(headline.slots, "default-bold-small")
headline.slots_loot = guiCreateLabel(0.07, 0.94, 0.29, 0.04, "SLOTS:", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.slots_loot, "center")
guiLabelSetVerticalAlign(headline.slots_loot, "center")
Link to comment

Try this:

inventoryItems = { 
  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
    }
  }
}
local headline = {}
local gridlistItems = {}
local buttonItems = {}
inventoryWindows = guiCreateWindow(0.15, 0.28, 0.72, 0.63, "", true)
headline.loot = guiCreateLabel(0.06, 0.05, 0.34, 0.09, "GEAR", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.loot, "center")
guiSetFont(headline.loot, "default-bold-small")
headline.inventory = guiCreateLabel(0.6, 0.05, 0.34, 0.09, "INVENTORY", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.inventory, "center")
guiSetFont(headline.inventory, "default-bold-small")
gridlistItems.loot = guiCreateGridList(0.03, 0.1, 0.39, 0.83, true, inventoryWindows)
gridlistItems.loot_colum = guiGridListAddColumn(gridlistItems.loot, "Loot", 0.7)
gridlistItems.loot_colum_amount = guiGridListAddColumn(gridlistItems.loot, "", 0.2)
gridlistItems.inventory = guiCreateGridList(0.57, 0.11, 0.39, 0.83, true, inventoryWindows)
gridlistItems.inventory_colum = guiGridListAddColumn(gridlistItems.inventory, "Inventory", 0.7)
gridlistItems.inventory_colum_amount = guiGridListAddColumn(gridlistItems.inventory, "", 0.2)
buttonItems.loot = guiCreateButton(0.42, 0.17, 0.04, 0.69, "->", true, inventoryWindows)
buttonItems.inventory = guiCreateButton(0.53, 0.17, 0.04, 0.69, "<-", true, inventoryWindows)
headline.slots = guiCreateLabel(0.62, 0.94, 0.29, 0.04, "SLOTS:", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.slots, "center")
guiLabelSetVerticalAlign(headline.slots, "center")
guiSetFont(headline.slots, "default-bold-small")
headline.slots_loot = guiCreateLabel(0.07, 0.94, 0.29, 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)
Link to comment
Try this:

inventoryItems = { 
  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
    }
  }
}
local headline = {}
local gridlistItems = {}
local buttonItems = {}
inventoryWindows = guiCreateWindow(0.15, 0.28, 0.72, 0.63, "", true)
headline.loot = guiCreateLabel(0.06, 0.05, 0.34, 0.09, "GEAR", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.loot, "center")
guiSetFont(headline.loot, "default-bold-small")
headline.inventory = guiCreateLabel(0.6, 0.05, 0.34, 0.09, "INVENTORY", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.inventory, "center")
guiSetFont(headline.inventory, "default-bold-small")
gridlistItems.loot = guiCreateGridList(0.03, 0.1, 0.39, 0.83, true, inventoryWindows)
gridlistItems.loot_colum = guiGridListAddColumn(gridlistItems.loot, "Loot", 0.7)
gridlistItems.loot_colum_amount = guiGridListAddColumn(gridlistItems.loot, "", 0.2)
gridlistItems.inventory = guiCreateGridList(0.57, 0.11, 0.39, 0.83, true, inventoryWindows)
gridlistItems.inventory_colum = guiGridListAddColumn(gridlistItems.inventory, "Inventory", 0.7)
gridlistItems.inventory_colum_amount = guiGridListAddColumn(gridlistItems.inventory, "", 0.2)
buttonItems.loot = guiCreateButton(0.42, 0.17, 0.04, 0.69, "->", true, inventoryWindows)
buttonItems.inventory = guiCreateButton(0.53, 0.17, 0.04, 0.69, "<-", true, inventoryWindows)
headline.slots = guiCreateLabel(0.62, 0.94, 0.29, 0.04, "SLOTS:", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.slots, "center")
guiLabelSetVerticalAlign(headline.slots, "center")
guiSetFont(headline.slots, "default-bold-small")
headline.slots_loot = guiCreateLabel(0.07, 0.94, 0.29, 0.04, "SLOTS:", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.slots_loot, "center")
guiLabelSetVerticalAlign(headline.slots_loot, "center")
Link to comment
Try this:

inventoryItems = { 
  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
    }
  }
}
local headline = {}
local gridlistItems = {}
local buttonItems = {}
inventoryWindows = guiCreateWindow(0.15, 0.28, 0.72, 0.63, "", true)
headline.loot = guiCreateLabel(0.06, 0.05, 0.34, 0.09, "GEAR", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.loot, "center")
guiSetFont(headline.loot, "default-bold-small")
headline.inventory = guiCreateLabel(0.6, 0.05, 0.34, 0.09, "INVENTORY", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.inventory, "center")
guiSetFont(headline.inventory, "default-bold-small")
gridlistItems.loot = guiCreateGridList(0.03, 0.1, 0.39, 0.83, true, inventoryWindows)
gridlistItems.loot_colum = guiGridListAddColumn(gridlistItems.loot, "Loot", 0.7)
gridlistItems.loot_colum_amount = guiGridListAddColumn(gridlistItems.loot, "", 0.2)
gridlistItems.inventory = guiCreateGridList(0.57, 0.11, 0.39, 0.83, true, inventoryWindows)
gridlistItems.inventory_colum = guiGridListAddColumn(gridlistItems.inventory, "Inventory", 0.7)
gridlistItems.inventory_colum_amount = guiGridListAddColumn(gridlistItems.inventory, "", 0.2)
buttonItems.loot = guiCreateButton(0.42, 0.17, 0.04, 0.69, "->", true, inventoryWindows)
buttonItems.inventory = guiCreateButton(0.53, 0.17, 0.04, 0.69, "<-", true, inventoryWindows)
headline.slots = guiCreateLabel(0.62, 0.94, 0.29, 0.04, "SLOTS:", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.slots, "center")
guiLabelSetVerticalAlign(headline.slots, "center")
guiSetFont(headline.slots, "default-bold-small")
headline.slots_loot = guiCreateLabel(0.07, 0.94, 0.29, 0.04, "SLOTS:", true, inventoryWindows)
Link to comment
Try this:

inventoryItems = { 
  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
    }
  }
}
local headline = {}
local gridlistItems = {}
local buttonItems = {}
inventoryWindows = guiCreateWindow(0.15, 0.28, 0.72, 0.63, "", true)
headline.loot = guiCreateLabel(0.06, 0.05, 0.34, 0.09, "GEAR", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.loot, "center")
guiSetFont(headline.loot, "default-bold-small")
headline.inventory = guiCreateLabel(0.6, 0.05, 0.34, 0.09, "INVENTORY", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.inventory, "center")
guiSetFont(headline.inventory, "default-bold-small")
gridlistItems.loot = guiCreateGridList(0.03, 0.1, 0.39, 0.83, true, inventoryWindows)
gridlistItems.loot_colum = guiGridListAddColumn(gridlistItems.loot, "Loot", 0.7)
gridlistItems.loot_colum_amount = guiGridListAddColumn(gridlistItems.loot, "", 0.2)
gridlistItems.inventory = guiCreateGridList(0.57, 0.11, 0.39, 0.83, true, inventoryWindows)
gridlistItems.inventory_colum = guiGridListAddColumn(gridlistItems.inventory, "Inventory", 0.7)
gridlistItems.inventory_colum_amount = guiGridListAddColumn(gridlistItems.inventory, "", 0.2)
buttonItems.loot = guiCreateButton(0.42, 0.17, 0.04, 0.69, "->", true, inventoryWindows)
buttonItems.inventory = guiCreateButton(0.53, 0.17, 0.04, 0.69, "<-", true, inventoryWindows)
headline.slots = guiCreateLabel(0.62, 0.94, 0.29, 0.04, "SLOTS:", true, inventoryWindows)
guiLabelSetHorizontalAlign(headline.slots, "center")
guiLabelSetVerticalAlign(headline.slots, "center")
Link to comment

Try:

  
 
addEventHandler("onClientResourceStart", getResourceRootElement(), function()
  dayzVersion = "MTA:DayZ a0.6 r193"
  versionLabel = guiCreateLabel(1, 1, 0.3, 0.3, dayzVersion, true)
  guiSetSize(versionLabel, guiLabelGetTextExtent(versionLabel), guiLabelGetFontHeight(versionLabel), false)
  x, y = guiGetSize(versionLabel, true)
  guiSetPosition(versionLabel, 1 - x, 1 - y * 1.8, true)
  guiSetAlpha(versionLabel, 0.5)
end)
snipertxd = engineLoadTXD("mods/sniper.txd")
engineImportTXD(snipertxd, 285)
sniperdff = engineLoadDFF("mods/sniper.dff", 285)
engineReplaceModel(sniperdff, 285)
snipertxd = engineLoadTXD("mods/civilian.txd")
engineImportTXD(snipertxd, 179)
sniperdff = engineLoadDFF("mods/civilian.dff", 179)
engineReplaceModel(sniperdff, 179)
snipertxd = engineLoadTXD("mods/bandit3.txd")
engineImportTXD(snipertxd, 180)
sniperdff = engineLoadDFF("mods/bandit3.dff", 180)
engineReplaceModel(sniperdff, 180)
snipertxd = engineLoadTXD("mods/bandit2.txd")
engineImportTXD(snipertxd, 288)
sniperdff = engineLoadDFF("mods/bandit2.dff", 288)
engineReplaceModel(sniperdff, 288)
snipertxd = engineLoadTXD("mods/standart.txd")
engineImportTXD(snipertxd, 73)
sniperdff = engineLoadDFF("mods/standart.dff", 73)
engineReplaceModel(sniperdff, 73)
snipertxd = engineLoadTXD("mods/femalestandard.txd")
engineImportTXD(snipertxd, 191)
sniperdff = engineLoadDFF("mods/femalestandard.dff", 191)
engineReplaceModel(sniperdff, 191)
snipertxd = engineLoadTXD("mods/hero.txd")
engineImportTXD(snipertxd, 210)
sniperdff = engineLoadDFF("mods/hero.dff", 210)
engineReplaceModel(sniperdff, 210)
itemTXD = engineLoadTXD("items/army_clothes.txd")
engineImportTXD(itemTXD, 1247)
itemDFF = engineLoadDFF("items/army_clothes.dff", 1247)
engineReplaceModel(itemDFF, 1247)
itemTXD = engineLoadTXD("items/sniper_clothes.txd")
engineImportTXD(itemTXD, 1213)
itemDFF = engineLoadDFF("items/sniper_clothes.dff", 1213)
engineReplaceModel(itemDFF, 1213)
itemTXD = engineLoadTXD("items/civilian_clothes.txd")
engineImportTXD(itemTXD, 1241)
itemDFF = engineLoadDFF("items/civilian_clothes.dff", 1241)
engineReplaceModel(itemDFF, 1241)
itemTXD = engineLoadTXD("items/standard_clothes.txd")
engineImportTXD(itemTXD, 1577)
itemDFF = engineLoadDFF("items/standard_clothes.dff", 1577)
engineReplaceModel(itemDFF, 1577)
itemTXD = engineLoadTXD("items/beans_can.txd")
engineImportTXD(itemTXD, 2601)
itemDFF = engineLoadDFF("items/beans_can.dff", 2601)
engineReplaceModel(itemDFF, 2601)
itemTXD = engineLoadTXD("items/first_aid_kit.txd")
engineImportTXD(itemTXD, 2891)
itemDFF = engineLoadDFF("items/first_aid_kit.dff", 2891)
engineReplaceModel(itemDFF, 2891)
itemTXD = engineLoadTXD("items/heat_pack.txd")
engineImportTXD(itemTXD, 1576)
itemDFF = engineLoadDFF("items/heat_pack.dff", 1576)
engineReplaceModel(itemDFF, 1576)
itemTXD = engineLoadTXD("items/pain_killers.txd")
engineImportTXD(itemTXD, 2709)
itemDFF = engineLoadDFF("items/pain_killers.dff", 2709)
engineReplaceModel(itemDFF, 2709)
itemTXD = engineLoadTXD("items/pasta_can.txd")
engineImportTXD(itemTXD, 2770)
itemDFF = engineLoadDFF("items/pasta_can.dff", 2770)
engineReplaceModel(itemDFF, 2770)
itemTXD = engineLoadTXD("items/pistol_ammo.txd")
engineImportTXD(itemTXD, 3013)
itemDFF = engineLoadDFF("items/pistol_ammo.dff", 3013)
engineReplaceModel(itemDFF, 3013)
itemTXD = engineLoadTXD("items/shotgun_ammo.txd")
engineImportTXD(itemTXD, 2358)
itemDFF = engineLoadDFF("items/shotgun_ammo.dff", 2358)
engineReplaceModel(itemDFF, 2358)
itemTXD = engineLoadTXD("items/backpack_small.txd")
engineImportTXD(itemTXD, 3026)
itemDFF = engineLoadDFF("items/backpack_small.dff", 3026)
engineReplaceModel(itemDFF, 3026)
itemTXD = engineLoadTXD("items/smg_ammo.txd")
engineImportTXD(itemTXD, 2041)
itemDFF = engineLoadDFF("items/smg_ammo.dff", 2041)
engineReplaceModel(itemDFF, 2041)
itemTXD = engineLoadTXD("items/sniper_ammo.txd")
engineImportTXD(itemTXD, 2358)
itemDFF = engineLoadDFF("items/sniper_ammo.dff", 2358)
engineReplaceModel(itemDFF, 2358)
itemTXD = engineLoadTXD("items/soda_can.txd")
engineImportTXD(itemTXD, 2647)
itemDFF = engineLoadDFF("items/soda_can.dff", 2647)
engineReplaceModel(itemDFF, 2647)
itemTXD = engineLoadTXD("items/water_bottle.txd")
engineImportTXD(itemTXD, 2683)
itemDFF = engineLoadDFF("items/water_bottle.dff", 2683)
engineReplaceModel(itemDFF, 2683)
itemTXD = engineLoadTXD("items/assault_ammo.txd")
engineImportTXD(itemTXD, 1271)
itemDFF = engineLoadDFF("items/assault_ammo.dff", 1271)
engineReplaceModel(itemDFF, 1271)
itemTXD = engineLoadTXD("items/backpack_alice.txd")
engineImportTXD(itemTXD, 1248)
itemDFF = engineLoadDFF("items/backpack_alice.dff", 1248)
engineReplaceModel(itemDFF, 1248)
itemTXD = engineLoadTXD("items/backpack_coyote.txd")
engineImportTXD(itemTXD, 1252)
itemDFF = engineLoadDFF("items/backpack_coyote.dff", 1252)
engineReplaceModel(itemDFF, 1252)
itemTXD = engineLoadTXD("items/backpack_czech.txd")
engineImportTXD(itemTXD, 1575)
itemDFF = engineLoadDFF("items/backpack_czech.dff", 1575)
engineReplaceModel(itemDFF, 1575)
itemTXD = engineLoadTXD("items/tent.txd")
engineImportTXD(itemTXD, 3243)
itemDFF = engineLoadDFF("items/tent.dff", 3243)
engineReplaceModel(itemDFF, 3243)
itemTXD = engineLoadTXD("items/wirefence.txd")
engineImportTXD(itemTXD, 983)
itemDFF = engineLoadDFF("items/wirefence.dff", 983)
engineReplaceModel(itemDFF, 983)
weaponTXD = engineLoadTXD("items/camera.txd")
engineImportTXD(weaponTXD, 367)
weaponDFF = engineLoadDFF("items/camera.dff", 367)
engineReplaceModel(weaponDFF, 367)
weaponTXD = engineLoadTXD("items/katana.txd")
engineImportTXD(weaponTXD, 339)
weaponDFF = engineLoadDFF("items/katana.dff", 339)
engineReplaceModel(weaponDFF, 339)
function playerStatsClientSite()
  if getElementData(getLocalPlayer(), "logedin") then
    toggleControl("radar", false)
    showPlayerHudComponent("clock", false)
    showPlayerHudComponent("radar", false)
    showPlayerHudComponent("money", false)
    showPlayerHudComponent("health", false)
    showPlayerHudComponent("breath", false)
    if getElementData(getLocalPlayer(), "Map") >= 1 then
      toggleControl("radar", true)
    end
    if 1 <= getElementData(getLocalPlayer(), "GPS") then
      showPlayerHudComponent("radar", true)
    end
    if 1 <= getElementData(getLocalPlayer(), "Watch") then
      showPlayerHudComponent("clock", true)
    end
  end
end
setTimer(playerStatsClientSite, 1000, 0)
function playerZoom(key, keyState)
  if key == "n" then
    if getElementData(getLocalPlayer(), "Night Vision Goggles") > 0 then
      if nightvision then
        nightvision = false
        setCameraGoggleEffect("normal")
        do
          local hour, minutes = getTime()
          if gameplayVariables.enablenight then
            setClientNight(hour, minutes)
          end
        end
      else
        nightvision = true
        setCameraGoggleEffect("nightvision")
        setFarClipDistance(1000)
      end
    end
  elseif key == "i" and 0 < getElementData(getLocalPlayer(), "Infrared Goggles") then
    if infaredvision then
      infaredvision = false
      setCameraGoggleEffect("normal")
      if gameplayVariables.enablenight then
        setClientNight(hour, minutes)
      end
    else
      infaredvision = true
      setCameraGoggleEffect("thermalvision")
      if gameplayVariables.enablenight then
        setClientNight(hour, minutes)
      end
    end
  end
end
bindKey("n", "down", playerZoom)
bindKey("i", "up", playerZoom)
function setClientNight(hour, minutes)
  if hour == 21 then
    setSkyGradient(0, 100 / minutes, 196 / minutes, 136 / minutes, 170 / minutes, 212 / minutes)
    setFarClipDistance(120 + (880 - minutes * 14.6))
    setFogDistance(-150 + (250 - minutes * 4.16))
  elseif hour == 7 then
    setSkyGradient(0, 1.6 * minutes, 638.9599999999999, 307.35999999999996, 481.1, 748.36)
    setFarClipDistance(120 + minutes * 14.6)
    setFogDistance(-150 + minutes * 4.16)
  elseif hour == 22 or hour == 23 then
    setSkyGradient(0, 0, 0, 0, 0, 0)
    setFarClipDistance(120)
    setFogDistance(-150)
  elseif hour >= 0 and hour <= 7 then
    setSkyGradient(0, 0, 0, 0, 0, 0)
    setFarClipDistance(120)
    setFogDistance(-150)
  else
    setSkyGradient(0, 100, 196, 136, 170, 212)
    setFarClipDistance(1000)
    setFogDistance(100)
  end
end
function getGroundMaterial(x, y, z)
  local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z, x, y, z - 10, true, false, false, true, false, false, false, false, nil)
  return material
end
function isInBuilding(x, y, z)
  local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z, x, y, z + 10, true, false, false, true, false, false, false, false, nil)
  if hit then
    return true
  end
  return false
end
function isObjectAroundPlayer2(thePlayer, distance, height)
  material_value = 0
  local x, y, z = getElementPosition(thePlayer)
  for i = math.random(0, 360), 360 do
    local nx, ny = getPointFromDistanceRotation(x, y, distance, i)
    local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z + height, nx, ny, z + height, true, false, false, false, false, false, false, false)
    if material == 0 then
      material_value = material_value + 1
    end
    if material_value > 40 then
      return 0, hitX, hitY, hitZ
    end
  end
  return false
end
function isObjectAroundPlayer(thePlayer, distance, height)
  local x, y, z = getElementPosition(thePlayer)
  for i = math.random(0, 360), 360 do
    local nx, ny = getPointFromDistanceRotation(x, y, distance, i)
    local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z + height, nx, ny, z + height)
    if material == 0 then
      return material, hitX, hitY, hitZ
    end
  end
  return false
Link to comment
  
addEventHandler("onClientResourceStart", getResourceRootElement(), function()
  dayzVersion = "MTA:DayZ a0.6 r193"
  versionLabel = guiCreateLabel(1, 1, 0.3, 0.3, dayzVersion, true)
  guiSetSize(versionLabel, guiLabelGetTextExtent(versionLabel), guiLabelGetFontHeight(versionLabel), false)
  x, y = guiGetSize(versionLabel, true)
  guiSetPosition(versionLabel, 1 - x, 1 - y * 1.8, true)
  guiSetAlpha(versionLabel, 0.5)
end)
snipertxd = engineLoadTXD("mods/sniper.txd")
engineImportTXD(snipertxd, 285)
sniperdff = engineLoadDFF("mods/sniper.dff", 285)
engineReplaceModel(sniperdff, 285)
snipertxd = engineLoadTXD("mods/civilian.txd")
engineImportTXD(snipertxd, 179)
sniperdff = engineLoadDFF("mods/civilian.dff", 179)
engineReplaceModel(sniperdff, 179)
snipertxd = engineLoadTXD("mods/bandit3.txd")
engineImportTXD(snipertxd, 180)
sniperdff = engineLoadDFF("mods/bandit3.dff", 180)
engineReplaceModel(sniperdff, 180)
snipertxd = engineLoadTXD("mods/bandit2.txd")
engineImportTXD(snipertxd, 288)
sniperdff = engineLoadDFF("mods/bandit2.dff", 288)
engineReplaceModel(sniperdff, 288)
snipertxd = engineLoadTXD("mods/standart.txd")
engineImportTXD(snipertxd, 73)
sniperdff = engineLoadDFF("mods/standart.dff", 73)
engineReplaceModel(sniperdff, 73)
snipertxd = engineLoadTXD("mods/femalestandard.txd")
engineImportTXD(snipertxd, 191)
sniperdff = engineLoadDFF("mods/femalestandard.dff", 191)
engineReplaceModel(sniperdff, 191)
snipertxd = engineLoadTXD("mods/hero.txd")
engineImportTXD(snipertxd, 210)
sniperdff = engineLoadDFF("mods/hero.dff", 210)
engineReplaceModel(sniperdff, 210)
itemTXD = engineLoadTXD("items/army_clothes.txd")
engineImportTXD(itemTXD, 1247)
itemDFF = engineLoadDFF("items/army_clothes.dff", 1247)
engineReplaceModel(itemDFF, 1247)
itemTXD = engineLoadTXD("items/sniper_clothes.txd")
engineImportTXD(itemTXD, 1213)
itemDFF = engineLoadDFF("items/sniper_clothes.dff", 1213)
engineReplaceModel(itemDFF, 1213)
itemTXD = engineLoadTXD("items/civilian_clothes.txd")
engineImportTXD(itemTXD, 1241)
itemDFF = engineLoadDFF("items/civilian_clothes.dff", 1241)
engineReplaceModel(itemDFF, 1241)
itemTXD = engineLoadTXD("items/standard_clothes.txd")
engineImportTXD(itemTXD, 1577)
itemDFF = engineLoadDFF("items/standard_clothes.dff", 1577)
engineReplaceModel(itemDFF, 1577)
itemTXD = engineLoadTXD("items/beans_can.txd")
engineImportTXD(itemTXD, 2601)
itemDFF = engineLoadDFF("items/beans_can.dff", 2601)
engineReplaceModel(itemDFF, 2601)
itemTXD = engineLoadTXD("items/first_aid_kit.txd")
engineImportTXD(itemTXD, 2891)
itemDFF = engineLoadDFF("items/first_aid_kit.dff", 2891)
engineReplaceModel(itemDFF, 2891)
itemTXD = engineLoadTXD("items/heat_pack.txd")
engineImportTXD(itemTXD, 1576)
itemDFF = engineLoadDFF("items/heat_pack.dff", 1576)
engineReplaceModel(itemDFF, 1576)
itemTXD = engineLoadTXD("items/pain_killers.txd")
engineImportTXD(itemTXD, 2709)
itemDFF = engineLoadDFF("items/pain_killers.dff", 2709)
engineReplaceModel(itemDFF, 2709)
itemTXD = engineLoadTXD("items/pasta_can.txd")
engineImportTXD(itemTXD, 2770)
itemDFF = engineLoadDFF("items/pasta_can.dff", 2770)
engineReplaceModel(itemDFF, 2770)
itemTXD = engineLoadTXD("items/pistol_ammo.txd")
engineImportTXD(itemTXD, 3013)
itemDFF = engineLoadDFF("items/pistol_ammo.dff", 3013)
engineReplaceModel(itemDFF, 3013)
itemTXD = engineLoadTXD("items/shotgun_ammo.txd")
engineImportTXD(itemTXD, 2358)
itemDFF = engineLoadDFF("items/shotgun_ammo.dff", 2358)
engineReplaceModel(itemDFF, 2358)
itemTXD = engineLoadTXD("items/backpack_small.txd")
engineImportTXD(itemTXD, 3026)
itemDFF = engineLoadDFF("items/backpack_small.dff", 3026)
engineReplaceModel(itemDFF, 3026)
itemTXD = engineLoadTXD("items/smg_ammo.txd")
engineImportTXD(itemTXD, 2041)
itemDFF = engineLoadDFF("items/smg_ammo.dff", 2041)
engineReplaceModel(itemDFF, 2041)
itemTXD = engineLoadTXD("items/sniper_ammo.txd")
engineImportTXD(itemTXD, 2358)
itemDFF = engineLoadDFF("items/sniper_ammo.dff", 2358)
engineReplaceModel(itemDFF, 2358)
itemTXD = engineLoadTXD("items/soda_can.txd")
engineImportTXD(itemTXD, 2647)
itemDFF = engineLoadDFF("items/soda_can.dff", 2647)
engineReplaceModel(itemDFF, 2647)
itemTXD = engineLoadTXD("items/water_bottle.txd")
engineImportTXD(itemTXD, 2683)
itemDFF = engineLoadDFF("items/water_bottle.dff", 2683)
engineReplaceModel(itemDFF, 2683)
itemTXD = engineLoadTXD("items/assault_ammo.txd")
engineImportTXD(itemTXD, 1271)
itemDFF = engineLoadDFF("items/assault_ammo.dff", 1271)
engineReplaceModel(itemDFF, 1271)
itemTXD = engineLoadTXD("items/backpack_alice.txd")
engineImportTXD(itemTXD, 1248)
itemDFF = engineLoadDFF("items/backpack_alice.dff", 1248)
engineReplaceModel(itemDFF, 1248)
itemTXD = engineLoadTXD("items/backpack_coyote.txd")
engineImportTXD(itemTXD, 1252)
itemDFF = engineLoadDFF("items/backpack_coyote.dff", 1252)
engineReplaceModel(itemDFF, 1252)
itemTXD = engineLoadTXD("items/backpack_czech.txd")
engineImportTXD(itemTXD, 1575)
itemDFF = engineLoadDFF("items/backpack_czech.dff", 1575)
engineReplaceModel(itemDFF, 1575)
itemTXD = engineLoadTXD("items/tent.txd")
engineImportTXD(itemTXD, 3243)
itemDFF = engineLoadDFF("items/tent.dff", 3243)
engineReplaceModel(itemDFF, 3243)
itemTXD = engineLoadTXD("items/wirefence.txd")
engineImportTXD(itemTXD, 983)
itemDFF = engineLoadDFF("items/wirefence.dff", 983)
engineReplaceModel(itemDFF, 983)
weaponTXD = engineLoadTXD("items/camera.txd")
engineImportTXD(weaponTXD, 367)
weaponDFF = engineLoadDFF("items/camera.dff", 367)
engineReplaceModel(weaponDFF, 367)
weaponTXD = engineLoadTXD("items/katana.txd")
engineImportTXD(weaponTXD, 339)
weaponDFF = engineLoadDFF("items/katana.dff", 339)
engineReplaceModel(weaponDFF, 339)
function playerStatsClientSite()
  if getElementData(getLocalPlayer(), "logedin") then
    toggleControl("radar", false)
    showPlayerHudComponent("clock", false)
    showPlayerHudComponent("radar", false)
    showPlayerHudComponent("money", false)
    showPlayerHudComponent("health", false)
    showPlayerHudComponent("breath", false)
    if getElementData(getLocalPlayer(), "Map") >= 1 then
      toggleControl("radar", true)
    end
    if 1 <= getElementData(getLocalPlayer(), "GPS") then
      showPlayerHudComponent("radar", true)
    end
    if 1 <= getElementData(getLocalPlayer(), "Watch") then
      showPlayerHudComponent("clock", true)
    end
  end
end
setTimer(playerStatsClientSite, 1000, 0)
function playerZoom(key, keyState)
  if key == "n" then
    if getElementData(getLocalPlayer(), "Night Vision Goggles") > 0 then
      if nightvision then
        nightvision = false
        setCameraGoggleEffect("normal")
        do
          local hour, minutes = getTime()
          if gameplayVariables.enablenight then
            setClientNight(hour, minutes)
          end
        end
      else
        nightvision = true
        setCameraGoggleEffect("nightvision")
        setFarClipDistance(1000)
      end
    end
  elseif key == "i" and 0 < getElementData(getLocalPlayer(), "Infrared Goggles") then
    if infaredvision then
      infaredvision = false
      setCameraGoggleEffect("normal")
      if gameplayVariables.enablenight then
        setClientNight(hour, minutes)
      end
    else
      infaredvision = true
      setCameraGoggleEffect("thermalvision")
      if gameplayVariables.enablenight then
        setClientNight(hour, minutes)
      end
    end
  end
end
bindKey("n", "down", playerZoom)
bindKey("i", "up", playerZoom)
function setClientNight(hour, minutes)
  if hour == 21 then
    setSkyGradient(0, 100 / minutes, 196 / minutes, 136 / minutes, 170 / minutes, 212 / minutes)
    setFarClipDistance(120 + (880 - minutes * 14.6))
    setFogDistance(-150 + (250 - minutes * 4.16))
  elseif hour == 7 then
    setSkyGradient(0, 1.6 * minutes, 638.9599999999999, 307.35999999999996, 481.1, 748.36)
    setFarClipDistance(120 + minutes * 14.6)
    setFogDistance(-150 + minutes * 4.16)
  elseif hour == 22 or hour == 23 then
    setSkyGradient(0, 0, 0, 0, 0, 0)
    setFarClipDistance(120)
    setFogDistance(-150)
  elseif hour >= 0 and hour <= 7 then
    setSkyGradient(0, 0, 0, 0, 0, 0)
    setFarClipDistance(120)
    setFogDistance(-150)
  else
    setSkyGradient(0, 100, 196, 136, 170, 212)
    setFarClipDistance(1000)
    setFogDistance(100)
  end
end
function getGroundMaterial(x, y, z)
  local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z, x, y, z - 10, true, false, false, true, false, false, false, false, nil)
  return material
end
function isInBuilding(x, y, z)
  local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z, x, y, z + 10, true, false, false, true, false, false, false, false, nil)
  if hit then
    return true
  end
  return false
end
function isObjectAroundPlayer2(thePlayer, distance, height)
  material_value = 0
  local x, y, z = getElementPosition(thePlayer)
  for i = math.random(0, 360), 360 do
    local nx, ny = getPointFromDistanceRotation(x, y, distance, i)
    local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z + height, nx, ny, z + height, true, false, false, false, false, false, false, false)
    if material == 0 then
      material_value = material_value + 1
    end
    if material_value > 40 then
      return 0, hitX, hitY, hitZ
    end
  end
  return false
end
function isObjectAroundPlayer(thePlayer, distance, height)
  local x, y, z = getElementPosition(thePlayer)
  for i = math.random(0, 360), 360 do
    local nx, ny = getPointFromDistanceRotation(x, y, distance, i)
    local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z + height, nx, ny, z + height)
    if material == 0 then
      return material, hitX, hitY, hitZ
    end
  end
  return false
end
function getPointFromDistanceRotation(x, y, dist, angle)
 
Link to comment
  
addEventHandler("onClientResourceStart", getResourceRootElement(), function()
  dayzVersion = "MTA:DayZ a0.6 r193"
  versionLabel = guiCreateLabel(1, 1, 0.3, 0.3, dayzVersion, true)
  guiSetSize(versionLabel, guiLabelGetTextExtent(versionLabel), guiLabelGetFontHeight(versionLabel), false)
  x, y = guiGetSize(versionLabel, true)
  guiSetPosition(versionLabel, 1 - x, 1 - y * 1.8, true)
  guiSetAlpha(versionLabel, 0.5)
end)
snipertxd = engineLoadTXD("mods/sniper.txd")
engineImportTXD(snipertxd, 285)
sniperdff = engineLoadDFF("mods/sniper.dff", 285)
engineReplaceModel(sniperdff, 285)
snipertxd = engineLoadTXD("mods/civilian.txd")
engineImportTXD(snipertxd, 179)
sniperdff = engineLoadDFF("mods/civilian.dff", 179)
engineReplaceModel(sniperdff, 179)
snipertxd = engineLoadTXD("mods/bandit3.txd")
engineImportTXD(snipertxd, 180)
sniperdff = engineLoadDFF("mods/bandit3.dff", 180)
engineReplaceModel(sniperdff, 180)
snipertxd = engineLoadTXD("mods/bandit2.txd")
engineImportTXD(snipertxd, 288)
sniperdff = engineLoadDFF("mods/bandit2.dff", 288)
engineReplaceModel(sniperdff, 288)
snipertxd = engineLoadTXD("mods/standart.txd")
engineImportTXD(snipertxd, 73)
sniperdff = engineLoadDFF("mods/standart.dff", 73)
engineReplaceModel(sniperdff, 73)
snipertxd = engineLoadTXD("mods/femalestandard.txd")
engineImportTXD(snipertxd, 191)
sniperdff = engineLoadDFF("mods/femalestandard.dff", 191)
engineReplaceModel(sniperdff, 191)
snipertxd = engineLoadTXD("mods/hero.txd")
engineImportTXD(snipertxd, 210)
sniperdff = engineLoadDFF("mods/hero.dff", 210)
engineReplaceModel(sniperdff, 210)
itemTXD = engineLoadTXD("items/army_clothes.txd")
engineImportTXD(itemTXD, 1247)
itemDFF = engineLoadDFF("items/army_clothes.dff", 1247)
engineReplaceModel(itemDFF, 1247)
itemTXD = engineLoadTXD("items/sniper_clothes.txd")
engineImportTXD(itemTXD, 1213)
itemDFF = engineLoadDFF("items/sniper_clothes.dff", 1213)
engineReplaceModel(itemDFF, 1213)
itemTXD = engineLoadTXD("items/civilian_clothes.txd")
engineImportTXD(itemTXD, 1241)
itemDFF = engineLoadDFF("items/civilian_clothes.dff", 1241)
engineReplaceModel(itemDFF, 1241)
itemTXD = engineLoadTXD("items/standard_clothes.txd")
engineImportTXD(itemTXD, 1577)
itemDFF = engineLoadDFF("items/standard_clothes.dff", 1577)
engineReplaceModel(itemDFF, 1577)
itemTXD = engineLoadTXD("items/beans_can.txd")
engineImportTXD(itemTXD, 2601)
itemDFF = engineLoadDFF("items/beans_can.dff", 2601)
engineReplaceModel(itemDFF, 2601)
itemTXD = engineLoadTXD("items/first_aid_kit.txd")
engineImportTXD(itemTXD, 2891)
itemDFF = engineLoadDFF("items/first_aid_kit.dff", 2891)
engineReplaceModel(itemDFF, 2891)
itemTXD = engineLoadTXD("items/heat_pack.txd")
engineImportTXD(itemTXD, 1576)
itemDFF = engineLoadDFF("items/heat_pack.dff", 1576)
engineReplaceModel(itemDFF, 1576)
itemTXD = engineLoadTXD("items/pain_killers.txd")
engineImportTXD(itemTXD, 2709)
itemDFF = engineLoadDFF("items/pain_killers.dff", 2709)
engineReplaceModel(itemDFF, 2709)
itemTXD = engineLoadTXD("items/pasta_can.txd")
engineImportTXD(itemTXD, 2770)
itemDFF = engineLoadDFF("items/pasta_can.dff", 2770)
engineReplaceModel(itemDFF, 2770)
itemTXD = engineLoadTXD("items/pistol_ammo.txd")
engineImportTXD(itemTXD, 3013)
itemDFF = engineLoadDFF("items/pistol_ammo.dff", 3013)
engineReplaceModel(itemDFF, 3013)
itemTXD = engineLoadTXD("items/shotgun_ammo.txd")
engineImportTXD(itemTXD, 2358)
itemDFF = engineLoadDFF("items/shotgun_ammo.dff", 2358)
engineReplaceModel(itemDFF, 2358)
itemTXD = engineLoadTXD("items/backpack_small.txd")
engineImportTXD(itemTXD, 3026)
itemDFF = engineLoadDFF("items/backpack_small.dff", 3026)
engineReplaceModel(itemDFF, 3026)
itemTXD = engineLoadTXD("items/smg_ammo.txd")
engineImportTXD(itemTXD, 2041)
itemDFF = engineLoadDFF("items/smg_ammo.dff", 2041)
engineReplaceModel(itemDFF, 2041)
itemTXD = engineLoadTXD("items/sniper_ammo.txd")
engineImportTXD(itemTXD, 2358)
itemDFF = engineLoadDFF("items/sniper_ammo.dff", 2358)
engineReplaceModel(itemDFF, 2358)
itemTXD = engineLoadTXD("items/soda_can.txd")
engineImportTXD(itemTXD, 2647)
itemDFF = engineLoadDFF("items/soda_can.dff", 2647)
engineReplaceModel(itemDFF, 2647)
itemTXD = engineLoadTXD("items/water_bottle.txd")
engineImportTXD(itemTXD, 2683)
itemDFF = engineLoadDFF("items/water_bottle.dff", 2683)
engineReplaceModel(itemDFF, 2683)
itemTXD = engineLoadTXD("items/assault_ammo.txd")
engineImportTXD(itemTXD, 1271)
itemDFF = engineLoadDFF("items/assault_ammo.dff", 1271)
engineReplaceModel(itemDFF, 1271)
itemTXD = engineLoadTXD("items/backpack_alice.txd")
engineImportTXD(itemTXD, 1248)
itemDFF = engineLoadDFF("items/backpack_alice.dff", 1248)
engineReplaceModel(itemDFF, 1248)
itemTXD = engineLoadTXD("items/backpack_coyote.txd")
engineImportTXD(itemTXD, 1252)
itemDFF = engineLoadDFF("items/backpack_coyote.dff", 1252)
engineReplaceModel(itemDFF, 1252)
itemTXD = engineLoadTXD("items/backpack_czech.txd")
engineImportTXD(itemTXD, 1575)
itemDFF = engineLoadDFF("items/backpack_czech.dff", 1575)
engineReplaceModel(itemDFF, 1575)
itemTXD = engineLoadTXD("items/tent.txd")
engineImportTXD(itemTXD, 3243)
itemDFF = engineLoadDFF("items/tent.dff", 3243)
engineReplaceModel(itemDFF, 3243)
itemTXD = engineLoadTXD("items/wirefence.txd")
engineImportTXD(itemTXD, 983)
itemDFF = engineLoadDFF("items/wirefence.dff", 983)
engineReplaceModel(itemDFF, 983)
weaponTXD = engineLoadTXD("items/camera.txd")
engineImportTXD(weaponTXD, 367)
weaponDFF = engineLoadDFF("items/camera.dff", 367)
engineReplaceModel(weaponDFF, 367)
weaponTXD = engineLoadTXD("items/katana.txd")
engineImportTXD(weaponTXD, 339)
weaponDFF = engineLoadDFF("items/katana.dff", 339)
engineReplaceModel(weaponDFF, 339)
function playerStatsClientSite()
  if getElementData(getLocalPlayer(), "logedin") then
    toggleControl("radar", false)
    showPlayerHudComponent("clock", false)
    showPlayerHudComponent("radar", false)
    showPlayerHudComponent("money", false)
    showPlayerHudComponent("health", false)
    showPlayerHudComponent("breath", false)
    if getElementData(getLocalPlayer(), "Map") >= 1 then
      toggleControl("radar", true)
    end
    if 1 <= getElementData(getLocalPlayer(), "GPS") then
      showPlayerHudComponent("radar", true)
    end
    if 1 <= getElementData(getLocalPlayer(), "Watch") then
      showPlayerHudComponent("clock", true)
    end
  end
end
setTimer(playerStatsClientSite, 1000, 0)
function playerZoom(key, keyState)
  if key == "n" then
    if getElementData(getLocalPlayer(), "Night Vision Goggles") > 0 then
      if nightvision then
        nightvision = false
        setCameraGoggleEffect("normal")
        do
          local hour, minutes = getTime()
          if gameplayVariables.enablenight then
            setClientNight(hour, minutes)
          end
        end
      else
        nightvision = true
        setCameraGoggleEffect("nightvision")
        setFarClipDistance(1000)
      end
    end
  elseif key == "i" and 0 < getElementData(getLocalPlayer(), "Infrared Goggles") then
    if infaredvision then
      infaredvision = false
      setCameraGoggleEffect("normal")
      if gameplayVariables.enablenight then
        setClientNight(hour, minutes)
      end
    else
      infaredvision = true
      setCameraGoggleEffect("thermalvision")
      if gameplayVariables.enablenight then
        setClientNight(hour, minutes)
      end
    end
  end
end
bindKey("n", "down", playerZoom)
bindKey("i", "up", playerZoom)
function setClientNight(hour, minutes)
  if hour == 21 then
    setSkyGradient(0, 100 / minutes, 196 / minutes, 136 / minutes, 170 / minutes, 212 / minutes)
    setFarClipDistance(120 + (880 - minutes * 14.6))
    setFogDistance(-150 + (250 - minutes * 4.16))
  elseif hour == 7 then
    setSkyGradient(0, 1.6 * minutes, 638.9599999999999, 307.35999999999996, 481.1, 748.36)
    setFarClipDistance(120 + minutes * 14.6)
    setFogDistance(-150 + minutes * 4.16)
  elseif hour == 22 or hour == 23 then
    setSkyGradient(0, 0, 0, 0, 0, 0)
    setFarClipDistance(120)
    setFogDistance(-150)
  elseif hour >= 0 and hour <= 7 then
    setSkyGradient(0, 0, 0, 0, 0, 0)
    setFarClipDistance(120)
    setFogDistance(-150)
  else
    setSkyGradient(0, 100, 196, 136, 170, 212)
    setFarClipDistance(1000)
    setFogDistance(100)
  end
end
function getGroundMaterial(x, y, z)
  local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z, x, y, z - 10, true, false, false, true, false, false, false, false, nil)
  return material
end
function isInBuilding(x, y, z)
  local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z, x, y, z + 10, true, false, false, true, false, false, false, false, nil)
  if hit then
    return true
  end
  return false
end
function isObjectAroundPlayer2(thePlayer, distance, height)
  material_value = 0
  local x, y, z = getElementPosition(thePlayer)
  for i = math.random(0, 360), 360 do
    local nx, ny = getPointFromDistanceRotation(x, y, distance, i)
    local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z + height, nx, ny, z + height, true, false, false, false, false, false, false, false)
    if material == 0 then
      material_value = material_value + 1
    end
    if material_value > 40 then
      return 0, hitX, hitY, hitZ
    end
  end
  return false
end
function isObjectAroundPlayer(thePlayer, distance, height)
  local x, y, z = getElementPosition(thePlayer)
  for i = math.random(0, 360), 360 do
    local nx, ny = getPointFromDistanceRotation(x, y, distance, i)
    local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z + height, nx, ny, z + height)
    if material == 0 then
      return material, hitX, hitY, hitZ
    end
  end
  return false
end
Link to comment
  
addEventHandler("onClientResourceStart", getResourceRootElement(), function()
  dayzVersion = "MTA:DayZ a0.6 r193"
  versionLabel = guiCreateLabel(1, 1, 0.3, 0.3, dayzVersion, true)
  guiSetSize(versionLabel, guiLabelGetTextExtent(versionLabel), guiLabelGetFontHeight(versionLabel), false)
  x, y = guiGetSize(versionLabel, true)
  guiSetPosition(versionLabel, 1 - x, 1 - y * 1.8, true)
  guiSetAlpha(versionLabel, 0.5)
end)
snipertxd = engineLoadTXD("mods/sniper.txd")
engineImportTXD(snipertxd, 285)
sniperdff = engineLoadDFF("mods/sniper.dff", 285)
engineReplaceModel(sniperdff, 285)
snipertxd = engineLoadTXD("mods/civilian.txd")
engineImportTXD(snipertxd, 179)
sniperdff = engineLoadDFF("mods/civilian.dff", 179)
engineReplaceModel(sniperdff, 179)
snipertxd = engineLoadTXD("mods/bandit3.txd")
engineImportTXD(snipertxd, 180)
sniperdff = engineLoadDFF("mods/bandit3.dff", 180)
engineReplaceModel(sniperdff, 180)
snipertxd = engineLoadTXD("mods/bandit2.txd")
engineImportTXD(snipertxd, 288)
sniperdff = engineLoadDFF("mods/bandit2.dff", 288)
engineReplaceModel(sniperdff, 288)
snipertxd = engineLoadTXD("mods/standart.txd")
engineImportTXD(snipertxd, 73)
sniperdff = engineLoadDFF("mods/standart.dff", 73)
engineReplaceModel(sniperdff, 73)
snipertxd = engineLoadTXD("mods/femalestandard.txd")
engineImportTXD(snipertxd, 191)
sniperdff = engineLoadDFF("mods/femalestandard.dff", 191)
engineReplaceModel(sniperdff, 191)
snipertxd = engineLoadTXD("mods/hero.txd")
engineImportTXD(snipertxd, 210)
sniperdff = engineLoadDFF("mods/hero.dff", 210)
engineReplaceModel(sniperdff, 210)
itemTXD = engineLoadTXD("items/army_clothes.txd")
engineImportTXD(itemTXD, 1247)
itemDFF = engineLoadDFF("items/army_clothes.dff", 1247)
engineReplaceModel(itemDFF, 1247)
itemTXD = engineLoadTXD("items/sniper_clothes.txd")
engineImportTXD(itemTXD, 1213)
itemDFF = engineLoadDFF("items/sniper_clothes.dff", 1213)
engineReplaceModel(itemDFF, 1213)
itemTXD = engineLoadTXD("items/civilian_clothes.txd")
engineImportTXD(itemTXD, 1241)
itemDFF = engineLoadDFF("items/civilian_clothes.dff", 1241)
engineReplaceModel(itemDFF, 1241)
itemTXD = engineLoadTXD("items/standard_clothes.txd")
engineImportTXD(itemTXD, 1577)
itemDFF = engineLoadDFF("items/standard_clothes.dff", 1577)
engineReplaceModel(itemDFF, 1577)
itemTXD = engineLoadTXD("items/beans_can.txd")
engineImportTXD(itemTXD, 2601)
itemDFF = engineLoadDFF("items/beans_can.dff", 2601)
engineReplaceModel(itemDFF, 2601)
itemTXD = engineLoadTXD("items/first_aid_kit.txd")
engineImportTXD(itemTXD, 2891)
itemDFF = engineLoadDFF("items/first_aid_kit.dff", 2891)
engineReplaceModel(itemDFF, 2891)
itemTXD = engineLoadTXD("items/heat_pack.txd")
engineImportTXD(itemTXD, 1576)
itemDFF = engineLoadDFF("items/heat_pack.dff", 1576)
engineReplaceModel(itemDFF, 1576)
itemTXD = engineLoadTXD("items/pain_killers.txd")
engineImportTXD(itemTXD, 2709)
itemDFF = engineLoadDFF("items/pain_killers.dff", 2709)
engineReplaceModel(itemDFF, 2709)
itemTXD = engineLoadTXD("items/pasta_can.txd")
engineImportTXD(itemTXD, 2770)
itemDFF = engineLoadDFF("items/pasta_can.dff", 2770)
engineReplaceModel(itemDFF, 2770)
itemTXD = engineLoadTXD("items/pistol_ammo.txd")
engineImportTXD(itemTXD, 3013)
itemDFF = engineLoadDFF("items/pistol_ammo.dff", 3013)
engineReplaceModel(itemDFF, 3013)
itemTXD = engineLoadTXD("items/shotgun_ammo.txd")
engineImportTXD(itemTXD, 2358)
itemDFF = engineLoadDFF("items/shotgun_ammo.dff", 2358)
engineReplaceModel(itemDFF, 2358)
itemTXD = engineLoadTXD("items/backpack_small.txd")
engineImportTXD(itemTXD, 3026)
itemDFF = engineLoadDFF("items/backpack_small.dff", 3026)
engineReplaceModel(itemDFF, 3026)
itemTXD = engineLoadTXD("items/smg_ammo.txd")
engineImportTXD(itemTXD, 2041)
itemDFF = engineLoadDFF("items/smg_ammo.dff", 2041)
engineReplaceModel(itemDFF, 2041)
itemTXD = engineLoadTXD("items/sniper_ammo.txd")
engineImportTXD(itemTXD, 2358)
itemDFF = engineLoadDFF("items/sniper_ammo.dff", 2358)
engineReplaceModel(itemDFF, 2358)
itemTXD = engineLoadTXD("items/soda_can.txd")
engineImportTXD(itemTXD, 2647)
itemDFF = engineLoadDFF("items/soda_can.dff", 2647)
engineReplaceModel(itemDFF, 2647)
itemTXD = engineLoadTXD("items/water_bottle.txd")
engineImportTXD(itemTXD, 2683)
itemDFF = engineLoadDFF("items/water_bottle.dff", 2683)
engineReplaceModel(itemDFF, 2683)
itemTXD = engineLoadTXD("items/assault_ammo.txd")
engineImportTXD(itemTXD, 1271)
itemDFF = engineLoadDFF("items/assault_ammo.dff", 1271)
engineReplaceModel(itemDFF, 1271)
itemTXD = engineLoadTXD("items/backpack_alice.txd")
engineImportTXD(itemTXD, 1248)
itemDFF = engineLoadDFF("items/backpack_alice.dff", 1248)
engineReplaceModel(itemDFF, 1248)
itemTXD = engineLoadTXD("items/backpack_coyote.txd")
engineImportTXD(itemTXD, 1252)
itemDFF = engineLoadDFF("items/backpack_coyote.dff", 1252)
engineReplaceModel(itemDFF, 1252)
itemTXD = engineLoadTXD("items/backpack_czech.txd")
engineImportTXD(itemTXD, 1575)
itemDFF = engineLoadDFF("items/backpack_czech.dff", 1575)
engineReplaceModel(itemDFF, 1575)
itemTXD = engineLoadTXD("items/tent.txd")
engineImportTXD(itemTXD, 3243)
itemDFF = engineLoadDFF("items/tent.dff", 3243)
engineReplaceModel(itemDFF, 3243)
itemTXD = engineLoadTXD("items/wirefence.txd")
engineImportTXD(itemTXD, 983)
itemDFF = engineLoadDFF("items/wirefence.dff", 983)
engineReplaceModel(itemDFF, 983)
weaponTXD = engineLoadTXD("items/camera.txd")
engineImportTXD(weaponTXD, 367)
weaponDFF = engineLoadDFF("items/camera.dff", 367)
engineReplaceModel(weaponDFF, 367)
weaponTXD = engineLoadTXD("items/katana.txd")
engineImportTXD(weaponTXD, 339)
weaponDFF = engineLoadDFF("items/katana.dff", 339)
engineReplaceModel(weaponDFF, 339)
function playerStatsClientSite()
  if getElementData(getLocalPlayer(), "logedin") then
    toggleControl("radar", false)
    showPlayerHudComponent("clock", false)
    showPlayerHudComponent("radar", false)
    showPlayerHudComponent("money", false)
    showPlayerHudComponent("health", false)
    showPlayerHudComponent("breath", false)
    if getElementData(getLocalPlayer(), "Map") >= 1 then
      toggleControl("radar", true)
    end
    if 1 <= getElementData(getLocalPlayer(), "GPS") then
      showPlayerHudComponent("radar", true)
    end
    if 1 <= getElementData(getLocalPlayer(), "Watch") then
      showPlayerHudComponent("clock", true)
    end
  end
end
setTimer(playerStatsClientSite, 1000, 0)
function playerZoom(key, keyState)
  if key == "n" then
    if getElementData(getLocalPlayer(), "Night Vision Goggles") > 0 then
      if nightvision then
        nightvision = false
        setCameraGoggleEffect("normal")
        do
          local hour, minutes = getTime()
          if gameplayVariables.enablenight then
            setClientNight(hour, minutes)
          end
        end
      else
        nightvision = true
        setCameraGoggleEffect("nightvision")
        setFarClipDistance(1000)
      end
    end
  elseif key == "i" and 0 < getElementData(getLocalPlayer(), "Infrared Goggles") then
    if infaredvision then
      infaredvision = false
      setCameraGoggleEffect("normal")
      if gameplayVariables.enablenight then
        setClientNight(hour, minutes)
      end
    else
      infaredvision = true
      setCameraGoggleEffect("thermalvision")
      if gameplayVariables.enablenight then
        setClientNight(hour, minutes)
      end
    end
  end
end
bindKey("n", "down", playerZoom)
bindKey("i", "up", playerZoom)
function setClientNight(hour, minutes)
  if hour == 21 then
    setSkyGradient(0, 100 / minutes, 196 / minutes, 136 / minutes, 170 / minutes, 212 / minutes)
    setFarClipDistance(120 + (880 - minutes * 14.6))
    setFogDistance(-150 + (250 - minutes * 4.16))
  elseif hour == 7 then
    setSkyGradient(0, 1.6 * minutes, 638.9599999999999, 307.35999999999996, 481.1, 748.36)
    setFarClipDistance(120 + minutes * 14.6)
    setFogDistance(-150 + minutes * 4.16)
  elseif hour == 22 or hour == 23 then
    setSkyGradient(0, 0, 0, 0, 0, 0)
    setFarClipDistance(120)
    setFogDistance(-150)
  elseif hour >= 0 and hour <= 7 then
    setSkyGradient(0, 0, 0, 0, 0, 0)
    setFarClipDistance(120)
    setFogDistance(-150)
  else
    setSkyGradient(0, 100, 196, 136, 170, 212)
    setFarClipDistance(1000)
    setFogDistance(100)
  end
end
function getGroundMaterial(x, y, z)
  local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z, x, y, z - 10, true, false, false, true, false, false, false, false, nil)
  return material
end
function isInBuilding(x, y, z)
  local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z, x, y, z + 10, true, false, false, true, false, false, false, false, nil)
  if hit then
    return true
  end
  return false
end
function isObjectAroundPlayer2(thePlayer, distance, height)
  material_value = 0
  local x, y, z = getElementPosition(thePlayer)
  for i = math.random(0, 360), 360 do
    local nx, ny = getPointFromDistanceRotation(x, y, distance, i)
    local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z + height, nx, ny, z + height, true, false, false, false, false, false, false, false)
    if material == 0 then
      material_value = material_value + 1
    end
    if material_value > 40 then
      return 0, hitX, hitY, hitZ
    end
  end
  return false
end
function isObjectAroundPlayer(thePlayer, distance, height)
  local x, y, z = getElementPosition(thePlayer)
  for i = math.random(0, 360), 360 do
    local nx, ny = getPointFromDistanceRotation(x, y, distance, i)
    local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ, material = processLineOfSight(x, y, z + height, nx, ny, z + height)
    if material == 0 then
      return material, hitX, hitY, hitZ
    end
  end
  return false
end
function getPointFromDistanceRotation(x, y, dist, angle)
 
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...