Doitforthegains
Well-Known Member
- Joined
- Aug 30, 2014
- Messages
- 231
- Reaction score
- 74
Hello!
So I'm trying to make a "race" system (i.e Humans Vs. Orcs) and I want players to only be able to switch between their respectable outfits. So human vocations would have all the normal outfits and orc vocations having looktypes 2,4,5,6,7,8,50,59,342..
So far this is where I'm at with help from @Zothion
login.lua
Any help would be greatly appreciated, thanks!
So I'm trying to make a "race" system (i.e Humans Vs. Orcs) and I want players to only be able to switch between their respectable outfits. So human vocations would have all the normal outfits and orc vocations having looktypes 2,4,5,6,7,8,50,59,342..
So far this is where I'm at with help from @Zothion
login.lua
Code:
local outfits = {
[{20,21,22,23,24,25,26}] = {2,4,5,6,7,8,50,59,342}, --orcs
[{0,1,2,3,4,5,6,7,8}] = {136,137,138,139,140,141,142,147,148,149,150,155,156,157,158,128,129,130,131,132,133,134,135} --humans
}
local storage = 10101
function onLogin(player)
if player:getStorageValue(storage) ~= 1 then
for pos, val in pairs(outfits) do
if isInArray(pos, player:getVocation():getId()) then
for i=1,#val do
player:addOutfit(val[i])
end
end
end
end
Any help would be greatly appreciated, thanks!
Last edited: