• 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 days not reduce

crashgb

Crash
Joined
Aug 20, 2013
Messages
48
Reaction score
0
Help! not reduce the VIP days.
I occupy the system VIP by Kekox


check my Action/Script/vipmedal.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, 10)
doCreatureSay(cid, "VIP")
doPlayerPopupFYI(cid, "We have added 10 vip days to your account!\nEnjoy it!.")
doRemoveItem(item.uid)
end
return true
end

check my action.xml

<action itemid="5785" event="script" value="vipmedal.lua"/>

check my Globalevents/script/daysremover

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

and my globalevents.xml

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


what is the problem?

thanks people!!
 
You need added this in phpmyadmin / SQL
Code:
ALTER TABLE `accounts` ADD
`vipdays` int(11) NOT NULL DEFAULT 0;

and use this:
Code:
--- Script by Kekox
function onTime()
      db.executeQuery("UPDATE accounts SET vipdays = vipdays - 1 WHERE vipdays > 0;")
    return TRUE
end

make reload or shutdown and open..
 
Hey Cronox where i add ! this \/


Code:
--- Script by Kekox
function onTime()
      db.executeQuery("UPDATE accounts SET vipdays = vipdays - 1 WHERE vipdays > 0;")
    return TRUE
end
 
Back
Top