Witam znalaz?em taki skrypt na to ?e bez wyznaczonego skina zabija gracza lecz gdy ma si? wyznaczony skin (skin o ID 18) i tak zabija a ma nie zabija?. Dodam ?e to jest skrypt do gamemoda DayZ.
Kodzik:
[lua]cuboid = createColCuboid (-1994.9669,614.15338,-35.015625, 92, 110, 450)
Infection_TIMER = { }
Infection_ID = "18"
function target(element, dim)
if dim == true then
setTimer(target2, 5000, 1, element, dim)
outputChatBox("Masz 5 sekund inaczej umrzesz od wysokiej infekcji!", element)
end
end
addEventHandler("onColShapeHit", cuboid, target)
addEventHandler("onColShapeLeave", cuboid, function(element, dim)
local gracz = (getElementType(element) == "player" and element or getVehicleController(element))
if isTimer(Infection_TIMER[element]) then killTimer(Infection_TIMER[element]) end
end)
function Infection_killIntruder(p)
setElementData(p, "blood", -20)
setTimer(target2, 100, 1, p, true)
end
function target2(element, dim)
if isElementWithinColShape(element, cuboid) then
if getElementType(element) == "player" then
gracz = element
if getElementData(gracz, "skin") ~= Infection_ID then
Infection_TIMER[element] = setTimer(Infection_killIntruder, 150, 1, gracz)
... |