• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Addons level not working

Way20

Well-Known Member
Joined
Sep 29, 2014
Messages
227
Solutions
3
Reaction score
91
Well, I have a script that should give addons at after each 5 levels, I receive a mensagem (configured in script) but I don't receive the addon, I don't know what is wrong in this script, someone that know about LUA can help me with it? Here is the code.

Code:
local female_outfits = {
    [135] = {outfit = 136, storage = 10136},
    [140] = {outfit = 137, storage = 10137},
    [145] = {outfit = 138, storage = 10138},
    [150] = {outfit = 139, storage = 10139},
    [155] = {outfit = 140, storage = 10140},
    [160] = {outfit = 141, storage = 10141},
    [165] = {outfit = 142, storage = 10142},
    [170] = {outfit = 147, storage = 10147},
    [175] = {outfit = 148, storage = 10148},
    [180] = {outfit = 149, storage = 10149},
    [185] = {outfit = 150, storage = 10150},
    [190] = {outfit = 155, storage = 10155},
    [195] = {outfit = 156, storage = 10156},
    [200] = {outfit = 157, storage = 10157},
    [205] = {outfit = 158, storage = 10158},
    [210] = {outfit = 252, storage = 10252},
    [215] = {outfit = 269, storage = 10269},
    [220] = {outfit = 270, storage = 10270},
    [225] = {outfit = 279, storage = 10279},
    [230] = {outfit = 288, storage = 10288},
    [235] = {outfit = 324, storage = 10324},
    [240] = {outfit = 336, storage = 10336},
    [245] = {outfit = 366, storage = 10366},
}

local male_outfits = {
    [135] = {outfit = 128, storage = 10128},
    [140] = {outfit = 129, storage = 10129},
    [145] = {outfit = 130, storage = 10130},
    [150] = {outfit = 131, storage = 10131},
    [155] = {outfit = 132, storage = 10132},
    [160] = {outfit = 133, storage = 10133},
    [165] = {outfit = 134, storage = 10134},
    [170] = {outfit = 143, storage = 10143},
    [175] = {outfit = 144, storage = 10144},
    [180] = {outfit = 145, storage = 10145},
    [185] = {outfit = 146, storage = 10146},
    [190] = {outfit = 151, storage = 10151},
    [195] = {outfit = 152, storage = 10152},
    [200] = {outfit = 153, storage = 10153},
    [205] = {outfit = 154, storage = 10154},
    [210] = {outfit = 251, storage = 10251},
    [215] = {outfit = 268, storage = 10268},
    [220] = {outfit = 273, storage = 10273},
    [225] = {outfit = 278, storage = 10278},
    [230] = {outfit = 289, storage = 10289},
    [235] = {outfit = 325, storage = 10325},
    [240] = {outfit = 335, storage = 10335},
    [245] = {outfit = 367, storage = 10367},
}

function onAdvance(cid, skill, oldlevel, newLevel)
    local main = nil
    if getPlayerSex(cid) == 1 then

        main = male_outfits[getPlayerLevel(cid)]
    else

        main = female_outfits[getPlayerLevel(cid)]
    end

    if skill == SKILL__LEVEL then
        if main then
            if getPlayerStorageValue(cid, main.storage) <= 0 then

                doPlayerAddAddons(cid, main.outfit)
                setPlayerStorageValue(cid, main.storage, 1)
                doPlayerSendTextMessage(cid, 27, "Congratulations you received a new addon!")
            end
        end
    end
    return true
end
 
Code:
local female_outfits = {
  [135] = {outfit = 136, storage = 10136},
  [140] = {outfit = 137, storage = 10137},
  [145] = {outfit = 138, storage = 10138},
  [150] = {outfit = 139, storage = 10139},
  [155] = {outfit = 140, storage = 10140},
  [160] = {outfit = 141, storage = 10141},
  [165] = {outfit = 142, storage = 10142},
  [170] = {outfit = 147, storage = 10147},
  [175] = {outfit = 148, storage = 10148},
  [180] = {outfit = 149, storage = 10149},
  [185] = {outfit = 150, storage = 10150},
  [190] = {outfit = 155, storage = 10155},
  [195] = {outfit = 156, storage = 10156},
  [200] = {outfit = 157, storage = 10157},
  [205] = {outfit = 158, storage = 10158},
  [210] = {outfit = 252, storage = 10252},
  [215] = {outfit = 269, storage = 10269},
  [220] = {outfit = 270, storage = 10270},
  [225] = {outfit = 279, storage = 10279},
  [230] = {outfit = 288, storage = 10288},
  [235] = {outfit = 324, storage = 10324},
  [240] = {outfit = 336, storage = 10336},
  [245] = {outfit = 366, storage = 10366}
}

local male_outfits = {
  [135] = {outfit = 128, storage = 10128},
  [140] = {outfit = 129, storage = 10129},
  [145] = {outfit = 130, storage = 10130},
  [150] = {outfit = 131, storage = 10131},
  [155] = {outfit = 132, storage = 10132},
  [160] = {outfit = 133, storage = 10133},
  [165] = {outfit = 134, storage = 10134},
  [170] = {outfit = 143, storage = 10143},
  [175] = {outfit = 144, storage = 10144},
  [180] = {outfit = 145, storage = 10145},
  [185] = {outfit = 146, storage = 10146},
  [190] = {outfit = 151, storage = 10151},
  [195] = {outfit = 152, storage = 10152},
  [200] = {outfit = 153, storage = 10153},
  [205] = {outfit = 154, storage = 10154},
  [210] = {outfit = 251, storage = 10251},
  [215] = {outfit = 268, storage = 10268},
  [220] = {outfit = 273, storage = 10273},
  [225] = {outfit = 278, storage = 10278},
  [230] = {outfit = 289, storage = 10289},
  [235] = {outfit = 325, storage = 10325},
  [240] = {outfit = 335, storage = 10335},
  [245] = {outfit = 367, storage = 10367}
}

function onAdvance(cid, skill, oldlevel, newLevel)
local storage = getPlayerSex(cid) == 0 and female_outfits[getPlayerLevel(cid)].storage or male_outfits[getPlayerLevel(cid)].storage
local outfit = getPlayerSex(cid) == 0 and female_outfits[getPlayerLevel(cid)].outfit or male_outfits[getPlayerLevel(cid)].outfit
  if skill == SKILL__LEVEL and getPlayerLevel(cid) == male_outfits[getPlayerLevel(cid)] then
    if getPlayerStorageValue(cid,storage) <= 0 then
        doPlayerAddAddons(cid,outfit)
        setPlayerStorageValue(cid,storage, 1)
        doPlayerSendTextMessage(cid, 27, "Congratulations you received a new addon!")
    end
  end
  return true
end
 
With Codex script I got the same issue, I'm not receiving the addon

Try now I edited it.
Again though when exactly are you getting the error? When getting the level-up to a level that's in the table or one that isnt?

After your edit I don't got the error anymore, I'm just not receiving the addon.

Code:
local female_outfits = {
  [135] = {outfit = 136, storage = 10136},
  [140] = {outfit = 137, storage = 10137},
  [145] = {outfit = 138, storage = 10138},
  [150] = {outfit = 139, storage = 10139},
  [155] = {outfit = 140, storage = 10140},
  [160] = {outfit = 141, storage = 10141},
  [165] = {outfit = 142, storage = 10142},
  [170] = {outfit = 147, storage = 10147},
  [175] = {outfit = 148, storage = 10148},
  [180] = {outfit = 149, storage = 10149},
  [185] = {outfit = 150, storage = 10150},
  [190] = {outfit = 155, storage = 10155},
  [195] = {outfit = 156, storage = 10156},
  [200] = {outfit = 157, storage = 10157},
  [205] = {outfit = 158, storage = 10158},
  [210] = {outfit = 252, storage = 10252},
  [215] = {outfit = 269, storage = 10269},
  [220] = {outfit = 270, storage = 10270},
  [225] = {outfit = 279, storage = 10279},
  [230] = {outfit = 288, storage = 10288},
  [235] = {outfit = 324, storage = 10324},
  [240] = {outfit = 336, storage = 10336},
  [245] = {outfit = 366, storage = 10366}
}

