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

Lua How Make a Protection Door?

djtuca

Technical Support
Joined
Jun 25, 2011
Messages
198
Reaction score
3
Location
Brazil
I have this script to premium players pass to door, but many players pass using White Skull

how can I make only players without skull through the door?

Code:
  function onUse(cid, item, fromPosition, itemEx, toPosition)
        if isPremium(cid) == TRUE then
                if getCreaturePosition(cid).y < toPosition.y then
                        doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
                else
                        doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
                end
                doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
                doSendMagicEffect(getCreaturePosition(cid), 10)
        else
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You no Have Premium Account.")
        end
        return TRUE
end
 
im not sure on the server u use, and what the correct line is but

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerSkullType(cid) == 0 then 
        if isPremium(cid) == TRUE then
                if getCreaturePosition(cid).y < toPosition.y then
                        doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
                else
                        doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
                end
                doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
                doSendMagicEffect(getCreaturePosition(cid), 10)
        else
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You no Have Premium Account.")
        end
else
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "First lose the skull.")
end
    return TRUE
end
 
im not sure on the server u use, and what the correct line is but

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerSkullType(cid) == 0 then
        if isPremium(cid) == TRUE then
                if getCreaturePosition(cid).y < toPosition.y then
                        doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
                else
                        doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
                end
                doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
                doSendMagicEffect(getCreaturePosition(cid), 10)
        else
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You no Have Premium Account.")
        end
else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "First lose the skull.")
end
    return TRUE
end

This is truly working. I have TFS 1.2 and it's ok!
 
Back
Top