Greetings! Everyone I have randomly console problems about this script, can somebody helpme?
Lua:
function onUse(cid, item)
local outfit = {lookType = 342}
local exhaust = 140
local time = 60
local speed = 150
local mana = 0
local premium = "yes"
local storage = 9393
if premium == "yes" and not isPremium(cid) then
return doPlayerSendTextMessage(cid, 23, "Sorry, only premium players.")
end
if(getCreatureMana(cid) < mana) then
return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHMANA)
end
if (getPlayerStorageValue(cid, storage) <= os.time()) then
doCreatureSay(cid, "Yeeeah!!!\nDime Vaquero!.", 19)
doSetCreatureOutfit(cid, outfit, time*1000)
doChangeSpeed(cid, speed)
doSendMagicEffect(getCreaturePosition(cid), 34)
setPlayerStorageValue(cid, storage, os.time()+exhaust)
doPlayerAddMana(cid, -mana)
addEvent(doChangeSpeed, time*1000+40, cid, -speed)
addEvent(doPlayerSendTextMessage, time*1000+180, cid, 23, "Tu Montura ha terminado!")
addEvent(doSendMagicEffect, time*1000+50, getCreaturePosition(cid), 2)
doRemoveItem(item.uid, 0)
else
doPlayerSendCancel(cid, "Sorry, you only can again use this item after "..exhaust.." seconds.")
end
return TRUE
end