local male_outfits = {
  [135] = {outfit = 128, storage = 10128},
  [140] = {outfit = 129, storage = 10129},
  [145] = {outfit = 130, storage = 10130},
  [150] = {outfit = 131, storage = 10131},
  [155] = {outfit = 132, storage = 10132},
  [160] = {outfit = 133, storage = 10133},
  [165] = {outfit = 134, storage = 10134},
  [170] = {outfit = 143, storage = 10143},
  [175] = {outfit = 144, storage = 10144},
  [180] = {outfit = 145, storage = 10145},
  [185] = {outfit = 146, storage = 10146},
  [190] = {outfit = 151, storage = 10151},
  [195] = {outfit = 152, storage = 10152},
  [200] = {outfit = 153, storage = 10153},
  [205] = {outfit = 154, storage = 10154},
  [210] = {outfit = 251, storage = 10251},
  [215] = {outfit = 268, storage = 10268},
  [220] = {outfit = 273, storage = 10273},
  [225] = {outfit = 278, storage = 10278},
  [230] = {outfit = 289, storage = 10289},
  [235] = {outfit = 325, storage = 10325},
  [240] = {outfit = 335, storage = 10335},
  [245] = {outfit = 367, storage = 10367}
}

function onAdvance(cid, skill, oldlevel, newLevel)
local storage = getPlayerSex(cid) == 0 and female_outfits[getPlayerLevel(cid)].storage or male_outfits[getPlayerLevel(cid)].storage
local outfit = getPlayerSex(cid) == 0 and female_outfits[getPlayerLevel(cid)].outfit or male_outfits[getPlayerLevel(cid)].outfit
  if skill == SKILL__LEVEL and getPlayerLevel(cid) == male_outfits[getPlayerLevel(cid)] then
    if getPlayerStorageValue(cid,storage) <= 0 then
        doPlayerAddAddons(cid,outfit)
        setPlayerStorageValue(cid,storage, 1)
        doPlayerSendTextMessage(cid, 27, "Congratulations you received a new addon!")
    end
  end
  return true
end

Your script continue with the same error man :x
 
With Codex script I got the same issue, I'm not receiving the addon



After your edit I don't got the error anymore, I'm just not receiving the addon.



Your script continue with the same error man :x

Well are you trying with the same character again and again? Maybe the storage is set up already, check that out first.
 
