Rab
Member
I'm using this:
and
and
When i create a door, add action id 5786 it says "only the worthy may pass" or something like that. What am i doing wrong?
Code:
<!-- VIP -->
<action actionid="5786" script="vipdoor.lua"/>
<action itemid="5785" script="vip.lua"/>
and
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayerVip(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, "Sorry, but only VIP Players can pass here! Buy VIP on the WEB.")
end
return TRUE
end
and
Code:
local days = 30
local levelToBeVIP = 1
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) >= levelToBeVIP then
if isPlayerVip(cid) == FALSE then
doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for "..days.." days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
end
doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)
doPlayerAddVipDays(cid, days)
doRemoveItem(item.uid, 1)
doSendAnimatedText(getCreaturePosition(cid), "+"..days.." days", 30)
else
doPlayerSendCancel(cid, "You need level "..levelToBeVIP.." to be a VIP player.")
end
return TRUE
end
When i create a door, add action id 5786 it says "only the worthy may pass" or something like that. What am i doing wrong?