Blade33711
Member
I have script:
local function b(cid)
local health = getCreatureMaxHealth(cid)
if isPlayer(cid) then
setCreatureMaxHealth(cid, health+(health/100*config.hppercent))
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local hp = getCreatureMaxHealth(cid)
if((config.yourself and itemEx.uid == cid) or not config.yourself) then
addEvent(b, 1, cid)
addEvent(setCreatureMaxHealth, 60000, cid, hp)
end
return true
end
It add +15% hp but after relog i got error: creature not found
How repair it?
local function b(cid)
local health = getCreatureMaxHealth(cid)
if isPlayer(cid) then
setCreatureMaxHealth(cid, health+(health/100*config.hppercent))
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local hp = getCreatureMaxHealth(cid)
if((config.yourself and itemEx.uid == cid) or not config.yourself) then
addEvent(b, 1, cid)
addEvent(setCreatureMaxHealth, 60000, cid, hp)
end
return true
end
It add +15% hp but after relog i got error: creature not found
How repair it?
Last edited: