Ir para conteúdo
  • 0

Vocation Outfit


iFaxBR

Pergunta

Bom vi esse script do Vodkart então queria colocar no meu server, só que no meu server tem 19 vocações, e eu não sabia como por storage ate o 19 então venho aqui pedir pra que alguém de vocês me ajude colocando ate o 19.

 

 

 

 

function onLogin(cid)

 

local x = {

[1] = {storage = 40850,set_storage = {40851,40852,40853,40855,40856,40857,40858,40859,40860,40861,40862}},

[2] = {storage = 40851,set_storage = {40850,40852,40853,40855,40856,40857,40858,40859,40860,40861,40862}},

[3] = {storage = 40852,set_storage = {40850,40851,40853,40855,40856,40857,40858,40859,40860,40861,40862}},

[4] = {storage = 40853,set_storage = {40850,40851,40852,40855,40856,40857,40858,40859,40860,40861,40862}},

[5] = {storage = 40855,set_storage = {40851,40852,40853,40856,40857,40858,40859,40860,40861,40862}},

[6] = {storage = 40856,set_storage = {40850,40852,40853,40855,40857,40858,40859,40860,40861,40862}},

[7] = {storage = 40857,set_storage = {40850,40851,40853,40855,40856,40858,40859,40860,40861,40862}},

[8] = {storage = 40858,set_storage = {40850,40851,40852,40855,40856,40857,40859,40860,40861,40862}},

[9] = {storage = 40859,set_storage = {40851,40852,40853,40856,40857,40858,40860,40861,40862}},

[10] = {storage = 40860,set_storage = {40850,40852,40853,40855,40857,40858,40859,40861,40862}},

[11] = {storage = 40861,set_storage = {40850,40851,40853,40855,40856,40858,40859,40860,40862}},

[12] = {storage = 40862,set_storage = {40850,40851,40852,40855,40856,40857,40859,40860,40861}}

}

 

local v = x[getPlayerVocation(cid)]

if (not v) then

return true

end

setPlayerStorageValue(cid,v.storage,1)

for i = 1, #v.set_storage do

if getPlayerStorageValue(cid, v.set_storage) >= 1 then

setPlayerStorageValue(cid,v.set_storage,0)

end

end

return TRUE

end

Link para o comentário
Compartilhar em outros sites

4 respostass a esta questão

Posts Recomendados

  • 0

Teste ai

 

 

 

function onLogin(cid)

 

local x = {

[1] = {storage = 40850,set_storage = {40851,40852,40853,40855,40856,40857,40858,40859,40860,40861,40862}},

[2] = {storage = 40851,set_storage = {40850,40852,40853,40855,40856,40857,40858,40859,40860,40861,40862}},

[3] = {storage = 40852,set_storage = {40850,40851,40853,40855,40856,40857,40858,40859,40860,40861,40862}},

[4] = {storage = 40853,set_storage = {40850,40851,40852,40855,40856,40857,40858,40859,40860,40861,40862}},

[5] = {storage = 40855,set_storage = {40851,40852,40853,40856,40857,40858,40859,40860,40861,40862}},

[6] = {storage = 40856,set_storage = {40850,40852,40853,40855,40857,40858,40859,40860,40861,40862}},

[7] = {storage = 40857,set_storage = {40850,40851,40853,40855,40856,40858,40859,40860,40861,40862}},

[8] = {storage = 40858,set_storage = {40850,40851,40852,40855,40856,40857,40859,40860,40861,40862}},

[9] = {storage = 40859,set_storage = {40851,40852,40853,40856,40857,40858,40860,40861,40862}},

[10] = {storage = 40860,set_storage = {40850,40852,40853,40855,40857,40858,40859,40861,40862}},

[11] = {storage = 40861,set_storage = {40850,40851,40853,40855,40856,40858,40859,40860,40862}},

[12] = {storage = 40862,set_storage = {40850,40851,40852,40855,40856,40857,40859,40860,40861}},

[13] = {storage = 40863,set_storage = {40850,40851,40853,40855,40856,40858,40859,40860,40862}},

[14] = {storage = 40864,set_storage = {40850,40851,40853,40855,40856,40858,40859,40860,40862}},

[15] = {storage = 40865,set_storage = {40850,40851,40853,40855,40856,40858,40859,40860,40862}},

[16] = {storage = 40866,set_storage = {40850,40851,40853,40855,40856,40858,40859,40860,40862}},

[17] = {storage = 40867,set_storage = {40850,40851,40852,40855,40856,40857,40859,40860,40861}},

[18] = {storage = 40868,set_storage = {40850,40851,40852,40855,40856,40857,40859,40860,40861}},

[19] = {storage = 40869,set_storage = {40850,40851,40852,40855,40856,40857,40859,40860,40861}},

}

 

local v = x[getPlayerVocation(cid)]

if (not v) then

return true

end

setPlayerStorageValue(cid,v.storage,1)

for i = 1, #v.set_storage do

if getPlayerStorageValue(cid, v.set_storage) >= 1 then

setPlayerStorageValue(cid,v.set_storage,0)

end

end

return TRUE

end

Editado por DinoAdmin
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...