Cze?? mam taki kodzik i chcia?bym aby przy nadawa?o gr?b w 1 funkcji a w 2 usuwa?o - Kombinowa?em tutaj ale wtedy jak 2 graczy mia?o bw to mog?em uleczy? tylko 1 ;/
[lua]addEventHandler("onClientPlayerWasted", getRootElement(),
function(killer, weapon, bodypart)
if(source == getLocalPlayer()) then
local abs=getElementData(source,"abseiling")
if abs and abs~="" then
return
end
local bwSeconds = 10
if bodypart == 9 then -- g?owa
bwSeconds = (10 * 60)
elseif bodypart == 9 then -- ty?ek
bwSeconds = (2 * 60)
elseif tonumber(bodypart) and (tonumber(bodypart) >= 5 and tonumber(bodypart) <= 8) then -- ko?czyny
bwSeconds = (5 * 60)
elseif bodypart == 3 then -- klatka piersiowa
bwSeconds = (5 * 60)
else
bwSeconds = (5 * 60)
end
setElementData(getLocalPlayer(), "bwEndTime", getTickCount()+(bwSeconds * 1000))
triggerEvent("onGUIOptionChange", getRootElement(), "grayscale", true)
addEventHandler("onClientRender", getRootElement(), bwUpdate)
fadeCamera ( false, 1.0, 0, 0, 0 )
setTimer ( fadeCamera, 2000, 1, true, 0.5 )
triggerServerEvent("bw:zacznij",localPlayer)
death.heartBeat = playSound("audio/heartbeat.mp3", true)
end
end
)
addEvent("onBwFinish", true)
addEventHandler("onBwFinish", getRootElement(),
function()
setCameraTarget(getLoca... |