• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

VIP CHECK

so, you have to wait until someone would help you. or waiting for the support team Limos/Ninja when they checked the forums every night
here is my help (a part of lines ) :-
go edit it in your talkaction script

Code:
if(words == "/checkvip") then
if getPlayerAccess(cid) == 5 then
if not param then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
end

local player = getPlayerByName(param)
if not isPlayer(player) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player "..player.." not found.")
end

local timenow = os.time()

local quantity = math.floor((getPlayerStorageValue(player, XXXX) - timenow)/(24 * 60 * 60))
doPlayerPopupFYI(cid, "The player has".. (quantity < 0 and 0 or quantity) .." VIP days in character.")
return TRUE
end
 
[05/12/2014 22:36:27] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/vipcheck.lua:19: 'end' expected (to close 'if' at line 1) near '<eof>'
[05/12/2014 22:36:27] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/vipcheck.lua)
[05/12/2014 22:36:27] data/talkactions/scripts/vipcheck.lua:19: 'end' expected (to close 'if' at line 1) near '<eof>'
 
Last edited:
creaturescript
Code:
function onLogin(cid)
         if getPlayerVipDays(cid) >= 1 then
            doPlayerSendTextMessage(cid, 19, "You have ".. getPlayerVipDays(cid) .." vip days left.")
         end
         return true
end

Code:
    <event type="login" name="Vipcheck" event="script" value="vipcheck.lua"/>

in login.lua
Code:
    registerCreatureEvent(cid, "Vipcheck")
 
creaturescript
Code:
function onLogin(cid)
         if getPlayerVipDays(cid) >= 1 then
            doPlayerSendTextMessage(cid, 19, "You have ".. getPlayerVipDays(cid) .." vip days left.")
         end
         return true
end

Code:
    <event type="login" name="Vipcheck" event="script" value="vipcheck.lua"/>

in login.lua
Code:
    registerCreatureEvent(cid, "Vipcheck")

Are you sure that he has vip tables ?
 
so, you have to wait until someone would help you. or waiting for the support team Limos/Ninja when they checked the forums every night
here is my help (a part of lines ) :-
go edit it in your talkaction script

Code:
if(words == "/checkvip") then
if getPlayerAccess(cid) == 5 then
if not param then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
end

local player = getPlayerByName(param)
if not isPlayer(player) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player "..player.." not found.")
end

local timenow = os.time()

local quantity = math.floor((getPlayerStorageValue(player, XXXX) - timenow)/(24 * 60 * 60))
doPlayerPopupFYI(cid, "The player has".. (quantity < 0 and 0 or quantity) .." VIP days in character.")
return TRUE
end

missing end at the end of script brother :D
 
so change getPlayerVipDays to getPlayerStorageValue xD
creaturescript
Code:
function onLogin(cid)
         if getPlayerVipDays(cid) >= 1 then
            doPlayerSendTextMessage(cid, 19, "You have ".. getPlayerVipDays(cid) .." vip days left.")
         end
         return true
end

Code:
    <event type="login" name="Vipcheck" event="script" value="vipcheck.lua"/>

in login.lua
Code:
    registerCreatureEvent(cid, "Vipcheck")

cannot log in with any char and found these errors :S please help

[06/12/2014 01:13:52] [Error - CreatureScript Interface]
[06/12/2014 01:13:52] data/creaturescripts/scripts/Vipcheck.lua:onLogin
[06/12/2014 01:13:52] Description:
[06/12/2014 01:13:52] (luaGetCreatureStorage) Creature not found

[06/12/2014 01:13:52] [Error - CreatureScript Interface]
[06/12/2014 01:13:52] data/creaturescripts/scripts/Vipcheck.lua:onLogin
[06/12/2014 01:13:52] Description:
[06/12/2014 01:13:52] data/creaturescripts/scripts/Vipcheck.lua:2: attempt to compare number with boolean
[06/12/2014 01:13:52] stack traceback:
[06/12/2014 01:13:52] data/creaturescripts/scripts/Vipcheck.lua:2: in function <data/creaturescripts/scripts/Vipcheck.lua:1>
[06/12/2014 01:13:52] Account Manager has logged out.
 
Code:
function onLogin(cid)
         if getPlayerStorageValue(
cid,11551
) >= 1 then
            doPlayerSendTextMessage(cid, 19, "You have ".. getPlayerVipDays(cid) .." vip days left.")
         end
         return true
end
 
I tested it btw. This appeared as i loged in!
Code:
19:38 You have 2 days of VIP.

Just add this to login.lua
Code:
    if getPlayerStorageValue(cid, 11551) >= 1 then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(cid, 11551) .." days of VIP.")
    end
    if (getConfigValue("accountManager") == FALSE and getCreatureName(cid) == "Account Manager") then
        return false
    end

anywhere under this should work
Code:
local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)

If you cant get it to work line 1 to line 11 should look like this
Code:
local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
    if getPlayerStorageValue(cid, 11551) >= 1 then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(cid, 11551) .." days of VIP.")
    end
    if (getConfigValue("accountManager") == FALSE and getCreatureName(cid) == "Account Manager") then
        return false
    end
 
I tested it btw. This appeared as i loged in!
Code:
19:38 You have 2 days of VIP.

Just add this to login.lua
Code:
    if getPlayerStorageValue(cid, 11551) >= 1 then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(cid, 11551) .." days of VIP.")
    end
    if (getConfigValue("accountManager") == FALSE and getCreatureName(cid) == "Account Manager") then
        return false
    end

anywhere under this should work
Code:
local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)

If you cant get it to work line 1 to line 11 should look like this
Code:
local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
    if getPlayerStorageValue(cid, 11551) >= 1 then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have ".. getPlayerStorageValue(cid, 11551) .." days of VIP.")
    end
    if (getConfigValue("accountManager") == FALSE and getCreatureName(cid) == "Account Manager") then
        return false
    end
[06/12/2014 02:10:48] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/login.lua:65: 'end' expected (to close 'function' at line 6) near '<eof>'
[06/12/2014 02:10:48] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/login.lua)
[06/12/2014 02:10:48] data/creaturescripts/scripts/login.lua:65: 'end' expected (to close 'function' at line 6) near '<eof>'
 
Back
Top