Bom, atualmente estou montando um serve e nele, coloquei um reset system que funciona normalmente, mas porém, está sem look. Eu queria saber se alguem pode me ajudar a colocar o look nele, obrigado
O reset system que uso é esse:
local config = {
backToLevel = 1000,
redskull = true, -- need to be without redskull to reset?
battle = true, -- need to be without battle to reset?
pz = true, -- need to be in protect zone to reset?
stages = {
{resets = 4, level = 300000, premium = 300000},
{resets = 9, level = 300000, premium = 300000},
{resets = 14, level = 300000, premium = 300000},
{resets = 19, level = 300000, premium = 300000},
{resets = 24, level = 300000, premium = 300000},
{resets = 29, level = 300000, premium = 300000},
{resets = 34, level = 300000, premium = 300000},
{resets = 39, level = 300000, premium = 300000},
{resets = 44, level = 300000, premium = 300000},
{resets = 49, level = 300000, premium = 300000},
{resets = 54, level = 300000, premium = 300000},
{resets = 59, level = 300000, premium = 300000},
{resets = 64, level = 300000, premium = 300000},
{resets = 69, level = 300000, premium = 300000},
{resets = 74, level = 300000, premium = 300000},
{resets = 79, level = 300000, premium = 300000},
{resets = 84, level = 300000, premium = 300000},
{resets = 89, level = 300000, premium = 300000},
{resets = 94, level = 300000, premium = 300000},
{resets = 2^1024, level = 300000, premium = 300000}
}
}
function onSay(cid, words, param)
local function getPlayerResets(cid)
local resets = getPlayerStorageValue(cid, 500)
return resets < 0 and 0 or resets
end
local function doPlayerAddResets(cid, count)
setPlayerStorageValue(cid, 500, getPlayerResets(cid) + count)
end
if config.redskull and getCreatureSkullType(cid) == 4 then
return doPlayerSendCancel(cid, "You need to be without red skull to reset.")
elseif config.pz and not getTilePzInfo(getCreaturePosition(cid)) then
return doPlayerSendCancel(cid, "You need to be in protection zone to reset.")
elseif config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then
return doPlayerSendCancel(cid, "You need to be without battle to reset.")
end
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
resets = getPlayerStorageValue(thing.uid, 500)+1
doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. resets .."]")
end
return true
end
local resetLevel = 0
for x, y in ipairs(config.stages) do
if getPlayerResets(cid) <= y.resets then
resetLevel = isPremium(cid) and y.premium or y.level
break
end
end
if getPlayerLevel(cid) < resetLevel then
return doPlayerSendCancel(cid, "You need level " .. resetLevel .. " or more to reset.")
end
doPlayerAddResets(cid, 1)
local healthMax, manaMax = getCreatureMaxHealth(cid), getCreatureMaxMana(cid)
doPlayerAddLevel(cid, -(getPlayerLevel(cid) - config.backToLevel))
setCreatureMaxHealth(cid, healthMax)
setCreatureMaxMana(cid, manaMax)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Now you have " .. getPlayerResets(cid) .. " " .. (getPlayerResets(cid) == 1 and "reset" or "resets") .. ".")
return true
end