Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function createHeliCrashSite()
- if isElement(cargoCol) then
- destroyElement(getElementData(cargoCol,"parent"));
- destroyElement(cargoCol);
- end
- local nr = math.random(7);
- local x,y,z = heliCrashSites[nr][1], heliCrashSites[nr][2], heliCrashSites[nr][3];
- blipo = createBlip (x,y,z,48)
- function blipoo()
- destroyElement (blipo)
- end
- setTimer(blipoo, 3600000 ,1)
- outputChatBox ("[CLASSIC DAYZ]Helicrash he crashed on the map, in a helicopter is a lot of weapons.",getRootElement(),255,255,255,true)
- cargobob = createVehicle(548, x, y, z);
- setElementHealth(cargobob, 0);
- setElementFrozen(cargobob, true);
- cargoCol = createColSphere(x, y, z, 5);
- setElementData(cargoCol, "parent", cargobob);
- setElementData(cargoCol, "helicrash", true);
- setElementData(cargoCol, "MAX_Slots", 0);
- for _,v in ipairs(lootItems["helicrashsides"]) do
- local value = math.percentChance(v[5]*3.5, math.random(1, 5));
- setElementData(cargoCol, v[1], value);
- local ammoData,_ = getWeaponAmmoType(v[1], true);
- if (ammoData and value > 0) then
- setElementData(cargoCol, ammoData, math.random(1, 5));
- end
- end
- setTimer(createHeliCrashSite, 3600000, 1);
- end
- createHeliCrashSite()
Advertisement
Add Comment
Please, Sign In to add comment