Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onSay(cid, words, param, channel)
- local time = getPlayerStorageValue(cid, 83922)
- local r = os.date("%d %B %Y %X", time)
- local price = 5000000 -- per day
- if(tonumber(param) and tonumber(param) < 365) then
- if(doPlayerRemoveMoney(cid, price * param)) then
- if(time - os.time() < 1) then
- setPlayerStorageValue(cid, 83922, os.time() + 86400 * param)
- return doPlayerSendTextMessage(cid, 27, "You now have access until: " .. r)
- else
- return doPlayerSendTextMessage(cid, 28, "You still have access until: " .. r)
- end
- else
- return doPlayerSendCancel(cid, "You need " .. (param * price) .. " gold coins.")
- end
- else
- return doPlayerSendCancel(cid, words .. " days(max is 365).")
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment