function addHealth(el,value)
local hp=getElementHealth(el, value)
setElementHealth(el, tonumber(hp)+tonumber(value))
if tonumber(hp) >= 100 then setElementHealth(hp, 100) end
end
To dlaczego ?ycie normalnie dodaje, ale jesli wlasnie jest powyzej 100, to mi nie ustawia na 100 ;/
[ Dodano: 2018-07-28, 19:18 ]
Dobra niewa?ne, poradzi?em sobie.
Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507
function addHealth(el,value)
local hp=getElementHealth(el)
setElementHealth(el, tonumber(hp)+tonumber(value))
local hp=getElementHealth(el) -- ponowne sprawdzenie w celu sprawdzenia warto?ci po dodaniu.
if tonumber(hp) > 100 then setElementHealth(hp, 100) end
end
Podpis
Ostatnio zmieniony przez OchIAch 2018-07-28, 19:19, w całości zmieniany 1 raz
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach