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

Solved Help to fix script of /addvip of Azi - The best vip system (vip for account)

Status
Not open for further replies.

Vikarious

New Member
Joined
Dec 16, 2008
Messages
93
Reaction score
2
The tittle is self-explain.

When I use this script:

Lua:
function onSay(cid, words, param) 

     if(words == "/vip")then 
        accountName = getPlayerAccount(cid) 
        if(isVip(accountName))then 
            time = getAccountVipTime(accountName) 
            if(time > 0)then 
                doPlayerSendTextMessage(cid, 19, "Your account have "..timeString(time).." of vip time left.") 
            else 
                doPlayerSendTextMessage(cid, 19, "Your account gratis vip time.") 
            end 
        else 
            doPlayerSendTextMessage(cid, 19, "You haven't any vip time.") 
        end 
    elseif(words == "/addvip")then 
        if(param ~= "")then 
        local params = list({"name", "days"}, string.explode(param, ',', 2)) 
        local player = getPlayerByName(params["name"]) 
            if(isPlayer(player) == TRUE)then 
                if(isNumber(params["days"]))then 
                    local days = (params["days"]*3600*24) 
                    doAccountAddVipTime(getPlayerAccount(player), days) 
                else 
                    doPlayerSendCancel(cid, "Days ammount must be in numeric format.") 
                end 
            else 
                doPlayerSendCancel(cid, "Player is not online.") 
            end 
        else 
            doPlayerSendCancel(cid, "Command requires param.") 
        end 
    end 
    return TRUE 
end

Of this topic:

http://otland.net/f163/best-vip-system-functions-vip-account-30286/


I'm receiving this error into gui:

[03/03/2010 04:08:16] [Error - TalkAction Interface]
[03/03/2010 04:08:16] data/talkactions/scripts/vip/vip.lua: onSay
[03/03/2010 04:08:16] Description:
[03/03/2010 04:08:16] data/talkactions/scripts/vip/vip.lua:17: attempt to call global 'list' (a nil value)
[03/03/2010 04:08:16] stack traceback:
[03/03/2010 04:08:16] data/talkactions/scripts/vip/vip.lua:17: in function <data/talkactions/scripts/vip/vip.lua:1>

I'm posting it here cuz' the topic seems to be a little forget.

Help please.
 
Last edited:
Status
Not open for further replies.
Back
Top