• 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 door?

Code:
-- Credits StreamSide and Empty
function onUse(cid, item, fromPosition, itemEx, toPosition)

    if getPlayerStorageValue(cid,11551) < 1 then
        if getPlayerLevel(cid) > 1 then
            getPlayerStorageValue(cid, 11551)
            doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)
            doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for 15 days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
            setPlayerStorageValue(cid, 11551, (getPlayerStorageValue(cid,11551) + 15))
            doRemoveItem(item.uid, 1)
        else
            doPlayerSendCancel(cid,"You need to be at least level 2 to use this.")
            doRemoveItem(item.uid, 1)
        end
    else
        doPlayerSendCancel(cid,"You are already a donator.")
    end   
return TRUE
end

this is the Vip.lua
 
Last edited by a moderator:
to the Vip island the coordinates are x: 1191 Y: 902 Z:7
just make a teleport infront of the VIP door...
Code:
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid,11551) then
pos = getPlayerPosition(cid)
if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,"Stand in front of the door.")
return true
end
doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Only VIP Account can go there.')
end
return true
end
 
just make a teleport infront of the VIP door...
Code:
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid,11551) then
pos = getPlayerPosition(cid)
if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,"Stand in front of the door.")
return true
end
doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Only VIP Account can go there.')
end
return true
end
At least tab your shit.
 
hey guys how do i make a vip door so only vip players can get through ??
Can I get a confirmation on this code please?
I don't use this distro but it would be cool if someone could test it and let me know how it went.
Code:
local vipStorage = 11551 -- storage value of your vip's
local vipActionid = 1000 -- actionid for the vip door

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.actionid == vipActionid then
        if getPlayerStorageValue(cid, vipStorage) > 0 then
            doTeleportThing(cid, toPosition)
            doSendAnimatedText(toPosition, "Welcome!", TEXTCOLOR_RED)
        else
            doPlayerSendCancel(cid, "You are not a vip player :( ")
            doTeleportThing(cid, fromPosition)
            return false
        end
    end
    return true
end

Place the actionid that is same as the one you choose for vipActionid in the script on the door on your map
You will also need to add this to actions.xml with the vipActionid value, sorry I don't what distro your using :(
 
Last edited:
That's why your camel rider server has like 5 players.
You look like you know nothing ahout scripting mate, watching this thread & didn't help, you prolly heard someone saying you need to tab so you just repeated what he/she said to look "sick", you sir need to go learn what scripting is.
 
Back
Top