• 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!

error system vip kekox

creaturescript "vip.lua"
Lua:
-- Vip medal by Kekox
function onUse(cid, item, fromPosition, itemEx, toPosition)
         if getPlayerVipDays(cid) > 365 then
            doPlayerSendCancel(cid, "You can only have 1 year of vip account or less.")
         else
            doAddVipDays(cid, 15)
            doCreatureSay(cid, "VIP")
            doPlayerPopupFYI(cid, "We have added 15 vip days to your account!\nEnjoy it!.")
            doRemoveItem(item.uid)
         end
        return true
end

Login.lua

Lua:
registerCreatureEvent(cid, "FimVip")

Creaturescrip.xml

XML:
        <event type="login" name="FimVip" event="script" value="vip.lua"/>


AND REMOVEDAYS

removedays.lua

Lua:
--- Script by Kekox
function onTimer()
                 db.executeQuery("UPDATE accounts SET vipdays = vipdays - 1 WHERE vipdays > 0;")
        return true
end


Globalevents.xml

XML:
<globalevent name="VipDaysRemover" time="00:01" event="script" value="daysremover.lua"/>



please ! Thanks
 
Last edited by a moderator:
the vip script is wrong...you put the vip medal (an action) on your script. the vip medal is an action script that u use an item and it gives you 15 vip days... your vip script on creaturescripts should have this:

Lua:
--- Script by Kekox
function onLogin(cid)
         if getPlayerVipDays(cid) >= 1 then
            doPlayerSendTextMessage(cid, 19, "You have ".. getPlayerVipDays(cid) .." vip days left.")
         end
         return true
end

and in daysremover, just erase the R of ontimer, so it is gonna be onTime
 
Last edited by a moderator:
Back
Top