Ecstacy
Mothafuckaaa
Hello,
I'm having some problems with this script that I can't figure out :s.
The problem is that when i'm in the outfit 'rat', it doesn't work, but when I'm in the outfit 'mew', It works 100%.
I'm having some problems with this script that I can't figure out :s.
The problem is that when i'm in the outfit 'rat', it doesn't work, but when I'm in the outfit 'mew', It works 100%.
Code:
local s = {
{name = 'mew', st = 100},
{name = 'rat', st = 101}
}
function onSay(cid, words, param, channel)
local v = getCreaturePosition(cid)
local up, down = {x = v.x, y = v.y, z = v.z-1}, {x = v.x, y = v.y, z = v.z+1}
local r = s[1]
if words == '/flyup' then
if getPlayerStorageValue(cid, r.st) == 1 then
if getTileItemById(up, 460).uid > 0 then
doTeleportThing(cid, up, true)
doSendMagicEffect(up, 10)
doCreatureSay(cid, 'Up!', 19)
return doPlayerSendTextMessage(cid, 20, 'You have flown up.')
else
return doPlayerSendTextMessage(cid, 20, 'You can\'t fly up here.')
end
else
return doPlayerSendTextMessage(cid, 20, 'You aren\'t mounted.')
end
return true
end
if words == '/flydown' then
if getPlayerStorageValue(cid, r.st) == 1 then
if getTileItemById(down, 460).uid > 0 then
doTeleportThing(cid, down, true)
doSendMagicEffect(down, 10)
doCreatureSay(cid, 'Down!', 19)
doPlayerSendTextMessage(cid, 20, 'You have flown down.')
elseif v.z == 6 then
if getTileItemById(v,460).uid > 0 then
if doTeleportThing(cid, down, true) then
doSendMagicEffect(down, 10)
doCreatureSay(cid, 'Down!', 19)
doPlayerSendTextMessage(cid, 20, 'You have flown down.')
else
return doPlayerSendTextMessage(cid, 20, 'You can\'t fly down here.')
end
else
return doPlayerSendTextMessage(cid, 20, 'You can\'t fly down here')
end
else
return doPlayerSendTextMessage(cid, 20, 'You can\'t fly down here.')
end
else
return doPlayerSendTextMessage(cid, 20, 'You aren\'t mounted.')
end
return true
end
end