hello
im using this script as a skull system configuration in my server
the problem is when player dies or logout he lost his skull
anyone knows how i can fix that ?
im using this script as a skull system configuration in my server
Code:
local storage = 9000
function onKill(cid, target, lastHit)
if isPlayer(target) and cid ~= target then
local frags = math.max(0, getCreatureStorage(cid, storage)) + 1
setPlayerStorageValue(cid, storage, frags)
if frags >= 50 then
doCreatureSetSkullType(cid, SKULL_GREEN)
elseif frags >= 100 then
doCreatureSetSkullType(cid, SKULL_WHITE)
elseif frags >= 200 then
doCreatureSetSkullType(cid, SKULL_YELLOW)
elseif frags >= 400 then
doCreatureSetSkullType(cid, SKULL_RED)
elseif frags >= 500 then
doCreatureSetSkullType(cid, SKULL_BLACK)
end
end
return true
end
the problem is when player dies or logout he lost his skull
anyone knows how i can fix that ?