Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function createHeliCrashSite()
- if cargoCol then
- if cargobob1 then destroyElement(cargobob1) end
- destroyElement(getElementData(cargoCol,"blip")) -----tutaj błąd!!!!!!!
- destroyElement(getElementData(cargoCol,"parent"))
- destroyElement(cargoCol)
- end
- local item_id = math.random(table.size(heliCrashSites))
- local x,y,z = heliCrashSites[item_id][1],heliCrashSites[item_id][2],heliCrashSites[item_id][3]
- cargobob = createVehicle(548,x,y,z,nil,nil,nil)
- cargobob1 = createBlip(x,y,z,48)
- setElementData(cargoCol,"blip",cargobob1) -------tutaj błąd!!!!!!
- blowVehicle(cargobob)
- setElementFrozen(cargobob,true)
- setVehicleLocked(cargobob,true)
- cargoCol = createColSphere(x,y,z,3)
- setElementData(cargoCol,"parent",cargobob)
- setElementData(cargoCol,"helicrash",true)
- setElementData(cargoCol,"MAX_Slots",100)
- for i, item in ipairs(lootItems["helicrashsides"]) do
- local value = math.percentChance (item[5]*3.5,math.random(1,2))
- setElementData(cargoCol,item[1],value)
- --weapon Ammo
- local ammoData,weapID = getWeaponAmmoType (item[1],true)
- if ammoData and value > 0 then
- setElementData(cargoCol,ammoData,math.random(1,2))
- end
- end
- outputChatBox ( "[CLASSIC DAYZ]Helicrash he crashed on the map, in a helicopter is a lot of weapons.", getRootElement(), 255, 0, 0, true )
- setTimer(createHeliCrashSite,2700000,1)
- end
- createHeliCrashSite()
Advertisement
Add Comment
Please, Sign In to add comment