:/
Code:
local outfits = {
  [135] = {outfit = getPlayerSex(cid) == 0 and 136 or 128, storage = 10136},
  [140] = {outfit = getPlayerSex(cid) == 0 and 137 or 129, storage = 10137},
  [145] = {outfit = getPlayerSex(cid) == 0 and 138 or 130, storage = 10138},
  [150] = {outfit = getPlayerSex(cid) == 0 and 139 or 131, storage = 10139},
  [155] = {outfit = getPlayerSex(cid) == 0 and 140 or 132, storage = 10140},
  [160] = {outfit = getPlayerSex(cid) == 0 and 141 or 133, storage = 10141},
  [165] = {outfit = getPlayerSex(cid) == 0 and 142 or 134, storage = 10142},
  [170] = {outfit = getPlayerSex(cid) == 0 and 147 or 143, storage = 10147},
  [175] = {outfit = getPlayerSex(cid) == 0 and 148 or 144, storage = 10148},
  [180] = {outfit = getPlayerSex(cid) == 0 and 149 or 145, storage = 10149},
  [185] = {outfit = getPlayerSex(cid) == 0 and 150 or 146, storage = 10150},
  [190] = {outfit = getPlayerSex(cid) == 0 and 155 or 151, storage = 10155},
  [195] = {outfit = getPlayerSex(cid) == 0 and 156 or 152, storage = 10156},
  [200] = {outfit = getPlayerSex(cid) == 0 and 157 or 153, storage = 10157},
  [205] = {outfit = getPlayerSex(cid) == 0 and 158 or 154, storage = 10158},
  [210] = {outfit = getPlayerSex(cid) == 0 and 252 or 251, storage = 10252},
  [215] = {outfit = getPlayerSex(cid) == 0 and 269 or 268, storage = 10269},
  [220] = {outfit = getPlayerSex(cid) == 0 and 270 or 273, storage = 10270},
  [225] = {outfit = getPlayerSex(cid) == 0 and 279 or 278, storage = 10279},
  [230] = {outfit = getPlayerSex(cid) == 0 and 288 or 289, storage = 10288},
  [235] = {outfit = getPlayerSex(cid) == 0 and 324 or 325, storage = 10324},
  [240] = {outfit = getPlayerSex(cid) == 0 and 336 or 335, storage = 10336},
  [245] = {outfit = getPlayerSex(cid) == 0 and 366 or 367, storage = 10366}
}

function onAdvance(cid, skill, oldlevel, newLevel)
for k, v in pairs(outfits) do
  if skill == SKILL__LEVEL and getPlayerLevel(cid) >= k then
    if getPlayerStorageValue(cid,v.storage) <= 0 then
        doPlayerAddAddons(cid,v.outfit)
        setPlayerStorageValue(cid,v.storage, 1)
        doPlayerSendTextMessage(cid, 27, "Congratulations you received a new addon!")
    end
  end
end
  return true
end
 
Well are you trying with the same character again and again? Maybe the storage is set up already, check that out first.

I thought the same thing initially then I created a new one, I tried again but still the same.

:/
Code:
local outfits = {
  [135] = {outfit = getPlayerSex(cid) == 0 and 136 or 128, storage = 10136},
  [140] = {outfit = getPlayerSex(cid) == 0 and 137 or 129, storage = 10137},
  [145] = {outfit = getPlayerSex(cid) == 0 and 138 or 130, storage = 10138},
  [150] = {outfit = getPlayerSex(cid) == 0 and 139 or 131, storage = 10139},
  [155] = {outfit = getPlayerSex(cid) == 0 and 140 or 132, storage = 10140},
  [160] = {outfit = getPlayerSex(cid) == 0 and 141 or 133, storage = 10141},
  [165] = {outfit = getPlayerSex(cid) == 0 and 142 or 134, storage = 10142},
  [170] = {outfit = getPlayerSex(cid) == 0 and 147 or 143, storage = 10147},
  [175] = {outfit = getPlayerSex(cid) == 0 and 148 or 144, storage = 10148},
  [180] = {outfit = getPlayerSex(cid) == 0 and 149 or 145, storage = 10149},
  [185] = {outfit = getPlayerSex(cid) == 0 and 150 or 146, storage = 10150},
  [190] = {outfit = getPlayerSex(cid) == 0 and 155 or 151, storage = 10155},
  [195] = {outfit = getPlayerSex(cid) == 0 and 156 or 152, storage = 10156},
  [200] = {outfit = getPlayerSex(cid) == 0 and 157 or 153, storage = 10157},
  [205] = {outfit = getPlayerSex(cid) == 0 and 158 or 154, storage = 10158},
  [210] = {outfit = getPlayerSex(cid) == 0 and 252 or 251, storage = 10252},
  [215] = {outfit = getPlayerSex(cid) == 0 and 269 or 268, storage = 10269},
  [220] = {outfit = getPlayerSex(cid) == 0 and 270 or 273, storage = 10270},
  [225] = {outfit = getPlayerSex(cid) == 0 and 279 or 278, storage = 10279},
  [230] = {outfit = getPlayerSex(cid) == 0 and 288 or 289, storage = 10288},
  [235] = {outfit = getPlayerSex(cid) == 0 and 324 or 325, storage = 10324},
  [240] = {outfit = getPlayerSex(cid) == 0 and 336 or 335, storage = 10336},
  [245] = {outfit = getPlayerSex(cid) == 0 and 366 or 367, storage = 10366}
}

