• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Vip Acces for Account not Player

paweleq2000

New Member
Joined
Feb 18, 2011
Messages
161
Reaction score
4
Hello, I want to make Vip Acces for all players on one account, it is possible? Now Vip is only for one character on account.
My code
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)


local viptimestorage = 15001
local itemid = 10138
local vipdays = 4
local left = os.date("%d", player:getStorageValue(viptimestorage) - os.time())

if player:getLevel() > 100 then
        return player:sendTextMessage(MESSAGE_INFO_DESCR, "Your level is higher than 100 so you can't use this item!") and false
    end
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 Hours.")
else
player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You got VIP " .. vipdays .. " for hours.")
player:setStorageValue(viptimestorage, os.time() + vipdays * 60 * 60)
doRemoveItem(item.uid, 1)
end
return true
end
d
 

Similar threads

Back
Top