Pocha cara achei seu script tão feio e tão mal desenvolvido que crie um melhor para voce com tudo que queria:
local out = {
[6] = {looktype = 300, speed = 2000},
[8] = {looktype = 300, speed = 2000},
[9] = {looktype = 300, speed = 2000}
}
function onUse(cid, item)
local outfit = getCreatureOutfit(cid)
local getspeed = getCreatureSpeed(cid)
local voc = getPlayerVocation(cid)
local look = out[voc].looktype
local speed = out[voc].speed
if not out[voc] then
doPlayerSendCancel(cid, "Sua vocação não tem esta função")
return true
end
setPlayerStorageValue(cid, 87668, getspeed)
doCreatureChangeOutfit(cid, {lookType = look})
doChangeSpeed(cid, speed)
setPlayerStorageValue(cid, 77821, 1)
return true
end




info
Grupo: Campones
Registrado: 10/05/09
Posts: 74
Reputação: +18
Tenho um script que você da use nele você se transforma em um outfit e ganha speed, eu queria que quando player quisese tirar o outfit ele apertasse de novo e sairia e o speed também
Script, action:
function onUse(cid, item)
local outfit1 = {lookType = 101} -- looktype
local outfit2 = {lookType = 258} -- looktype
local playerVocation = getPlayerVocation(cid)
if playerVocation == 2 then
doSetCreatureOutfit(cid, outfit1, -1)
doChangeSpeed(cid, 500) -- speed almenta
return TRUE
end
if playerVocation == 3 then
doSetCreatureOutfit(cid, outfit2, -1)
doChangeSpeed(cid, 500) -- speed almenta
return TRUE
end
end
Abrass
Editado Julho 16 por Carnavotu