function onAdvance(cid, skill, oldlevel, newLevel)
for k, v in pairs(outfits) do
  if skill == SKILL__LEVEL and getPlayerLevel(cid) >= k then
    if getPlayerStorageValue(cid,v.storage) <= 0 then
        doPlayerAddAddons(cid,v.outfit)
        setPlayerStorageValue(cid,v.storage, 1)
        doPlayerSendTextMessage(cid, 27, "Congratulations you received a new addon!")
    end
  end
end
  return true
end

Now the console send this

WUfaL4D.png
 
Last edited by a moderator:
Code:
function onAdvance(cid, skill, oldlevel, newLevel)
local outfits = {
  [135] = {outfit = getPlayerSex(cid) == 0 and 136 or 128, storage = 10136},
  [140] = {outfit = getPlayerSex(cid) == 0 and 137 or 129, storage = 10137},
  [145] = {outfit = getPlayerSex(cid) == 0 and 138 or 130, storage = 10138},
  [150] = {outfit = getPlayerSex(cid) == 0 and 139 or 131, storage = 10139},
  [155] = {outfit = getPlayerSex(cid) == 0 and 140 or 132, storage = 10140},
  [160] = {outfit = getPlayerSex(cid) == 0 and 141 or 133, storage = 10141},
  [165] = {outfit = getPlayerSex(cid) == 0 and 142 or 134, storage = 10142},
  [170] = {outfit = getPlayerSex(cid) == 0 and 147 or 143, storage = 10147},
  [175] = {outfit = getPlayerSex(cid) == 0 and 148 or 144, storage = 10148},
  [180] = {outfit = getPlayerSex(cid) == 0 and 149 or 145, storage = 10149},
  [185] = {outfit = getPlayerSex(cid) == 0 and 150 or 146, storage = 10150},
  [190] = {outfit = getPlayerSex(cid) == 0 and 155 or 151, storage = 10155},
  [195] = {outfit = getPlayerSex(cid) == 0 and 156 or 152, storage = 10156},
  [200] = {outfit = getPlayerSex(cid) == 0 and 157 or 153, storage = 10157},
  [205] = {outfit = getPlayerSex(cid) == 0 and 158 or 154, storage = 10158},
  [210] = {outfit = getPlayerSex(cid) == 0 and 252 or 251, storage = 10252},
  [215] = {outfit = getPlayerSex(cid) == 0 and 269 or 268, storage = 10269},
  [220] = {outfit = getPlayerSex(cid) == 0 and 270 or 273, storage = 10270},
  [225] = {outfit = getPlayerSex(cid) == 0 and 279 or 278, storage = 10279},
  [230] = {outfit = getPlayerSex(cid) == 0 and 288 or 289, storage = 10288},
  [235] = {outfit = getPlayerSex(cid) == 0 and 324 or 325, storage = 10324},
  [240] = {outfit = getPlayerSex(cid) == 0 and 336 or 335, storage = 10336},
  [245] = {outfit = getPlayerSex(cid) == 0 and 366 or 367, storage = 10366}
}

for k, v in pairs(outfits) do
  if skill == SKILL__LEVEL and getPlayerLevel(cid) >= k then
    if getPlayerStorageValue(cid,v.storage) <= 0 then
        doPlayerAddAddons(cid,v.outfit)
        setPlayerStorageValue(cid,v.storage, 1)
        doPlayerSendTextMessage(cid, 27, "Congratulations you received a new addon!")
    end
  end
end
  return true
end
 
Well if it sends the message and sets the storage on level-up then the logic is just fine.. There may be a problem with your addOutfit function most likely.
Alternatively you can try to add the addons "manually", that is set up the storages (cause addons are just storages)
 
