• 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!

Lua script error: [creaturescript interface]

henkas

Well-Known Member
Joined
Jul 8, 2015
Messages
993
Solutions
5
Reaction score
55
Untitled.png

Code:
local outfits = {
   [0] = { 
       [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
       [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
       [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
       [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
       [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
       [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
       [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
       [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
   }
   }

function onLogin(cid)
   local STORAGE = 18292
   if getPlayerStorageValue(cid, STORAGE) ~= 1 then
       doCreatureChangeOutfit(cid, outfits[getPlayerSex(cid)][getPlayerVocation(cid)])
       setPlayerStorageValue(cid, STORAGE, 1)
   end
   return true
end
 
Storage values are default -1 which will read as nil.

The best way to check storage to make sure no problems happen is this:

change
Lua:
if getPlayerStorageValue(cid, STORAGE) ~= 1 then

Lua:
if getPlayerStorageValue(cid, STORAGE) == nil or getPlayerStorageValue(cid, STORAGE) == -1 then

Also, it is best to define local values that are constant outside of the scripts scope that way it is not redefined everytime. So put: local STORAGE = 19282 above the onLogin(cid)

So your code should look like this:

Lua:
local outfits = {
   [0] = {
       [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
       [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
       [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
       [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
       [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
       [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
       [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
       [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
        }
}

local STORAGE = 18292

function onLogin(cid)
    if getPlayerStorageValue(cid, STORAGE) == nil or getPlayerStorageValue(cid, STORAGE) == -1 then
       doCreatureChangeOutfit(cid, outfits[getPlayerSex(cid)][getPlayerVocation(cid)])
       setPlayerStorageValue(cid, STORAGE, 1)
    end
   return true
end

Last thing, if this is supposed to run the first time player logs in you can use getPlayerLastLogin(cid) instead of setting a storage value. So it would look like this:

Lua:
local outfits = {
   [0] = {
       [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
       [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
       [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
       [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
       [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
       [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
       [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
       [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
        }
}

function onLogin(cid)
    if getPlayerLastLogin(cid) == 0 then
       doCreatureChangeOutfit(cid, outfits[getPlayerSex(cid)][getPlayerVocation(cid)])
    end
   return true
end
 
Last edited:
@up there's empty line on the start of his script therefore the error on line 18 not 17
Lua:
doCreatureChangeOutfit(cid, outfits[getPlayerSex(cid)][getPlayerVocation(cid)])
there's no table for the other gender
 
Oh lol he is indexing outfits[0] which isnt possible....

Lua:
local outfits = {
   [1] = { --Female
       [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
       [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
       [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
       [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
       [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
       [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
       [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
       [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
    },
    [2] = { -- Male
       
    }
}

function onLogin(cid)
    if getPlayerLastLogin(cid) == 0 then
        local OUTFIT = nil
        if getPlayerSex(cid) == 0 then
            OUTFIT = outfits[1]
        else
            OUTFIT = outfits[2]
        end
       
        if OUTFIT then
            doCreatureChangeOutfit(cid, OUTFIT[getPlayerVocation(cid)])
        end
    end
   return true
end
 
Oh lol he is indexing outfits[0] which isnt possible....

Lua:
local outfits = {
   [1] = { --Female
       [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
       [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
       [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
       [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
       [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
       [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
       [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
       [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
    },
    [2] = { -- Male
    
    }
}

function onLogin(cid)
    if getPlayerLastLogin(cid) == 0 then
        local OUTFIT = nil
        if getPlayerSex(cid) == 0 then
            OUTFIT = outfits[1]
        else
            OUTFIT = outfits[2]
        end
    
        if OUTFIT then
            doCreatureChangeOutfit(cid, OUTFIT[getPlayerVocation(cid)])
        end
    end
   return true
end
it's 100% possible and should be how the table is indexed
forgottenserver/enums.h at master · otland/forgottenserver · GitHub
spiderot was correct, the only table for outfits was for females, if you logged in on a male you would have a nil value for outfit

Lua:
local outfits = {
    [PLAYERSEX_FEMALE] = {
        [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
        [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
        [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
        [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
        [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
        [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
        [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
        [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
    },
    [PLAYERSEX_MALE] = {
        -- add new outfits here
    }
}

local storage = 18292

function onLogin(cid)
    if getPlayerStorageValue(cid, storage) ~= 1 then
        doCreatureChangeOutfit(cid, outfits[getPlayerSex(cid)][getPlayerVocation(cid)])
        setPlayerStorageValue(cid, storage, 1)
    end
    return true
end
 
Guy but i have deleted gender system so it should be without genders, because if new player is created he get sex=0 so what about this? Yea its sounds weird why database still registrate that
Untitled.png

So as you can see sample char have sex id 1 and if i create new player he get 0
but i deleted gender system from myacc so maybe i should delete sex table from database, but then that code at the top you have edited will not work for sure. What should i do guys?
 
So...

Lua:
local outfits =
    {
        [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
        [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
        [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
        [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
        [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
        [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
        [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
        [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
    }

and then...

Lua:
doCreatureChangeOutfit(cid, outfits[getPlayerVocation(cid)])
 
So...

Lua:
local outfits =
    {
        [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
        [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
        [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
        [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
        [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
        [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
        [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
        [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
    }

and then...

Lua:
doCreatureChangeOutfit(cid, outfits[getPlayerVocation(cid)])
I pretty sure it's not gonna work because look at database /\ as you can see it's still gives you gender = 0, it might work if somehow i delete that gender giving shit from database.
 
Read the script.
Untitled.png

Code:
local outfits =
    {
        [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
        [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
        [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
        [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
        [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
        [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
        [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
        [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
    }

function onLogin(cid)
   local STORAGE = 18292
   if getPlayerStorageValue(cid, STORAGE) ~= 1 then
   doCreatureChangeOutfit(cid, outfits[getPlayerVocation(cid)])
   setPlayerStorageValue(cid, STORAGE, 1)
   end
   return true
end
 

Next time tell us what version are you using when reporting the problem...

Lua:
local outfits =
  {
    [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
    [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
    [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
    [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
    [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
    [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
    [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
    [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
  }
function onLogin(player)
  local STORAGE = 18292
  if player:getStorageValue(STORAGE) ~= 1 then
    player:setOufit(outfits[player:getVocation():getId()].lookType)
    player:setStorageValue(STORAGE, 1)
  end
  return true
end
 
Next time tell us what version are you using when reporting the problem...

Lua:
local outfits =
  {
    [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
    [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
    [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
    [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
    [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
    [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
    [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
    [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
  }
function onLogin(player)
  local STORAGE = 18292
  if player:getStorageValue(STORAGE) ~= 1 then
    player:setOufit(outfits[player:getVocation():getId()].lookType)
    player:setStorageValue(STORAGE, 1)
  end
  return true
end
Untitled.png
 
Lua:
local outfits =
  {
    [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
    [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
    [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
    [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
    [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
    [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
    [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
    [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
  }
function onLogin(player)
  local STORAGE = 18292
  if player:getStorageValue(STORAGE) ~= 1 then
    local outfit = player:getOutfit()
    outfit.lookType = outfits[player:getVocation():getId()].lookType
    player:setOutfit(outfit)
    player:setStorageValue(STORAGE, 1)
  end
  return true
end
 
Lua:
local outfits =
  {
    [1] = {lookType = 2, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Goku
    [2] = {lookType = 19, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Vegeta
    [3] = {lookType = 55, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Gohan
    [4] = {lookType = 135, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Goten
    [6] = {lookType = 69, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Future Trunks
    [7] = {lookType = 108, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},  -- Brolly
    [8] = {lookType = 280, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Bardock
    [9] = {lookType = 210, lookHead = 0 , lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} -- Pan
  }
function onLogin(player)
  local STORAGE = 18292
  if player:getStorageValue(STORAGE) ~= 1 then
    local outfit = player:getOutfit()
    outfit.lookType = outfits[player:getVocation():getId()].lookType
    player:setOutfit(outfit)
    player:setStorageValue(STORAGE, 1)
  end
  return true
end
Untitled.png
 
OMFG guys it works it was problem because all this time i tried to connect to play who has voc id = 0 so that's why it sends that error.
 
Back
Top