• 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 Check] help

elking

Swev-v2.sytes.net Comming Soon !<>!
Joined
Aug 20, 2012
Messages
445
Reaction score
28
Location
Egypt
Hello people of Otland.

I need help with vip check

I use this for Vip.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerStorageValue(cid,11551) < 1 then
if getPlayerLevel(cid) > 1 then
getPlayerStorageValue(cid, 11551)
doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for 12 days! You can now enter the VIP!. ", TALKTYPE_MONSTER)
setPlayerStorageValue(cid, 11551, (getPlayerStorageValue(cid,11551) + 12))
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You need to be at least level 1 to use this.")
end
else
doPlayerSendCancel(cid,"You are already a VIP.")
end
return TRUE
end

and this for Vip door.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cidPosition = getCreaturePosition(cid)
if (item.actionid == 5788 and getPlayerStorageValue(cid,11551) >= 1) then
if cidPosition.x < toPosition.x then
doTeleportThing(cid, {x=toPosition.x,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid, {x=toPosition.x -1,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
end
return TRUE
else
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You Are Not Vip ! Donate And Buy It to Enjoy .")
return TRUE
end
return FALSE
end

help I test @Kekox system but it give all character on your account vip days

anyone can help me with vip check or make kekox vip for 1 character
 
Last edited by a moderator:
I'm not sure if this will work or not but try it just for the hell of it.

Check
Code:
function onLogin(cid)
if getPlayerStorageValue(cid, 11551) >= 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have ".. getPlayerStorageValue(cid, 11551) .." vip days left.")
end
return true
end

Remove
Code:
function onTimer()
if getPlayerStorageValue(cid, 11551) >= 1 then
setPlayerStorageValue(cid, 11551, getPlayerStorageValue(cid, 11551) - 1)
end
return true
end
 
I'm not sure if this will work or not but try it just for the hell of it.

Check
Code:
function onLogin(cid)
if getPlayerStorageValue(cid, 11551) >= 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have ".. getPlayerStorageValue(cid, 11551) .." vip days left.")
end
return true
end

Remove
Code:
function onTimer()
if getPlayerStorageValue(cid, 11551) >= 1 then
setPlayerStorageValue(cid, 11551, getPlayerStorageValue(cid, 11551) - 1)
end
return true
end

Sorry for delay I was in Exams
Code:
[01/06/2014 06:23:00] [Error - GlobalEvent Interface]
[01/06/2014 06:23:00] data/globalevents/scripts/daysremover.lua:onTimer
[01/06/2014 06:23:00] Description:
[01/06/2014 06:23:00] (luaGetCreatureStorage) Creature not found

[01/06/2014 06:23:00] [Error - GlobalEvent Interface]
[01/06/2014 06:23:00] data/globalevents/scripts/daysremover.lua:onTimer
[01/06/2014 06:23:00] Description:
[01/06/2014 06:23:00] data/globalevents/scripts/daysremover.lua:2: attempt to compare number with boolean
[01/06/2014 06:23:00] stack traceback:
[01/06/2014 06:23:00]     data/globalevents/scripts/daysremover.lua:2: in function <data/globalevents/scripts/daysremover.lua:1>
[01/06/2014 06:23:00] [Error - GlobalEvents::timer] Couldn't execute event: VipDaysRemover
 
Code:
function onLogin(cid)
if getPlayerStorageValue(pid, 11551) >= 1 then
doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_RED, "You have ".. getPlayerStorageValue(pid, 11551) .." vip days left.")
end
return true
end

Remove
Code:
function onTimer()
if getPlayerStorageValue(pid, 11551) >= 1 then
setPlayerStorageValue(pid, 11551, getPlayerStorageValue(pid, 11551) - 1)
end
return true
end
 
Code:
function onLogin(cid)
if getPlayerStorageValue(pid, 11551) >= 1 then
doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_RED, "You have ".. getPlayerStorageValue(pid, 11551) .." vip days left.")
end
return true
end

Remove
Code:
function onTimer()
if getPlayerStorageValue(pid, 11551) >= 1 then
setPlayerStorageValue(pid, 11551, getPlayerStorageValue(pid, 11551) - 1)
end
return true
end

Code:
[01/06/2014 06:45:35] Admin has logged in.

[01/06/2014 06:45:35] [Error - CreatureScript Interface]
[01/06/2014 06:45:36] data/creaturescripts/scripts/vipcheck.lua:onLogin
[01/06/2014 06:45:36] Description:
[01/06/2014 06:45:36] (luaGetCreatureStorage) Creature not found

[01/06/2014 06:45:36] [Error - CreatureScript Interface]
[01/06/2014 06:45:36] data/creaturescripts/scripts/vipcheck.lua:onLogin
[01/06/2014 06:45:36] Description:
[01/06/2014 06:45:36] data/creaturescripts/scripts/vipcheck.lua:2: attempt to compare number with boolean
[01/06/2014 06:45:36] stack traceback:
[01/06/2014 06:45:36]     data/creaturescripts/scripts/vipcheck.lua:2: in function <data/creaturescripts/scripts/vipcheck.lua:1>
[01/06/2014 06:45:36] Admin has logged out.
 
Guys please... :facepalm:
Function onTimer(notice cid isen't here)
Once I try now to use getPlayerHealth(cid) its not gonna be able to know what the player id is.

Same with the second onTimer()
if(getPlayerStorageValue(pid) >= 1) then

what I guess you should do is:
Code:
function onTimer()
    for _, pid in ipairs(getPlayersOnline()) do
        if(getPlayerStorageValue(pid, 11551) >= 1) then
            setPlayerStorageValue(pid, 11551, getPlayerStorageValue(pid, 11551) - 1)
        end
    end
return true
end
 

Similar threads

Back
Top