Just messing around with your code, try this
Code:
local outfits = {
    -- 0 = female, 1 male
    [135] = {[0] = 136, 128},
    [140] = {[0] = 137, 129},
    [145] = {[0] = 138, 130},
    [150] = {[0] = 139, 131},
    [155] = {[0] = 140, 132},
    [160] = {[0] = 141, 133},
    [165] = {[0] = 142, 134},
    [170] = {[0] = 147, 143},
    [175] = {[0] = 148, 144},
    [180] = {[0] = 149, 145},
    [185] = {[0] = 150, 146},
    [190] = {[0] = 155, 151},
    [195] = {[0] = 156, 152},
    [200] = {[0] = 157, 153},
    [205] = {[0] = 158, 154},
    [210] = {[0] = 252, 251},
    [215] = {[0] = 269, 268},
    [220] = {[0] = 270, 273},
    [225] = {[0] = 279, 278},
    [230] = {[0] = 288, 289},
    [235] = {[0] = 324, 325},
    [240] = {[0] = 336, 335},
    [245] = {[0] = 366, 367}
}

 
function onAdvance(cid, skill, oldlevel, newLevel)
    local main = returnTableIndex(outfits, newLevel)
    if skill == SKILL__LEVEL and main ~= nil then
        local playerOutfit = main[getPlayerSex(cid)]
        local addonStorage = playerOutfit + 10000
        if getPlayerStorageValue(cid, addonStorage) == -1 then
            doPlayerAddAddons(cid, playerOutfit)
            setPlayerStorageValue(cid, addonStorage, 1)
            doPlayerSendTextMessage(cid, 27, "Congratulations you received a new addon!")
        end
    end
    return true
end
 
function returnTableIndex(table_, search_for)
    if type(table_) == "table" and search_for ~= nil then
        for key, value in pairs(table_) do
            if key == search_for then
                return table_[key]
            end
        end
    end
    return nil
end
 
Sorry, i made an error try this
Code:
local outfits = {
    -- 0 = female, 1 male
    [135] = {[0] = 136, 128},
    [140] = {[0] = 137, 129},
    [145] = {[0] = 138, 130},
    [150] = {[0] = 139, 131},
    [155] = {[0] = 140, 132},
    [160] = {[0] = 141, 133},
    [165] = {[0] = 142, 134},
    [170] = {[0] = 147, 143},
    [175] = {[0] = 148, 144},
    [180] = {[0] = 149, 145},
    [185] = {[0] = 150, 146},
    [190] = {[0] = 155, 151},
    [195] = {[0] = 156, 152},
    [200] = {[0] = 157, 153},
    [205] = {[0] = 158, 154},
    [210] = {[0] = 252, 251},
    [215] = {[0] = 269, 268},
    [220] = {[0] = 270, 273},
    [225] = {[0] = 279, 278},
    [230] = {[0] = 288, 289},
    [235] = {[0] = 324, 325},
    [240] = {[0] = 336, 335},
    [245] = {[0] = 366, 367}
}

  
function onAdvance(cid, skill, oldlevel, newLevel)
    local main = returnTableIndex(outfits, newLevel)
    if skill == SKILL__LEVEL and main ~= nil then
        local playerOutfit = main[getPlayerSex(cid)]
        local addonStorage = playerOutfit + 10000
        if getPlayerStorageValue(cid, addonStorage) == -1 then
            doPlayerAddOutfit(cid, playerOutfit)
            doPlayerAddAddons(cid, 3)
            setPlayerStorageValue(cid, addonStorage, 1)
            doPlayerSendTextMessage(cid, 27, "Congratulations you received a new addon!")
        end
    end
    return true
end
  
function returnTableIndex(table_, search_for)
    if type(table_) == "table" and search_for ~= nil then
        for key, value in pairs(table_) do
            if key == search_for then
                return table_[key]
            end
        end
    end
    return nil
end
 
Well if it sends the message and sets the storage on level-up then the logic is just fine.. There may be a problem with your addOutfit function most likely.
Alternatively you can try to add the addons "manually", that is set up the storages (cause addons are just storages)

I found the problem, the script are given the addon normally, but the players only can see and use if has premium. The ideia was free players need up to get addons and premium players have all addons without levels, I have this code on my login.lua.

Code:
    local female_outfits = {
    [1] = {outfit = 136, storage = 10136},
    [2] = {outfit = 137, storage = 10137},
    [3] = {outfit = 138, storage = 10138},
    [4] = {outfit = 139, storage = 10139},
    [5] = {outfit = 140, storage = 10140},
    [6] = {outfit = 141, storage = 10141},
    [7] = {outfit = 142, storage = 10142},
    [8] = {outfit = 147, storage = 10147},
    [9] = {outfit = 148, storage = 10148},
    [10] = {outfit = 149, storage = 10149},
    [11] = {outfit = 150, storage = 10150},
    [12] = {outfit = 155, storage = 10155},
    [13] = {outfit = 156, storage = 10156},
    [14] = {outfit = 157, storage = 10157},
    [15] = {outfit = 158, storage = 10158},
    [16] = {outfit = 252, storage = 10252},
    [17] = {outfit = 269, storage = 10269},
    [18] = {outfit = 270, storage = 10270},
    [19] = {outfit = 279, storage = 10279},
    [20] = {outfit = 288, storage = 10288},
    [21] = {outfit = 324, storage = 10324},
    [22] = {outfit = 336, storage = 10336},
    [23] = {outfit = 366, storage = 10366},
}

local male_outfits = {
    [1] = {outfit = 128, storage = 10128},
    [2] = {outfit = 129, storage = 10129},
    [3] = {outfit = 130, storage = 10130},
    [4] = {outfit = 131, storage = 10131},
    [5] = {outfit = 132, storage = 10132},
    [6] = {outfit = 133, storage = 10133},
    [7] = {outfit = 134, storage = 10134},
    [8] = {outfit = 143, storage = 10143},
    [9] = {outfit = 144, storage = 10144},
    [10] = {outfit = 145, storage = 10145},
    [11] = {outfit = 146, storage = 10146},
    [12] = {outfit = 151, storage = 10151},
    [13] = {outfit = 152, storage = 10152},
    [14] = {outfit = 153, storage = 10153},
    [15] = {outfit = 154, storage = 10154},
    [16] = {outfit = 251, storage = 10251},
    [17] = {outfit = 268, storage = 10268},
    [18] = {outfit = 273, storage = 10273},
    [19] = {outfit = 278, storage = 10278},
    [20] = {outfit = 289, storage = 10289},
    [21] = {outfit = 325, storage = 10325},
    [22] = {outfit = 335, storage = 10335},
    [23] = {outfit = 367, storage = 10367},
}
function reloadAddons(cid)
    local main = nil
    if getPlayerSex(cid) == 1 then

        main = male_outfits
    else

        main = female_outfits
    end

    if isPremium(cid) then

        for a = 1, #main do

            doPlayerAddOutfit(cid, main[a].outfit, 3)
        end

        if isInArray({1, 2, 3, 4}, getPlayerVocation(cid)) then

            doPlayerSetVocation(cid, getPlayerVocation(cid) + 4)
        end
        return true
    else

        for a = 1, #main do

            doPlayerRemoveOutfit(cid, main[a].outfit, 3)

            if getPlayerStorageValue(cid, main[a].storage) >= 1 then

                doPlayerAddOutfit(cid, main[a].outfit, 3)
            end

            if isInArray({5, 6, 7, 8}, getPlayerVocation(cid)) then

                doPlayerSetVocation(cid, getPlayerVocation(cid) - 4)
            end
        end
        return true
    end
end

Have a way to players use addons without premium? sources changes maybe, I don't know... :(, Please someone help me
 
Back
Top