Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Aluguel_mounts = {
- ["brown war horse"] = {price = 10000, days = 2, mountid = 17, level = 10, premium = false, storage = 50561},
- ["fire war horse"] = {price = 30000, days = 1, mountid = 23, level = 20, premium = false, storage = 50562},
- ["king scorpion"] = {price = 50000, days = 1, mountid = 21, level = 30, premium = false, storage = 50563}
- }
- local function doRemovePlayerMount(cid, mountId) -- vodka
- doPlayerRemoveMount(cid, mountId)
- return doCreatureChangeOutfit(cid,{lookType = getCreatureOutfit(cid).lookType, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons})
- end
- local function CheckRentMount(cid)
- for var, ret in pairs(Aluguel_mounts) do
- if getPlayerMount(cid, ret.mountid) and getPlayerStorageValue(cid, ret.storage) ~= -1 and getPlayerStorageValue(cid, ret.storage) <= os.time() then
- doRemovePlayerMount(cid, ret.mountid)
- doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "The time of your mount " .. var .. " has ended, to get it again back to the NPC.")
- end
- end
- end
- function onThink(interval)
- for _, cid in ipairs(getOnlinePlayers()) do
- CheckRentMount(cid)
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement