TO
pedido

Mount System : Monta Mais Não Desmonta

Por tonynamoral, 25 de nov. de 2012 em Scripts

1
382
tonynamoralT
25 de novembro de 2012 às 20:07

local mounts = {

[12121] = {lookType = 4},

[21212] = {lookType = 5},

[76124] = {lookType = 6},

}

 

function onSay(cid,words)

local mounton = 87871

local haveMount = false

local mountLook = 0

 

for sto, look in pairs(mounts) do

if getPlayerStorageValue(cid, sto) >= 1 then

haveMount = true

mountLook = look

break

end

end

 

if haveMount then

if getPlayerStorageValue(cid, mounton) <= 0 then

doSetCreatureOutfit(cid, mountLook, -1)

setPlayerStorageValue(cid, mounton, 1)

elseif getPlayerStorageValue(cid, mounton) >= 1 then

doRemoveCondition(cid, CONDITION_OUTFIT)

setPlayerStorageValue(cid, mounton,-1)

end

else

doPlayerSendTextMessage(cid, 27, "You don't have a mount.")

end

 

return true

end

Editado Novembro 25 por tonynamoral