Wysłany: 2015-02-15, 20:07
Quin
Wiek: 25 Na forum: 4537 dni Posty: 79
Piwa : 3
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:
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 )
end
end
end
end
Ostatnio zmieniony przez Quin 2015-02-16, 10:22, w całości zmieniany 1 raz
Wysłany: 2015-02-16, 06:10
dudeks
Wiek: 31 Na forum: 6576 dni Posty: 171
Piwa : 89
cuboid = createColSphere ( 1601.8708496094 , - 1599.3356933594 , - 17.837776184082 , 30 , 50 , 50 )
ZL_TIMER = { }
ZL_NAME = "PolskaLiga"
function target ( element , dim )
if dim == true then
setTimer ( target2 , 5000 , 1 , element , dim )
end
end
addEventHandler ( "onColShapeHit" , cuboid , target )
addEventHandler ( "onColShapeLeave" , cuboid , function( element , dim )
local gracz = ( getElementType ( element ) == "player" and element or getVehicleController ( element ))
if isTimer ( ZL_TIMER [ element ]) then killTimer ( ZL_TIMER [ element ]) end
end )
function ZL_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 , "gang" ) ~= ZL_NAME then
ZL_TIMER [ element ] = setTimer ( ZL_killIntruder , 150 , 1 , gracz )
end
end
end
end
Zesra?e?, a nie napisa?e?. Dziwnie podobne, nie? Chyba do niczego innego, ni? zmienienia 'ZL' na 'Infection' nie wykorzysta?e? swojej klawiatury
A co do Twojego problemu, "18" to nie to samo co 18.
Tagi: zabija :: się :: wymagany :: skin
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: