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

Windows Console & phpmyadmin error help me out fellows

batte5511

New Member
Joined
Oct 26, 2009
Messages
4
Reaction score
0
Just check the pic and you see a nightmare, know how to fix? feel free to try and help me! :D

k0fwoo.jpg
 
@wtf
for me is possible.

@topic
SQL:
ALTER TABLE `accounts` ADD
`vipdays` int(11) NOT NULL DEFAULT 0;

go to data/lib/function.lua

Lua:
--- Vip functions by Kekox
function getPlayerVipDays(cid)
    local Info = db.getResult("SELECT `vipdays` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. " LIMIT 1")
        if Info:getID() ~= LUA_ERROR then
        local days= Info:getDataInt("vipdays")
        Info:free()
        return days
    end
     return LUA_ERROR
end
 
function doAddVipDays(cid, days)
    db.executeQuery("UPDATE `accounts` SET `vipdays` = `vipdays` + " .. days .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
end
 
function doRemoveVipDays(cid, days)
    db.executeQuery("UPDATE `accounts` SET `vipdays` = `vipdays` - " .. days .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
end

add this line in data/creaturescript/login.lua
Lua:
registerCreatureEvent(cid, "VipCheck")

data/creaturescript/scripts create a new file and name it vipcheck.lua
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

if u have problem:
http://otland.net/f163/best-vip-system-ever-action-movevent-globalevent-71638/
 
Back
Top