local koszt = 5 -- tutaj ustawiamy koszt za uleczonego gracza.
-- Leczenie sprayem
addEventHandler("onClientPlayerDamage", root, function(attacker, weapon)
if getElementData(el,"player:faction") ~= 6 then
if weapon == 41 then cancelEvent() end -- blokujemy zabijanie
if weapon == 41 and attacker then -- sprawdzamy bro?
local hp = getElementHealth(localPlayer) -- pobieramy hp
local health = hp+math.random(2,3) -- losujemy ilo?c hp
if health > hp and health <= 100 then -- sprawdza hp
setElementHealth(localPlayer, health) -- ulecza gracza
if health > 80 then triggerServerEvent("givePlayerMoney", attacker, koszt) end -- otrzymuje kas?
end
end
end
end)