nevix
Tunzodus.net
Hello guys,
Today i'm gonna share my simple vip system. I need it for my self so i'm gonna share for everyone
VIP ITEM (you can change by yourself)
actions:
Thats it
You can put everywhere you want. On movements on talkactions everywhere.
Small eg:
VIP TILE:
Vip time finishing automatically.
Today i'm gonna share my simple vip system. I need it for my self so i'm gonna share for everyone
VIP ITEM (you can change by yourself)
actions:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)
local viptimestorage = 15001
local itemid = 11754
local vipdays = 10
local left = os.date("%d", player:getStorageValue(viptimestorage) - os.time())
if player:getItemCount(itemid) == 0 then
player:sendTextMessage(MESSAGE_STATUS_WARNING, "You don't have an item.")
elseif player:getStorageValue(viptimestorage) >= os.time() then
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You still have " .. left .. " VIP Days.")
else
player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You got VIP " .. vipdays .. " days.")
player:setStorageValue(viptimestorage, os.time() + vipdays * 60 * 60 * 24)
doRemoveItem(item.uid, 1)
end
return true
end
Thats it
You can put everywhere you want. On movements on talkactions everywhere.
Small eg:
VIP TILE:
Code:
function onStepIn(cid, item, position, lastPosition)
local portal = {x = 32353, y = 32219, z = 7}
local viptimestorage = 15001
local player = Player(cid)
if (player:getStorageValue(viptimestorage) <= os.time()) then
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You don't have VIP priviliges. You can buy VIP doll from website.")
else
doTeleportThing(player, portal)
doSendMagicEffect(portal, CONST_ME_TELEPORT)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been teleported!!")
end
return true
end
Vip time finishing automatically.
Last edited: