Nelsonnn

Untitled

Oct 24th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.51 KB | None | 0 0
  1. function createHeliCrashSite()
  2.     if cargoCol then
  3.     if cargobob1 then destroyElement(cargobob1) end
  4.         destroyElement(getElementData(cargoCol,"blip"))  -----tutaj błąd!!!!!!!
  5.         destroyElement(getElementData(cargoCol,"parent"))
  6.         destroyElement(cargoCol)
  7.     end
  8.     local item_id = math.random(table.size(heliCrashSites))
  9.     local x,y,z = heliCrashSites[item_id][1],heliCrashSites[item_id][2],heliCrashSites[item_id][3]
  10.     cargobob = createVehicle(548,x,y,z,nil,nil,nil)
  11.     cargobob1 = createBlip(x,y,z,48)
  12.     setElementData(cargoCol,"blip",cargobob1)  -------tutaj błąd!!!!!!
  13.     blowVehicle(cargobob)
  14.     setElementFrozen(cargobob,true)
  15.     setVehicleLocked(cargobob,true)
  16.     cargoCol = createColSphere(x,y,z,3)
  17.     setElementData(cargoCol,"parent",cargobob)
  18.     setElementData(cargoCol,"helicrash",true)
  19.     setElementData(cargoCol,"MAX_Slots",100)
  20.         for i, item in ipairs(lootItems["helicrashsides"]) do
  21.             local value =  math.percentChance (item[5]*3.5,math.random(1,2))
  22.             setElementData(cargoCol,item[1],value)
  23.             --weapon Ammo
  24.             local ammoData,weapID = getWeaponAmmoType (item[1],true)
  25.             if ammoData and value > 0 then
  26.                 setElementData(cargoCol,ammoData,math.random(1,2))
  27.             end
  28.         end
  29.     outputChatBox ( "[CLASSIC DAYZ]Helicrash he crashed on the map, in a helicopter is a lot of weapons.", getRootElement(), 255, 0, 0, true )
  30.     setTimer(createHeliCrashSite,2700000,1)
  31. end
  32. createHeliCrashSite()
Advertisement
Add Comment
Please, Sign In to add comment