Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: łokieć
1. Leczenie sprayem, łokieć
Witam, posiadam kod splita na leczenie sprayem, odkry?em bug ?e je?li medyk jest za blisko gracza, mo?e po prostu bi? go ramieniem i otrzymywa? ca?y czas pieni?dze za ka?de uderzenie.
Client:
local koszt -- tutaj ustawiamy koszt za uleczonego gracza.

-- 
Leczenie sprayem
addEventHandler
("onClientPlayerDamage"root, function(attackerweapon)
    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
(localPlayerhealth) -- ulecza gracza
                
if health 80 then triggerServerEvent("givePlayerMoney"attackerkosztend -- otrzymuje kas?
            
end    
        end
    end
end
)

Za pomoc b?d? piffka