A stworzy?e? grup? respawn i acl respawn i doda?e? tam ludzi?
Tu je?eli ci pomo?e masz ca?? funkcje
function spawnVehiclePack(ps, cmd)
if getElementData(ps, "Admin") then
spawnDayZVehicles()
outputChatBox("Vehicles have been respawned!", ps, 255, 0, 0, true)
end
end
addCommandHandler("svp", spawnVehiclePack)
function notifyAboutExplosion()
local col = getElementData(source, "parent")
local x1, y1, z1 = getElementPosition(source)
id, x, y, z = getElementData(col, "spawn")[1], getElementData(col, "spawn")[2], getElementData(col, "spawn")[3], getElementData(col, "spawn")[4]
setTimer(respawnDayZVehicle, 1800000, 1, id, x, y, z, source, col, getElementData(col, "MAX_Slots"))
setElementData(col, "deadVehicle", true)
setElementData(source, "isExploded", true)
createExplosion(x1 + 4, y1 + 1, z1, 4)
createExplosion(x1 + 2, y1 - 4, z1, 4)
createExplosion(x1 - 1, y1 + 5, z1, 4)
createExplosion(x1 - 4, y1, z1 - 2, 4)
end
addEventHandler("onVehicleExplode", getRootElement(), notifyAboutExplosion)
function respawnVehiclesInWater(vehiclesInWater)
for i, veh in ipairs(vehiclesInWater) do
if getElementModel(veh) == 453 then
break
end
local col = getElementData(veh, "parent")
id, x, y, z = getElementData(col, "spawn")[1], getElementData(col, "spawn")[2], getElementData(col, "spawn")[3], getElementData(col, "spawn")[4]
respawnDayZVehicle(id, x, y, z, veh, col, getElementData(col, "MAX_Slots"))
end
end
addEvent("respawnVehiclesInWater", true)
addEventHandler("respawnVehiclesInWater", getRootElement(), respawnVehiclesInWater)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach