Jump to content

Actimel

Members
  • Posts

    54
  • Joined

  • Last visited

Everything posted by Actimel

  1. 400 id landstalker @NeXuS™
  2. vehicles.lua --[[LandStalker]] {400, -1298.5590820313,-1298.5590820313,59.394161224365}, {400, -2444.0551757813,-1155.2465820313,182.79537963867}, {400, -2934.8203125,1025.5888671875,6.0455174446106}, {400, -772.78924560547,2906.8093261719,36.291316986084}, ------------------------otherpart--------------------------------------- local vehicleAddonsInfo = { {422, 4, 1, 1, 25}, {470, 4, 1, 1, 46}, {400, 4, 1, 1, 46}, {468, 2, 1, 1, 10}, {433, 6, 1, 1, 70}, {437, 6, 1, 1, 60}, {509, 0, 0, 0, 0}, {487, 0, 1, 1, 20}, {497, 0, 1, 1, 20}, {453, 0, 1, 1, 35}, }; local vehicleFuelInfo = { {422, 0.25}, {400, 0.25}, {470, 0.1}, {468, 0.1}, {433, 0.5}, {437, 0.5}, {509, 0}, {487, 0.25}, {497, 0.25}, {453, 0.1}, }; local vehicleFuelTable = { {422, 80}, {470, 100}, {400, 100}, {468, 30}, {433, 140}, {437, 140}, {509, 0}, {487, 60}, {497, 60}, {453, 60}, }; inventory.lua local vehicleAddonsInfo = { {422, 4, 1, 1, 25}, {470, 4, 1, 1, 46}, {400, 4, 1, 1, 46}, {468, 2, 1, 1, 10}, {433, 6, 1, 1, 70}, {437, 6, 1, 1, 60}, {509, 0, 0, 0, 0}, {487, 0, 1, 1, 20}, {497, 0, 1, 1, 20}, {453, 0, 1, 1, 35}, {492, 4, 1, 1, 32}, {463, 2, 1, 1, 15}, {505, 4, 1, 1, 40}, {560, 4, 1, 1, 33}, {579, 4, 1, 1, 40}, {593, 3, 1, 1, 20}, }; local vehicleFuelTable = { {422, 80}, {470, 100}, {400, 100}, {468, 30}, {433, 140}, {437, 140}, {509, 0}, {487, 60}, {497, 60}, {453, 60}, {492, 80}, {463, 40}, {505, 80}, {560, 60}, {579, 80}, {593, 40}, {568, 100} }; main_c.lua --Vehicles Tab --Gridlists vehicles_gridlist_players = guiCreateGridList(10, 10, 180, 444, false, main_tab_vehicles) guiGridListAddColumn(vehicles_gridlist_players, "Players:", 0.9) vehicles_gridlist_vehicles = guiCreateGridList(411, 10, 180, 444, false, main_tab_vehicles) guiGridListAddColumn(vehicles_gridlist_vehicles, "Vehicles:", 0.9) for i = 1, 17 do guiGridListAddRow(vehicles_gridlist_vehicles) end guiGridListSetItemText(vehicles_gridlist_vehicles, 0, 1, "Bobcat", false, false) guiGridListSetItemText(vehicles_gridlist_vehicles, 1, 1, "Patriot", false, false) guiGridListSetItemText(vehicles_gridlist_vehicles, 3, 1, "Landstalker", false, false) guiGridListSetItemText(vehicles_gridlist_vehicles, 5, 1, "Barracks", false, false) guiGridListSetItemText(vehicles_gridlist_vehicles, 6, 1, "Coach", false, false) guiGridListSetItemText(vehicles_gridlist_vehicles, 7, 1, "Bike", false, false) guiGridListSetItemText(vehicles_gridlist_vehicles, 8, 1, "Reefer", false, false) guiGridListSetItemText(vehicles_gridlist_vehicles, 11, 1, "Maverick", false, false) guiGridListSetItemText(vehicles_gridlist_vehicles, 12, 1, "Police Maverick", false, false) guiGridListSetItemText(vehicles_gridlist_vehicles, 13, 1, "Landstalker", false, false) guiGridListSetItemColor(vehicles_gridlist_vehicles, 14, 1, 255, 0, 0, 255) guiGridListSetItemColor(vehicles_gridlist_vehicles, 15, 1, 255, 0, 0, 255) guiGridListSetItemColor(vehicles_gridlist_vehicles, 16, 1, 255, 0, 0, 255) @marty000123 this is what i did
  3. Hi im working on 0.7 dayz source and i added new vehicle landstalker and works good no errors anything but server dont spawn landstalker in specific coordinates that i added in vehicles.lua Can someone tell me what to do ?
  4. Hi guys i want ask how add vehicles because i added but it doesnt spawn for no reason and there are no any errors
  5. thanks man a lot it worked
  6. these 3 last ones mou backpacks
  7. addEventHandler("onElementDataChange", root, function(dataName, oldValue) if not oldValue then oldValue = 0; end if (getElementType(source) == "player") then if (dataName == "MAX_Slots") then local newValue = getElementData(source, dataName); removeBackpack(source); local x,y,z = getElementPosition(source); if (newValue == 12) then elementBackpack[source] = createObject(3026, x, y, z); -- Assault Pack (ACU) elseif (newValue == 16) then elementBackpack[source] = createObject(1248, x, y, z); -- Alice Pack elseif (newValue == 26) then elementBackpack[source] = createObject(1575, x, y, z); -- Czech Backpack elseif (newValue == 36) then elementBackpack[source] = createObject(1252, x, y, z); -- Coyote Backpack elseif (newValue == 44) then elementBackpack[source] = createObject(2734, x, y, z); -- Hunting Backpack elseif (newValue == 58) then elementBackpack[source] = createObject(371, x, y, z); -- violet Backpack WORKS GOOD elseif (newValue == 63) then elementBackpack[source] = createObject(373, x, y, z); -- orange Backpack WORKS GOOD elseif (newValue == 66) then elementBackpack[source] = createObject(2704, x, y, z); -- green Backpack WORKS GOOD elseif (newValue == 75) then elementBackpack[source] = createObject(2052, x, y, z); -- red mou Backpack Rotation problem elseif (newValue == 80) then elementBackpack[source] = createObject(2053, x, y, z); -- orange mou Backpack Rotation problem elseif (newValue >= 86) then elementBackpack[source] = createObject(2054, x, y, z); -- green mou Backpack Rotation problem elseif (newValue == 8) then return; end if elementBackpack[source] then setElementData(source, "tohide2", elementBackpack[source]); if (newValue >= 86) then setObjectScale(elementBackpack[source], 1.1); end end if (newValue == 26) then attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180); else attachElementToBone(elementBackpack[source], source, 3, 0, -0.225, 0.05, 90, 0, 0); end @NeXuS™ this one ?
  8. Hi again i managed add 3 backpacks and they work everything good then i added more 3 backpacks but now they work also good but the problem is that they are flipped like this : @NeXuS™ maybe you can help me again?
  9. look i put all code here u can check local weaponAmmoTable = { ["Weapons"] ={ {"M1911 Mag", "M1911", 22, 346}, {"M9 SD Mag", "M9 SD", 23, 347}, {"Desert Eagle Mag", "Desert Eagle", 24, 348}, {"PDW Mag", "PDW", 28, 352}, {"MP5A5 Mag", "MP5A5", 29, 353}, {"AKS-74U Mag", "AKS-74U", 31, 1839}, {"AK-107 Mag", "AK-107", 31, 1834}, {"AKS Gold Mag", "AKS Gold", 31, 1835}, {"M4A1 Holo Mag", "M4A1 Holo", 31, 1830}, {"MK 48 Mod 0 Mag", "MK 48 Mod 0", 30, 1880}, {"MG36 Mag", "MG36", 30, 1832}, {"PKP Mag", "PKP", 30, 1833}, {"SA-58V ACOG Mag", "SA-58V ACOG", 31, 1838}, {"1866 Slug", "Winchester 1866", 25, 349}, {"2Rnd. Slug", "Sawn-Off Shotgun", 26, 350}, {"SPAZ-12 Pellet", "SPAZ-12 Combat Shotgun", 27, 351}, {"DMR Mag", "DMR", 34, 1869}, {"KVSK Mag", "KVSK", 34, 1870}, {"AS50 Mag", "AS50", 34, 1871}, {"CZ550 Mag", "CZ550", 34, 1872}, {"Mosin 9130 Mag", "Mosin 9130", 34, 1873}, {"M24 Mag", "M24", 34, 1874}, {"M107 Mag", "M107", 34, 1875}, {"SVD Dragunov Camo Mag", "SVD Dragunov Camo", 34, 1876}, {"SKS-45 Mag", "SKS-45", 33, 357} }, ["others"] = { {"Tear Gas", 17, 343, "Tear Gas (Equipped)"}, {"Grenade", 16, 342, "Grenade (Equipped)"}, {"Hunting Knife", 4, 335, "Hunting Knife (Equipped)"}, {"Hatchet", 8, 339, "Hatchet (Equipped)"}, {"Binoculars", 43, 367, "Binoculars (Equipped)"}, {"Baseball Bat", 5, 336, "Baseball Bat (Equipped)"}, {"Shovel", 6, 337, "Shovel (Equipped)"}, {"Golf Club", 2, 333, "Golf Club (Equipped)"} } }; function getWeaponAmmoType(name) for _,v in ipairs(weaponAmmoTable["Weapons"]) do if (name == v[2]) then return v[1], v[3], v[4]; end end for _,v in ipairs(weaponAmmoTable["others"]) do if (name == v[1]) then return v[4], v[2], v[3]; end end return false, false, false; end local skinTable = { {"Camouflage Clothing", 287}, {"Spec.Force Sniper Clothing", 83}, {"Civilian Clothing", 179}, {"Ghillie Suit", 285}, {"Survivor Clothing", 73} }; local animalsSpawns = { {-1350.775390625, -1070.8291015625, 160.71176147461}, {-1369.1123046875, -1094.70703125, 163.45556640625}, {-1431.8876953125, -1093.189453125, 162.88122558594}, {-1456.1787109375, -1064.6630859375, 168.23822021484}, {-1483.6357421875, -1024.376953125, 170.4222869873}, {-1468.3408203125, -988.3291015625, 192.51156616211}, {-1431.3173828125, -934.0478515625, 201.39248657227}, {-1577.904296875, -1020.0693359375, 143.08142089844}, {-1587.375, -1018.236328125, 141.72036743164}, {-1590.380859375, -1040.8505859375, 134.61396789551}, {-1581.958984375, -1072.4111328125, 133.2043762207}, {-1584.595703125, -1106.2001953125, 138.63221740723}, {-1550.591796875, -1137.1181640625, 136.79585266113}, {-1498.1083984375, -1180.9814453125, 125.67600250244}, {-1428.4541015625, -1225.892578125, 106.43696594238}, {-411.271484375, -1338.080078125, 25.689184188843}, {-373.59375, -1307.2568359375, 26.628273010254}, {-372.1689453125, -1259.75, 31.759468078613}, {-393.7333984375, -1195.427734375, 60.393005371094}, {-417.9150390625, -1180.4599609375, 63.334930419922}, {-433.0888671875, -1156.3349609375, 61.920516967773}, {-336.744140625, -1267.5693359375, 23.735641479492}, {-303.19140625, -1275.9599609375, 10.24838924408}, {-233.025390625, -1235.2373046875, 6.5470447540283}, {-193.0166015625, -1232.7568359375, 10.130974769592}, {-176.25, -1223.6298828125, 8.0039596557617}, {-166.5498046875, -1286.111328125, 3.5691347122192}, {-969.5048828125, -1738.703125, 77.557479858398}, {-966.748046875, -1776.2470703125, 80.165809631348}, {-976.7177734375, -1808.9462890625, 90.694877624512}, {-978.0849609375, -1827.4521484375, 93.413543701172}, {-986.23046875, -1855.9130859375, 85.224227905273}, {-1095.68359375, -1869.5302734375, 86.347923278809}, {-1168.853515625, -1864.869140625, 79.263336181641}, {-1221.1416015625, -1859.6591796875, 76.356552124023}, {-650.044921875, -2077.580078125, 28.14298248291}, {-632.34765625, -2062.50390625, 32.527751922607}, {-537.833984375, -1992.03515625, 47.49878692627}, {-498.4375, -1957.61328125, 38.346961975098} }; local weatherTable = { [1] = 5, [2] = 8, [3] = 7, [4] = 10 }; local backpackSlots = { ["NTS"] = { ["Violet Taloon Backpack"] = 58, ["Hunting Backpack"] = 44, ["Coyote Backpack"] = 36, ["Czech Backpack"] = 26, ["Alice Pack"] = 16, ["Assault Pack (ACU)"] = 12 }, ["STN"] = { [58] = "Violet Taloon Backpack", [44] = "Hunting Backpack", [36] = "Coyote Backpack", [26] = "Czech Backpack", [16] = "Alice Pack", [12] = "Assault Pack (ACU)" } }; local elementBackpack = {}; local elementWeaponBack = {}; local elementWeaponBack2 = {}; local elementWeaponRaplace = {}; local handsUp = false; local siting = false; local lying = false; addEvent("relWep", true); addEvent("createDeadAnimal", true); addEvent("onPlayerHideBody", true); addEvent("onPlayerRearmWeapon", true); addEvent("removeBackWeaponOnDrop", true); addEvent("kilLDayZPlayer", true); addEvent("onPlayerRequestChangingStats", true); addEvent("onPlayerUseMedicObject", true); addEvent("onPlayerGiveMedicObject", true); addEvent("onPlayerChangeSkin", true); addEvent("onPlayerRefillWaterBottle", true); addEvent("onPlayerPitchATent", true); addEvent("onPlayerBuildAWireFence", true); addEvent("removeWirefence", true); addEvent("addPlayerCookMeat", true); addEvent("removeTent" ,true); addEvent("onPlayerMakeAFire", true); addEvent("onPlayerPlaceRoadflare", true); addEvent("kickPlayerOnHighPing", true); addEvent("onPlayerEquipBackpack", true); addEvent("onPlayerUnequipWeapon", true); addEventHandler("onResourceStart", resourceRoot, function() setGameType("United DayZ LT#1"); --[[ Multi Theft Auto DayZ Revision 3 ]] local realTime = getRealTime(); setTime(realTime.hour, realTime.minute); setMinuteDuration(60000); setFarClipDistance(600); setFogDistance(300); setTrafficLightState("disabled"); setTimer(setTrafficLightState, 10000, 0, "disabled"); setWeaponProperty(30, "pro", "maximum_clip_ammo", 100); setWeaponProperty(30, "std", "maximum_clip_ammo", 100); setWeaponProperty(30, "poor", "maximum_clip_ammo", 100); setWeaponProperty(31, "pro", "maximum_clip_ammo", 30); setWeaponProperty(31, "std", "maximum_clip_ammo", 30); setWeaponProperty(31, "poor", "maximum_clip_ammo", 30); setWeaponProperty(29, "pro", "maximum_clip_ammo", 20); setWeaponProperty(29, "std", "maximum_clip_ammo", 20); setWeaponProperty(29, "poor", "maximum_clip_ammo", 20); end); function getBackpackNameFromSlots(slots) if (slots > 8) then return backpackSlots["STN"][slots]; end return "None"; end function getBackpackSlotsFromName(name) if name then return backpackSlots["NTS"][name]; end return false; end function removeBackpack(source) if elementBackpack[source] then detachElementFromBone(elementBackpack[source]); destroyElement(elementBackpack[source]); elementBackpack[source] = false; setElementData(source, "tohide2", "NONE"); end end function removeWeaponBack(source) if elementWeaponBack[source] then detachElementFromBone(elementWeaponBack[source]); destroyElement(elementWeaponBack[source]); elementWeaponBack[source] = false; setElementData(source, "tohide3", "NONE"); end end function removeWeaponBack2(source) if elementWeaponBack2[source] then detachElementFromBone(elementWeaponBack2[source]); destroyElement(elementWeaponBack2[source]); elementWeaponBack2[source] = false; setElementData(source, "tohide4", "NONE"); end end function removeWeaponReplace(source) if elementWeaponRaplace[source] then detachElementFromBone(elementWeaponRaplace[source]); destroyElement(elementWeaponRaplace[source]); elementWeaponRaplace[source] = false; setElementData(source, "tohide1", "NONE"); end end addEventHandler("onPlayerEquipBackpack", root, function(backpack) local nSlots = getBackpackSlotsFromName(backpack); local oSlots = getElementData(source, "MAX_Slots"); if (nSlots > oSlots) then setElementData(source, "MAX_Slots", nSlots); setElementData(source, backpack, getElementData(source, backpack) - 1); local oName = getBackpackNameFromSlots(oSlots); setElementData(source, oName, getElementData(source, oName) + 1); triggerClientEvent(source, "refreshInventoryManual", source); else triggerClientEvent(source, "displayClientInfo", source, "You already have a biger or equal backpack!", 255, 22, 0); end end); addEventHandler("onPlayerUnequipWeapon", root, function(eweapon, slot) local weap = getElementData(source, "currentweapon_"..tostring(slot)); local name,id,model = getWeaponAmmoType(weap); takeWeapon(source, id); if (slot < 3) then setElementData(source, weap, getElementData(source, weap) + 1); setElementData(source, eweapon, getElementData(source, eweapon) - 1); setElementData(source, "currentweapon_"..tostring(slot), ""); if (slot == 1) then removeWeaponBack(source); removeWeaponReplace(source); else removeWeaponBack2(source); end else setElementData(source, weap, getElementData(source, weap.." (Equipped)")); setElementData(source, eweapon, 0); setElementData(source, "currentweapon_"..tostring(slot), ""); end triggerClientEvent(source, "refreshInventoryManual", source); end); addEventHandler("onPlayerRearmWeapon", root, function(weapon, slot) takeAllWeapons(source); local wAmmo,id,_ = getWeaponAmmoType(weapon); local ammos = wAmmo; if (id ~= 8 or id ~= 5 or id ~= 6 or id ~= 2) then ammos = 1; end if (slot < 3 and ammos < 1) then triggerClientEvent(source, "displayClientInfo", source, "No mags left for this weapon!", 255, 22, 0); else local old = getElementData(source, "currentweapon_"..tostring(slot)); if (weapon == old) then equipThem(source, slot); return; end if (slot < 3) then if (old ~= "") then setElementData(source, old, getElementData(source, old) + 1); setElementData(source, old.." (Equipped)", 0); end setElementData(source, weapon, getElementData(source, weapon) - 1); setElementData(source, weapon.." (Equipped)", 1); setElementData(source, "currentweapon_"..tostring(slot), weapon); else if (old ~= "") then local oldq = getElementData(source, old); if (oldq > 0) then setElementData(source, old, oldq); end end setElementData(source, weapon.." (Equipped)", getElementData(source, weapon)); setElementData(source, "currentweapon_"..tostring(slot), weapon); setElementData(source, weapon, 0); end end triggerClientEvent(source, "refreshInventoryManual", source); equipThem(source, slot); end); function equipThem(player, slot) removeWeaponBack(player); removeWeaponBack2(player); removeWeaponReplace(player); for i = 1, 3 do local weapon = getElementData(player, "currentweapon_"..tostring(i)); if (weapon ~= "") then if (i == slot) then bool = true; else bool = false; end local ammo,id,_ = getWeaponAmmoType(weapon); if (i == 3) then giveWeapon(player, id, getElementData(player, weapon.." (Equipped)"), bool); else if (id == 8) then giveWeapon(player, id, 1, bool); else local wam = getElementData(player, ammo); giveWeapon(player, id, wam, bool); setWeaponAmmo(player, id, wam); end end end end if (slot == 1) then local weap2 = getElementData(player, "currentweapon_2"); if (weap2 ~= "") then local _,id,model2 = getWeaponAmmoType(weap2); if model2 then attachWeaponBack2(player, model2, id); end end elseif (slot == 2) then local weap1 = getElementData(player, "currentweapon_1"); if (weap1 ~= "") then local _,_,model1 = getWeaponAmmoType(weap1); if model1 then attachWeaponBack(player, model1); end end else local weap1 = getElementData(player, "currentweapon_1"); if (weap1 ~= "") then local _,_,model1 = getWeaponAmmoType(weap1); if model1 then attachWeaponBack(player, model1); end end local weap2 = getElementData(player, "currentweapon_2"); if (weap2 ~= "") then local _,id,model2 = getWeaponAmmoType(weap2); if model2 then attachWeaponBack2(player, model2, id); end end if (slot == 0) then setPedWeaponSlot(player, 0); end end end function attachWeaponReplace(source, model) removeWeaponReplace(source); local x,y,z = getElementPosition(source); if (model > 1000) then elementWeaponRaplace[source] = createObject(model, x, y, z); if elementWeaponRaplace[source] then setElementData(source, "tohide1", elementWeaponRaplace[source]); end if elementBackpack[source] then attachElementToBone(elementWeaponRaplace[source], source, 12, 0, 0, 0, 180, 90, 180); else attachElementToBone(elementWeaponRaplace[source], source, 12, 0, 0, 0, 180, 90, 180); end end end function attachWeaponBack(source, model) removeWeaponBack(source); local x,y,z = getElementPosition(source); elementWeaponBack[source] = createObject(model, x, y, z); if elementWeaponBack[source] then setObjectScale(elementWeaponBack[source], 0.8); setElementData(source, "tohide3", elementWeaponBack[source]); end if elementBackpack[source] then attachElementToBone(elementWeaponBack[source], source, 3, 0.19, -0.31, -0.1, 0, 270, -90); else attachElementToBone(elementWeaponBack[source], source, 3, 0.19, -0.11, -0.1, 0, 270, 10); end end function attachWeaponBack2(source, model, id) removeWeaponBack2(source); local x,y,z = getElementPosition(source); elementWeaponBack2[source] = createObject(model, x, y, z); if elementWeaponBack2[source] then setObjectScale(elementWeaponBack2[source], 1); if (id == 6) then setObjectScale(elementWeaponBack2[source], 0.7); elseif (id == 8) then setObjectScale(elementWeaponBack2[source], 0.8); end setElementData(source, "tohide4", elementWeaponBack2[source]); end if elementBackpack[source] then if (id == 8) then attachElementToBone(elementWeaponBack2[source], source, 3, -0.18, -0.12, 0.22, 180, 0, -90); elseif (id == 2 or id == 4 or id == 6 or id == 5) then attachElementToBone(elementWeaponBack2[source], source, 3, -0.18, -0.18, -0.1, 0, 0, -90); else attachElementToBone(elementWeaponBack2[source], source, 3, -0.18, -0.31, -0.1, 0, 270, -90); end else if (id == 8) then attachElementToBone(elementWeaponBack2[source], source, 3, -0.07 -0.14, -0.1, -0.1, 0, -8); elseif (id == 2 or id == 4) then attachElementToBone(elementWeaponBack2[source], source, 3, -0.20, -0.11, -0.1, -0.1, 0, -11); elseif (id == 6 or id == 5) then attachElementToBone(elementWeaponBack2[source], source, 3, -0.15, -0.11, -0.1, -0.1, 0, 70); else attachElementToBone(elementWeaponBack2[source], source, 3, -0.22, -0.11, -0.1, -0.1, -270, -11); end end end addEventHandler("onPlayerWeaponSwitch", root, function(previousWeaponID, currentWeaponID) local weapon = getElementData(source, "currentweapon_1"); local weapon2 = getElementData(source, "currentweapon_2"); if not weapon then return; end local _,weapID,model = getWeaponAmmoType(weapon); if (currentWeaponID == weapID) then removeWeaponBack(source); attachWeaponReplace(source, model); elseif (previousWeaponID == weapID) then removeWeaponReplace(source); attachWeaponBack(source, model); end if not weapon2 then return; end local _,id2,model2 = getWeaponAmmoType(weapon2); if (previousWeaponID == id2) then attachWeaponBack2(source, model2, id2); elseif (currentWeaponID == id2) then removeWeaponBack2(source); end end); addEventHandler("removeBackWeaponOnDrop", root, function(check, slot) if (slot == 1) then removeWeaponBack(source); removeWeaponReplace(source); elseif (slot == 2) then removeWeaponBack2(source); end if check then local weapon = getElementData(source, "currentweapon_"..tostring(slot)); local _,id,_ = getWeaponAmmoType(weapon); takeWeapon(source, id); if (slot == 3) then takeWeapon(client, id); local weapon = getElementData(client, "currentweapon_3"); if weapon then setElementData(client, weapon.." (Equipped)", getElementData(client, weapon.." (Equipped)") - 1); setElementData(client, "currentweapon_3", ""); end end setElementData(source, "currentweapon_"..tostring(slot), ""); triggerClientEvent(source, "refreshInventoryManual", source); end end); addEventHandler("onPlayerQuit", root, function() removeBackpack(source); removeWeaponBack(source); removeWeaponReplace(source); removeWeaponBack2(source); end); addEventHandler("kilLDayZPlayer", root, function() removeBackpack(source); removeWeaponBack(source); removeWeaponReplace(source); removeWeaponBack2(source); end); addEventHandler("onElementDataChange", root, function(dataName, oldValue) if not oldValue then oldValue = 0; end if (getElementType(source) == "player") then if (dataName == "MAX_Slots") then local newValue = getElementData(source, dataName); removeBackpack(source); local x,y,z = getElementPosition(source); if (newValue == 12) then elementBackpack[source] = createObject(3026, x, y, z); -- Assault Pack (ACU) elseif (newValue == 16) then elementBackpack[source] = createObject(1248, x, y, z); -- Alice Pack elseif (newValue == 26) then elementBackpack[source] = createObject(1575, x, y, z); -- Czech Backpack elseif (newValue == 36) then elementBackpack[source] = createObject(1252, x, y, z); -- Coyote Backpack elseif (newValue == 44) then elementBackpack[source] = createObject(2734, x, y, z); -- Hunting Backpack elseif (newValue >= 58) then elementBackpack[source] = createObject(371, x, y, z); -- violet Backpack elseif (newValue == 8) then return; end if elementBackpack[source] then setElementData(source, "tohide2", elementBackpack[source]); if (newValue >= 58) then setObjectScale(elementBackpack[source], 0.95); end end if (newValue == 26) then attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180); else attachElementToBone(elementBackpack[source], source, 3, 0, -0.225, 0.05, 90, 0, 0); end elseif (dataName == "Map") then if (getElementData(source, "Map") >= 1) then toggleControl(source, "radar", true); else toggleControl(source, "radar", false); end elseif (dataName == "GPS") then if (getElementData(source, "GPS") >= 1) then setPlayerHudComponentVisible(source, "radar", true); else setPlayerHudComponentVisible(source, "radar", false); end end local weapon1 = getElementData(source, "currentweapon_1"); local weapon2 = getElementData(source, "currentweapon_2"); local weapon3 = getElementData(source, "currentweapon_3"); if (dataName == weapon1 or dataName == weapon2 or dataName == weapon3) then if (getElementData(source, dataName) == 0) then local ammoData,weapID = getWeaponAmmoType(dataName); takeWeapon(source, weapID); end end local ammoData1,weapID1 = getWeaponAmmoType(weapon1); if (dataName == ammoData1) then local newammo = (oldValue-getElementData(source, dataName)); if (newammo == 1) then return; end if (getElementData(source, dataName) < oldValue) then takeWeapon(source, weapID1, newammo); removeWeaponBack(source); elseif (getElementData(source, dataName) > oldValue) then giveWeapon(source, weapID1, getElementData(source, dataName)-oldValue, false); end end local ammoData2,weapID2 = getWeaponAmmoType(weapon2); if (dataName == ammoData2) then local newammo = oldValue-getElementData(source, dataName); if (newammo == 1) then return; end if (getElementData(source, dataName) < oldValue) then takeWeapon(source, weapID2, newammo); elseif (getElementData(source,dataName) > oldValue) then giveWeapon(source, weapID2, getElementData(source, dataName)-oldValue, false); end end local ammoData3,weapID3 = getWeaponAmmoType(weapon3); if (dataName == ammoData3) then local newammo = oldValue-getElementData(source, dataName); if (newammo == 1) then return; end if (getElementData(source, dataName) < oldValue) then takeWeapon(source, weapID3, newammo); elseif (getElementData(source, dataName) > oldValue) then giveWeapon(source, weapID3, getElementData(source, dataName)-oldValue, false); end end end end); addEventHandler("onPlayerStealthKill", root, function(target) if (target and getElementType(target) == "player") then triggerEvent("kilLDayZPlayer", target, source, false, false); end end); function addPlayerStats(player, data, value) if (data == "food") then local current = getElementData(player, data); if (current + value > 100) then setElementData(player, data, 100); elseif (current + value < 1) then setElementData(player, data, 0); setElementData(player, "blood", (getElementData(player, "blood") - math.random(50, 120))); else setElementData(player, data, (current + value)); end elseif (data == "thirst") then local current = getElementData(player, data); if (current + value > 100) then setElementData(player, data, 100); elseif (current + value < 1) then setElementData(player, data, 0); setElementData(player, "blood", (getElementData(player, "blood") - math.random(50, 120))); else setElementData(player, data, (current + value)); end elseif (data == "blood") then local current = getElementData(player, data); if (current + value > 12000) then setElementData(player, data, 12000); elseif (current + value < 1) then setElementData(player, data, 0); else setElementData(player, data, (current + value)); end elseif (data == "temperature") then local current = getElementData(player, data); if (current + value > 41) then setElementData(player, data, 41); elseif (current + value <= 31) then setElementData(player, data, 31); else setElementData(player, data, (current + value)); end elseif (data == "humanity") then local current = getElementData(player, data); local new = current + value; if (new > 5000) then setElementData(player, data, 5000); setElementData(player, "htype", "Hero"); else setElementData(player, data, new); if (new <= 0) then setElementData(player, "htype", "Bandit"); elseif new >= 2000 then setElementData(player, "htype", "Survivor"); end end end end setTimer(function() for _,v in ipairs(getElementsByType("player")) do if getElementData(v, "logedin") then local value = 0; if isElementInWater(v) then value = -0.01; end if getControlState(v, "sprint") then value = (value + 0.005); addPlayerStats(v, "thirst", -0.2); end local weather = getWeather(); if (weather == 5) then value = (value + 0.005); elseif (weather == 8) then value = (value - 0.05); elseif (weather == 7) then value = (value - 0.01); elseif (weather == 10) then value = (value + 0.05); end if (getElementData(v, "humanity") < 2500) then addPlayerStats(v, "humanity", 30); end addPlayerStats(v, "temperature", value); addPlayerStats(v, "food", -1.5); addPlayerStats(v, "thirst", -1.5); end end end, 60000, 0); addEventHandler("onPlayerRequestChangingStats", root, function(itemName, itemInfo, data) if (data == "food") then if (itemName == "Burger") then blood = math.random(200, 300); elseif (itemName == "Pizza") then blood = math.random(300, 350); elseif (itemName == "Cooked Meat") then blood = math.random(600, 800); elseif (itemName == "Beans Can") then blood = math.random(150, 250); elseif (itemName == "Pasta Can") then blood = math.random(320, 400); end setPedAnimation(source, "FOOD", "EAT_Burger", -1, false, false, nil, false); setElementData(source, itemName, getElementData(source, itemName)-1); addPlayerStats(source, "blood", blood); addPlayerStats(source, data, math.random(60, 100)); elseif (data == "thirst") then setElementData(source, itemName, getElementData(source, itemName)-1); addPlayerStats(source, data, math.random(60, 100)); setPedAnimation(source, "VENDING", "VEND_Drink2_P", -1, false, false, nil, false); if (itemName == "Water Bottle") then setElementData(source, "Empty Water Bottle", getElementData(source, "Empty Water Bottle") + 1); end end triggerClientEvent(source, "displayClientInfo", source, "You consumed "..itemName, 22, 255, 0); triggerClientEvent(source, "refreshInventoryManual", source); end); addEventHandler("onPlayerUseMedicObject", root, function(itemName) setPedAnimation(source, "BOMBER", "BOM_Plant", -1, false, false, nil, false); setTimer(function(source) if (itemName == "Bandage") then setElementData(source, "bleeding", 0); setElementData(source, itemName, getElementData(source, itemName) - 1); elseif (itemName == "Medic Kit") then addPlayerStats(source, "blood", 7000); setElementData(source, "bleeding", 0); setElementData(source, itemName, getElementData(source, itemName) - 1); elseif (itemName == "Heat Pack") then setElementData(source, "cold", false); setElementData(source, "temperature", 37); setElementData(source, itemName, getElementData(source, itemName) - 1); elseif (itemName == "Painkiller") then setElementData(source, "pain", false); setElementData(source, itemName, getElementData(source, itemName) - 1); elseif (itemName == "Morphine") then setElementData(source, "brokenbone", false) setElementData(source, itemName, getElementData(source, itemName) - 1); elseif (itemName == "Blood Bag") then addPlayerStats(source, "blood", 12000); setElementData(source, itemName, getElementData(source, itemName) - 1); end triggerClientEvent(source, "refreshInventoryManual", source); end, 1500, 1, source); end); addEventHandler("onPlayerGiveMedicObject", root, function(itemName, player) setPedAnimation(source, "BOMBER", "BOM_Plant", -1, false, false, nil, false); setTimer(function(source) if (itemName == "givebandage") then setElementData(player, "bleeding", 0); setElementData(source, "Bandage", getElementData(source, "Bandage") - 1); addPlayerStats(source, "humanity", 40); elseif (itemName == "giveblood") then addPlayerStats(player, "blood", 12000); setElementData(source, "Blood Bag", getElementData(source, "Blood Bag") - 1); addPlayerStats(source, "humanity", 250); end triggerClientEvent(source, "refreshInventoryManual", source); end, 1500, 1, source); end); function getSkinIDFromName(name) for _,v in ipairs(skinTable) do if (name == v[1]) then return v[2]; end end end function getSkinNameFromID(id) for _,v in ipairs(skinTable) do if (id == v[2]) then return v[1]; end end end addEventHandler("onPlayerChangeSkin", root, function(skin) local name = getSkinNameFromID(getElementData(source, "skin")); setElementData(source, name, getElementData(source, name)+1); setElementData(source, skin, getElementData(source, skin)-1); local id = getSkinIDFromName(skin); setElementData(source, "skin", id); setElementModel(source, id); triggerClientEvent(source, "refreshInventoryManual", source); end); addEventHandler("onPlayerRefillWaterBottle", root, function(itemName) if isElementInWater(source) then setElementData(source, "Water Bottle", getElementData(source, "Water Bottle") + 1); setElementData(source, itemName, getElementData(source, itemName) - 1); triggerClientEvent(source, "refreshInventoryManual", source); triggerClientEvent(source, "displayClientInfo", source, "You filled 1 x "..itemName, 22, 255, 0); else triggerClientEvent(source, "displayClientInfo", source, "You must be in water!", 255, 22, 0); end end); addEventHandler("onPlayerPitchATent", root, function(itemName) setElementData(source, itemName, getElementData(source, itemName) - 1); setPedAnimation(source, "BOMBER", "BOM_Plant", -1, false, false, nil, false); setTimer(function(source) local x,y,z = getElementPosition(source); local xr,yr,zr = getElementRotation(source); local offsetRot = math.rad(zr+90); local vx = x+5*math.cos(offsetRot); local vy = y+5*math.sin(offsetRot); local vrot = zr+180; local tent = createObject(3243, vx, vy, (z-1), 0, 0, vrot); setObjectScale(tent, 1.3); local tentCol = createColSphere(x, y, z, 4); attachElements(tentCol, tent, 0, 0, 0); setElementData(tentCol, "parent", tent); setElementData(tent, "parent", tentCol); setElementData(tentCol, "tent", true); setElementData(tentCol, "MAX_Slots", 100); triggerClientEvent(source, "refreshInventoryManual", source); end, 2000, 1, source); end); addEventHandler("onPlayerBuildAWireFence", root, function(itemName) setElementData(source, itemName, getElementData(source, itemName)-1); setPedAnimation(source, "BOMBER", "BOM_Plant", -1, false, false, nil, false); setTimer(function(source) local x,y,z = getElementPosition(source); local xr,yr,zr = getElementRotation(source); local offsetRot = math.rad(zr+90); local vx = x+1*math.cos(offsetRot); local vy = y+1*math.sin(offsetRot); local vrot = zr+90; local wFence = createObject(983, vx, vy, z, xr, yr, vrot); setObjectScale(wFence, 1); local wFenceCol = createColSphere(x, y, z, 2); attachElements(wFenceCol, wFence, 0, 0, 0); setElementData(wFenceCol, "parent", wFence); setElementData(wFence, "parent", wFenceCol); setElementData(wFenceCol, "wirefence", true); triggerClientEvent(source, "refreshInventoryManual", source); end, 2000, 1, source); end); addEventHandler("removeWirefence", root, function(object) setTimer(function(object) destroyElement(getElementData(object, "parent")); destroyElement(object); end, 2000, 1, object); end); addEventHandler("removeTent",root, function(object) local col = getElementData(object, "parent"); setTimer(function(col, object) local x,y,z = getElementPosition(col); local item,itemString = getItemTablePosition("Tent"); local itemPickup = createItemPickup(item, x, y, (z+1), itemString); if col then destroyElement(col); end if object then destroyElement(object); end end, 2000, 1, col, object); end); addEventHandler("addPlayerCookMeat", root, function() setPedAnimation(source, "BOMBER", "BOM_Plant", -1, false, false, nil, false); local meat = getElementData(source, "Raw Meat"); setTimer(function(source) setElementData(source, "Raw Meat", 0); setElementData(source, "Cooked Meat", getElementData(source, "Cooked Meat") + meat); triggerClientEvent(source, "displayClientInfo", source, "You cooked "..tostring(meat).." Raw Meat.", 22, 255, 0); end, 5000, 1, source); end); addEventHandler("onPlayerMakeAFire", root, function(itemName) setElementData(source, "Wood Pile", getElementData(source, "Wood Pile")-1); local x,y,z = getElementPosition(source); local xr,yr,zr = getElementRotation(source); local offsetRot = math.rad(zr+90); local vx = x+1*math.cos(offsetRot); local vy = y+1*math.sin(offsetRot); local vrot = zr+90; local wood = createObject(1463, vx, vy, (z-0.75), xr, yr, vrot); setObjectScale(wood, 0.55); setElementCollisionsEnabled(wood, false); setElementFrozen(wood, true); local fire = createObject(3525, vx, vy, (z-0.75), xr, yr, vrot); setObjectScale(fire, 0); local fireCol = createColSphere(x, y, z, 2); setElementData(fireCol, "parent", wood); setElementData(wood, "parent", fireCol); setElementData(fireCol, "fireplace", true); triggerClientEvent(source, "refreshInventoryManual", source); setPedAnimation(source, "BOMBER","BOM_Plant", -1, false, false, nil, false); setTimer(function(fireCol, fire, wood) if fireCol then destroyElement(fireCol); end if fire then destroyElement(fire); end if wood then destroyElement(wood); end end, (2*60000), 1, fireCol, fire, wood); end); addEventHandler("onPlayerPlaceRoadflare", root, function(itemName) setElementData(source, itemName, getElementData(source, itemName)-1); local x,y,z = getElementPosition(source); local object = createObject(354, x, y, (z-0.6)); setTimer(destroyElement, 300000, 1, object); triggerClientEvent(source, "refreshInventoryManual", source); end); addEventHandler("onPlayerChat", root, function(message, mType) if (mType == 0 or mType == 1) then cancelEvent(); end if (mType == 0) then local x,y,z = getElementPosition(source); local chatSphere = createColSphere(x, y, z, 15); local nearbyPlayers = getElementsWithinColShape(chatSphere, "player"); destroyElement(chatSphere); for _,v in ipairs(nearbyPlayers) do outputChatBox("#D3D3D3[Local] #D3D3D3"..string.gsub((getPlayerName(source).." : #D3D3D3"..message), '#%x%x%x%x%x%x', ''), v, 211, 211, 211, true); end end end); addCommandHandler("radiochat", function(player, _, ...) if (getElementData(player, "Radio Device") >= 1) then for _,v in ipairs(getElementsByType("player")) do if (getElementData(v, "Radio Device") >= 1) then if (getElementData(v, "radiochannel") == getElementData(player, "radiochannel")) then outputChatBox("#FFFF00[Radio] "..getPlayerName(player):gsub("#%x%x%x%x%x%x", "").." : #FFFFFF"..table.concat({...}, " "):gsub("#%x%x%x%x%x%x", ""), v, 255, 255, 255, true); end end end else triggerClientEvent(source, "displayClientInfo", source, "You don't have a Radio Device!", 255, 0, 0); end end); setTimer(function() for _,v in ipairs(getElementsByType("player")) do if getElementData(v, "logedin") then local current = getElementData(v, "skin"); if (getElementData(v, "htype") == "Bandit") then if (current == 179 or current == 287) then setElementModel(v, 288); elseif (current == 73) then setElementModel(v, 180); end elseif (getElementData(v, "humanity") == 5000) then if (current == 73 or current == 179 or current == 287) then setElementModel(v, 210); end else setElementModel(v, getElementData(v, "skin")); end end end end, 20000, 0); addCommandHandler("kickall", function(player) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Admin")) then for _,v in ipairs(getElementsByType("player")) do if (v ~= player) then kickPlayer(v, "#Hotfix!"); end end end end); addEventHandler("onPlayerCommand", root, function(cmd) if (cmd == "login" or cmd == "logout") then cancelEvent(); end end); addEventHandler("kickPlayerOnHighPing", root, function() kickPlayer(source, "Ping > 400!"); end); function funcBindHandsup(player, key, keyState) if (handsUp) then setPedAnimation(player, false); handsUp = false; else if (getElementData(player, "repairvehicle") == true) then return false; end if isPedInVehicle(player) then return false; end setPedAnimation(player, "BEACH", "ParkSit_M_loop", -1, true, false, false, false); handsUp = true; end end function funcBindSit(player, key, keyState) if (siting) then setPedAnimation(player, false); siting = false; else if (getElementData(player, "repairvehicle") == true) then return false; end if isPedInVehicle(player) then return false; end setPedAnimation(player, "SHOP", "SHP_Rob_HandsUp", -1, true, true, false, false); siting = true end end function funcBindLie(player, key, keyState) if (lying) then setPedAnimation(player, false); lying = false; else if (getElementData(player, "repairvehicle") == true) then return false; end if isPedInVehicle(player) then return false; end setPedAnimation(player, "WUZI", "CS_Dead_Guy", -1, true, false, false, true); lying = true; end end addEventHandler("relWep", resourceRoot, function() reloadPedWeapon(client); end); function changeWeather(weather) if (weather) then setWeather(weather); return; else setWeather(weatherTable[math.random(4)]); setTimer(changeWeather, (30*60000), 1); end end addEventHandler("onPlayerLogin", root, function() bindKey(source, ",", "down", funcBindHandsup); bindKey(source, ".", "down", funcBindSit); bindKey(source, "l", "down", funcBindLie); end); addEventHandler("onPlayerHideBody", root, function() local cCol = getElementData(source, "currentCol"); if (getElementData(source, "Bandage") >= 1) then if cCol then if getElementData(cCol, "deadman") then setElementData(source, "loot", false); setElementData(source, "Bandage", getElementData(source, "Bandage") - 1); setElementData(source, "currentCol", false); setTimer(function(cCol) if cCol then destroyElement(getElementData(cCol, "parent")); end destroyElement(cCol); end, 2000, 1, cCol); end end end end); function spawnDayZAnimals() for _,v in ipairs(animalsSpawns) do local ped = createPed(math.random(12, 14), v[1], v[2], v[3]); setElementData(ped, "animal", true); end end function destroyDeadAnimalAndRespawn(ped, pedCol, x, y, z) if (ped and pedCol) then destroyElement(ped); destroyElement(pedCol); local ped = createPed(math.random(12, 14), x, y, z); setElementData(ped, "animal", true); setPedAnimation(ped, "ped", "pikcup_box"); setElementSyncer(ped, getRandomPlayer()); end end addEventHandler("createDeadAnimal", root, function() local x,y,z = getElementPosition(source); local skin = getElementModel(source); local ped = createPed(skin, x, y, z); local pedCol = createColSphere(x, y, z, 1.5); killPed(ped); setElementData(pedCol, "parent", ped); setElementData(pedCol, "playername", "Animal"); setElementData(pedCol, "deadman", true); setElementData(pedCol, "MAX_Slots", 8); local time = getRealTime(); setElementData(pedCol, "deadreason", "This animal was killed around "..time.hour..":"..time.minute.." o'clock."); if (getElementModel(source) == 12) then setElementData(pedCol, "Raw Meat", math.random(8)); elseif (getElementModel(source) == 13) then setElementData(pedCol, "Raw Meat", math.random(4)); elseif (getElementModel(source) == 14) then setElementData(pedCol, "Raw Meat", math.random(2)); end destroyElement(source); setTimer(destroyDeadAnimalAndRespawn, 1800000, 1, ped, pedCol, x, y, z); end); addEventHandler("onPlayerQuit", root, function(quitType, reason) if not reason then outputChatBox("#FFFFFF"..getPlayerName(source):gsub("#%x%x%x%x%x%x", "").." #FF0000has left the server ["..quitType.."]", root, 255, 255, 255, true); else outputChatBox("#FFFFFF"..getPlayerName(source):gsub("#%x%x%x%x%x%x", "").." #FF0000has left the server [#FFFFFF"..quitType.."#FF0000, #FFFFFF"..reason.."#FF0000]", root, 255, 255, 255, true); end end); addEventHandler("onPlayerChangeNick", root, function(oldNick, newNick) outputChatBox("#FFFFFF"..oldNick:gsub("#%x%x%x%x%x%x", "").." #FF0000is now known as #FFFFFF"..newNick:gsub("#%x%x%x%x%x%x", ""), root, 255, 255, 255, true); end); addEventHandler("onPlayerJoin", root, function() setPlayerNametagShowing(source, false); outputChatBox("#FFFFFF"..getPlayerName(source):gsub("#%x%x%x%x%x%x", "").." #FF0000has joined the server!", root, 255, 255, 255, true); for i = 70, 79 do if (i ~= 73) then setPedStat(source, i, 999); end end end); addEventHandler("onPlayerLogin", root, function() triggerClientEvent("displayClientInfo", root, getPlayerName(source):gsub("#%x%x%x%x%x%x", "").." #FFFFFFhas logged in!", 255, 255, 255); setElementData(source, "clientdata", {getServerName(), getMaxPlayers()}); end); setTimer(function() for _,v in ipairs(getElementsByType("ped")) do if getElementData(v, "animal") then return; end if getElementData(v, "zombie") then if getElementData(v, "deadzombie") then return; end if isPedDead(v) then return; end local x,y,z = getElementPosition(v); local path = "sounds/mgroan"..math.random(1, 10)..".ogg"; triggerClientEvent("playPedSound", root, v, path, x, y, z); end end end, 5000, 0); spawnDayZAnimals(); changeWeather(7); -- '7' means you use the weather 7 delete it to make a random weather.
  10. addEventHandler("onElementDataChange", root, function(dataName, oldValue) if not oldValue then oldValue = 0; end if (getElementType(source) == "player") then if (dataName == "MAX_Slots") then local newValue = getElementData(source, dataName); removeBackpack(source); local x,y,z = getElementPosition(source); if (newValue == 12) then elementBackpack[source] = createObject(3026, x, y, z); -- Assault Pack (ACU) elseif (newValue == 16) then elementBackpack[source] = createObject(1248, x, y, z); -- Alice Pack elseif (newValue == 26) then elementBackpack[source] = createObject(1575, x, y, z); -- Czech Backpack elseif (newValue == 36) then elementBackpack[source] = createObject(1252, x, y, z); -- Coyote Backpack elseif (newValue == 44) then elementBackpack[source] = createObject(2734, x, y, z); -- Hunting Backpack elseif (newValue >= 58) then elementBackpack[source] = createObject(371, x, y, z); -- violet Backpack elseif (newValue == 8) then return; end if elementBackpack[source] then setElementData(source, "tohide2", elementBackpack[source]); if (newValue >= 58) then setObjectScale(elementBackpack[source], 0.95); end end if (newValue == 26) then attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180); else attachElementToBone(elementBackpack[source], source, 3, 0, -0.225, 0.05, 90, 0, 0); end @Patrik91 thats the code with backpacks
  11. Like i understand from this code if (newValue == 26) then attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180); else attachElementToBone(elementBackpack[source], source, 3, 0, -0.225, 0.05, 90, 0, 0); end change in this ? if (newValue == 26) then attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180); elseif (newValue == YOURBACKPACKSIZE) then -- Theese are the positions that you need to change. Just play around with them attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180); else attachElementToBone(elementBackpack[source], source, 3, 0, -0.225, 0.05, 90, 0, 0); end @Fist
  12. i dont need change position i just want that model would look little big bigger @Fist
  13. thank it worked now i see where i was wrong but i have 1 more question. @Fist I want ask how i can make little bigger backpack ? because its looks small on the back
  14. thats the point i already have done this but idk whats wrong because on hunting backpack shows coyote model elseif (newValue == 16) then elementBackpack[source] = createObject(1248, x, y, z); -- Alice Pack elseif (newValue == 26) then elementBackpack[source] = createObject(1575, x, y, z); -- Czech Backpack elseif (newValue >= 36) then elementBackpack[source] = createObject(1252, x, y, z); -- Coyote Backpack elseif (newValue >= 44) then elementBackpack[source] = createObject(371, x, y, z); -- Hunting Backpack thats how looks
  15. Hi guys i added a backpack in server and it shows the same model as coyote when i wear but when i drop shows the model which one i want can someone help to fix it ? i use 0.7 Tekken version This is look when i wear And this is the model that i put it on new backpack when i drop it shows but when i wear shows different model
  16. Hello guys i have problem with custom vehicle spawn. Also i set spawn position but it wont spawn only spawns original cars without custom. And also i can only spawn with /spawn script and the custom car works perfecty but it wont spawn in position where i set in files. Can someone help me please to fix this problem
  17. Hello I want ask can someone help me to add new cars in mta dayz cuz i try but it doesnt spawn that car and i dont know if it works I want add hustler i set spawn position but it doesnt work vehicles.lua local vehicleSpawns = { --[[Maverick]] {487, -1185.9775390625,26.4111328125,14.1484375}, {487, -1724.5830078125,2559.3544921875,104.09127807617}, {487, 615.744140625,850.1572265625,-43.009014129639}, {487, 232.5283203125,1950.3583984375,17.640625}, {487, -1050.5859375,1968.033203125,120.66523742676}, {487, 2821.03515625,2809.6689453125,10.8203125}, {487, 1949.9912109375,-2631.44140625,13.546875}, {487, -756.53979492188,-2137.5471191406,26.463499069214}, --[[Patriot]] {470, -1473.5791015625,320.2294921875,7.1875}, {470, -1373.998046875,460.62109375,7.1875}, {470, 419.150390625,2186.087890625,39.499450683594}, {470, 2821.1796875,793.4658203125,10.8984375}, --[[bobcat]] {422, -2479.6240234375,2223.6669921875,4.84375}, {422, -92.9951171875,2823.0908203125,76.721649169922}, {422, -2448.99609375,-1335.8662109375,310.97662353516}, {422, -173.2470703125,-2635.5341796875,26.608192443848}, {422, 2108.447265625,-1600.916015625,13.552597045898}, {422, 2452.7392578125,1607.9833984375,10.8203125}, {422, -1800.8984375,-1950.9736328125,93.561332702637}, --[[sanchez]] {468, -812.470703125,-2629.912109375,90.105056762695}, {468, -1729.8525390625,-1940.3154296875,99.840209960938}, {468, -2130.90234375,178.4375,35.257678985596}, {468, -2656.7333984375,1352.4873046875,7.0596733093262}, {468, -1598.302734375,2694.947265625,55.07092666626}, {468, -809.96484375,2430.037109375,156.97012329102}, {468, 2920.38671875,2486.0087890625,10.8203125}, {468, 505.732421875,-291.8681640625,20.00952911377}, {468, -428.8828125,-694.8310546875,19.14847946167}, {468, 1190.41015625,-2109.0341796875,64.738548278809}, {468, 1658.9716796875,-1069.0224609375,23.906229019165}, --[[barracks]] {433, 86.486328125,1950.9013671875,17.846803665161}, {433, 440.185546875,1464.173828125,6.3338670730591}, --[[Coach]] {437, -1971.4619140625,97.4658203125,27.6875}, {437, 1735.8720703125,1429.0693359375,10.797702789307}, {437, 2797.1318359375,-1868.8359375,9.8603811264038}, {437, 1941.900390625,1975.1904296875,7.59375}, --[[Reefer]] {453, 2463.3984375,-2719.638671875,-0.55000001192093}, {453, -1577.4873046875,182.353515625,-0.53995263576508}, {453, -806.80859375,2233.7001953125,40.049976348877}, {453, -127.4453125,-779.6923828125,-0.55000001192093}, --[[bike]] {509, 194.685546875,-120.2333984375,1.5497757196426}, {509, 173.0146484375,-95.0634765625,1.5516006946564}, {509, 2369.9599609375,29.712890625,28.0416431427}, {509, 710.87109375,-566.7548828125,16.3359375}, {509, 1109.6025390625,-1667.6689453125,13.615442276001}, {509, 2014.6689453125,-1113.4013671875,26.203125}, {509, 2447.41015625,-1967.1845703125,13.546875}, {509, 2633.7236328125,1835.291015625,11.0234375}, {509, 1489.3974609375,2681.54296875,10.8203125}, {509, -2428.5654296875,2280.875,4.984375}, {509, -2501.0869140625,2224.880859375,4.9861993789673}, {509, -2142.8515625,-2457.84765625,30.625}, {509, -2456.078125,-141.115234375,26.112222671509}, {509, -1881.4453125,954.3837890625,35.171875}, --[[Police Maverick]] {497, -1495.888671875,-2691.40234375,57.325229644775}, {497, -2688.42578125,1471.634765625,7.1875}, {497, -1534.28125,2842.9482421875,97.463409423828}, {497, 2221.8583984375,-1344.396484375,23.984273910522}, --[[Hustler- This car which i want add]] {545, 0,0,3}, }; local hospitalPacks = { {-2670.87890625,636.8984375,14.453125}, {-2637.0556640625,635.03125,14.453125}, {-1515.669921875,2519.166015625,56.0703125}, {-1513.888671875,2519.5908203125,56.064819335938}, {-1528.8955078125,2516.724609375,55.986171722412}, {2022.1650390625,-1402.6806640625,17.18045425415}, {2042.7001953125,-1409.4775390625,17.1640625}, {-316.5478515625,1051.6494140625,20.340259552002}, {-337.9541015625,1049.490234375,19.739168167114}, {-331.5849609375,1046.037109375,26.012474060059}, {-307.0419921875,1045.27734375,26.012474060059}, {1171.490234375,-1310.560546875,13.986573219299}, {1171.609375,-1306.556640625,13.996350288391}, {1158.5048828125,-1326.333984375,31.503561019897}, {1159.80078125,-1323.9013671875,31.498970031738}, {1238.7119140625,328.2431640625,19.7555103302}, {1229.365234375,311.1435546875,24.7578125}, {-2204.07421875,-2309.58203125,31.375}, {1615.939453125,1818.0537109375,10.8203125}, {1601.9443359375,1816.736328125,10.8203125}, {1590.0166015625,1792.0234375,30.46875}, {1607.3232421875,1776.7412109375,37.3125}, {2107.7626953125,926.16015625,10.8203125}, {2116.12890625,925.7705078125,10.9609375}, {2122.1865234375,925.3193359375,10.8203125}, }; local patrolPoints = { {-1603.2197265625,-2712.736328125,48.9453125}, {2465.748046875,-2215.55859375,13.546875}, {2473.439453125,-2215.56640625,13.546875}, {2480.0732421875,-2216.140625,13.546875}, {2487.24609375,-2215.5966796875,13.546875}, {2494.1005859375,-2215.5859375,13.546875}, {-1686.6728515625,408.9970703125,7.3984375}, {-1682.34375,412.9384765625,7.3984375}, {-1680.0263671875,402.3642578125,7.3984375}, {-1675.84375,406.4677734375,7.3984375}, {-1670.5615234375,411.8359375,7.3984375}, {-1666.2392578125,416.2509765625,7.3984375}, {-1672.7939453125,422.81640625,7.3984375}, {-1677.20703125,418.46484375,7.3984375}, {-2410.7021484375,969.9091796875,45.4609375}, {-2410.744140625,975.220703125,45.4609375}, {-2410.837890625,980.5302734375,45.4609375}, {-1329.3046875,2668.5126953125,50.46875}, {-1328.7314453125,2673.90625,50.0625}, {-1327.0185546875,2679.3876953125,50.46875}, {-1327.3798828125,2684.62890625,50.0625}, {1940.7099609375,-1778.5244140625,13.390598297119}, {1940.6552734375,-1774.908203125,13.390598297119}, {1940.630859375,-1771.728515625,13.390598297119}, {1940.7080078125,-1767.3837890625,13.390598297119}, {-1477.921875,1868.138671875,32.639846801758}, {-1466.1552734375,1869.0048828125,32.6328125}, {-1464.5224609375,1861.3828125,32.639846801758}, {-1477.4599609375,1860.5205078125,32.6328125}, {-735.9208984375,2744.0087890625,47.2265625}, {-739.0439453125,2744.2421875,47.165451049805}, {377.6953125,2601.1083984375,16.484375}, {624.5263671875,1676.25390625,6.9921875}, {620.2958984375,1681.2431640625,6.9921875}, {616.248046875,1686.4169921875,7.1875}, {612.783203125,1691.1650390625,7.1875}, {609.2060546875,1696.201171875,7.1875}, {605.8505859375,1700.978515625,7.1875}, {602.27734375,1706.3603515625,7.1875}, {2141.037109375,2742.734375,10.960174560547}, {2142.3115234375,2752.6982421875,10.96019744873}, {2147.9521484375,2752.3203125,10.8203125}, {2152.60546875,2751.953125,10.8203125}, {2152.984375,2743.85546875,10.8203125}, {2147.75,2743.7392578125,10.8203125}, {-97.6298828125,-1175.0283203125,2.4990689754486}, {-90.74609375,-1177.853515625,2.2021217346191}, {-84.75390625,-1163.853515625,2.3359375}, {-91.5771484375,-1160.5732421875,2.4453125}, {-1606.525390625,-2717.2138671875,48.9453125}, {-1609.7109375,-2721.544921875,48.9453125}, {-1599.83203125,-2708.302734375,48.9453125}, {-2246.314453125,-2558.8212890625,32.0703125}, {-2241.3125,-2561.3662109375,32.0703125}, {-1132.2880859375,-135.0986328125,14.14396572113}, {-1153.529296875,-156.373046875,14.1484375}, {-1142.826171875,-145.67578125,14.14396572113}, {655.611328125,-557.9912109375,16.501491546631}, {655.6572265625,-572.1728515625,16.501491546631}, {1601.791015625,2203.90625,11.060997009277}, {1596.806640625,2203.4345703125,10.8203125}, {1590.197265625,2203.4853515625,10.8203125}, {1589.4775390625,2195.43359375,10.8203125}, {1596.125,2194.294921875,10.8203125}, {1601.6591796875,2194.3369140625,10.8203125}, {2206.8466796875,2470.47265625,10.8203125}, {2206.94140625,2474.75,10.8203125}, {2206.9267578125,2478.86328125,10.8203125}, {2198.06640625,2480.6953125,10.8203125}, {2197.541015625,2475.791015625,10.995170593262}, {2197.609375,2471.9169921875,10.995170593262}, {2120.8251953125,915.4833984375,10.8203125}, {2115.1181640625,915.44140625,10.8203125}, {2109.076171875,915.4228515625,10.8203125}, {2109.22265625,924.8779296875,10.9609375}, {2114.9404296875,924.8857421875,10.9609375}, {2119.5126953125,925.2861328125,10.9609375}, {2645.7197265625,1112.7802734375,10.8203125}, {2639.984375,1112.56640625,10.8203125}, {2634.828125,1112.3466796875,10.9609375}, {2634.1826171875,1101.9482421875,10.8203125}, {2636.7509765625,1101.6748046875,10.8203125}, {2643.5126953125,1101.81640625,10.8203125}, {2209.576171875,2469.8251953125,10.8203125}, {2208.8310546875,2475.09375,10.8203125}, {1005.078125,-901.7490234375,42.216625213623}, {993.025390625,-902.474609375,42.222496032715}, }; local heliCrashSites = { {-1360.0478515625,-1070.7314453125,160.4069519043}, {-421.4619140625,-1284.4345703125,33.740924835205}, {-2357.654296875,-1634.3623046875,483.703125}, {979.0849609375,160.59375,28.935249328613}, {-2057.2294921875,2781.73828125,163.12780761719}, {826.90234375,2803.6259765625,74.863929748535}, {2577.7060546875,-650.541015625,136.37449645996}, }; local lootItems = { ["helicrashsides"] = { {"Night Vision Goggles",368,1,90,10}, {"M136 Rocket Launcher",359,1,90,0}, {"Heat-Seeking RPG",360,1,90,0}, {"Box of Matches",328,0.4,90,2}, {"M1911",346,1,90,10}, {"M9 SD",347,1,90,7}, {"Winchester 1866",349,1,90,6}, {"PDW",352,1,90,5.5}, {"Hunting Knife",335,1,90,4}, {"Hatchet",339,1,90,3}, {"Pizza",1582,1,0,2}, {"Soda Bottle",2647,1,0,2}, {"Empty Gas Canister",1650,1,0,2}, {"Roadflare",324,1,90,2}, {"Milk",2856,1,0,1}, {"Painkiller",2709,0.5,0,4}, {"Empty Soda Cans",2673,0.5,0,2}, {"Scruffy Burgers",2675,0.5,0,3}, {"Grenade",342,1,0,4}, {"Parachute",342,1,0,80}, {"Sawn-Off Shotgun",350,1,90,5}, {"SPAZ-12 Combat Shotgun",351,1,90,4}, {"MP5A5",353,1,90,6}, {"Watch",2710,1,0,4}, {"Heat Pack",1576,1,0,3}, {"Wire Fence",933,0.25,0,1}, {"Lee Enfield",357,1,90,6}, {"Alice Pack",3026,1,0,4}, {"Night Vision Goggles",368,1,90,1.5}, {"Tire",1073,1,0,2}, {"Morphine",1579,1,0,4}, {"Camouflage Clothing",1577,1,0,4.5}, {"Civilian Clothing",1577,1,0,3}, {"AK-47",355,1,90,7}, {"GPS",2976,0.15,0,3}, {"Map",1277,0.8,90,7}, {"Toolbox",2969,0.5,0,1}, {"Engine",929,0.3,0,2}, {"Tent",1279,1,0,4.5}, {"Ghillie Suit",1577,1,0,0.5}, {"M4",356,1,90,1}, {"CZ 550",358,1,90,1.5}, {"Infrared Goggles",369,1,90,3}, {"Assault Pack (ACU)",3026,0.5,0,5}, {"Coyote Backpack",3026,1.3,0,2}, }, ["hospital"] = { {"Medic Kit",2891,0.7,0}, {"Heat Pack",1576,1,0}, {"Bandage",1578,0.5,0}, {"Blood Bag",1580,1,0},
  18. Hello guys im looking for mta dm race script is there shared one or something ?
  19. Hello guys i have problem with mta dayz skins. I added new skins everything work perfectly but when i try to drop on the floor it disappears but its works when i put in cars its not disappears but like i told u it disappears when i drop on floor
  20. yes but i add 3 more backpacks and 2 of them work perfect but last one not the biggest one
  21. Now it works perfect but now another like coyote has same problem when i change maybe its just cuz of that backpack mod?
  22. I will give all code of backpack create object if newValue == 12 then elementBackpack[source] = createObject(3026, x, y, z) elseif newValue == 16 then elementBackpack[source] = createObject(1248, x, y, z) elseif newValue == 26 then elementBackpack[source] = createObject(1575, x, y, z) elseif newValue == 36 then elementBackpack[source] = createObject(1252, x, y, z) elseif newValue == 40 then elementBackpack[source] = createObject(364, x, y, z) elseif newValue == 52 then elementBackpack[source] = createObject(1636, x, y, z) elseif newValue == 64 then elementBackpack[source] = createObject(363, x, y, z ,) elseif newValue == 8 then return end if newValue == 26 then attachElementToBone(elementBackpack[source], source, 3, 0, -0.16, 0.05, 270, 0, 180) else attachElementToBone(elementBackpack[source], source, 3, 0, -0.225, 0.05, 90, 0, 0) end end end
×
×
  • Create New...