<movevent type="StepIn" uniqueid="30000" event="script" value="VipTp.lua"/>
--function by Frankit0--
function onStepIn(cid, item, frompos, item2, topos)
local vip = getPlayerStorageValue(cid,11551) >= 1 --The storage that the vip system uses.
local kickposition = {x=1000, y=1000, z=7} --Place where the Player will be teleported if not vip, change it
local newposition = {x=1215, y=1042, z=7} --Place where the player will be teleported IF VIP, change it.
if(vip) then
doPlayerSendTextMessage(cid, 19, "You are allowed to pass.")
doSendMagicEffect(getPlayerPosition(cid),2)
doTeleportThing(cid, newposition)
doSendMagicEffect(newposition,10)
else
doPlayerSendTextMessage(cid, 19, "You can't pass.")
doTeleportThing(cid, kickposition)
end
end
<movevent type="StepIn" uniqueid="30000" event="script" value="vipteleport.lua"/>
--Function by Frankit0--
function onStepIn(cid, item, frompos, item2, topos)
local vip = getPlayerStorageValue(cid,11551) >= 1 --The storage that the vip system uses.
local kickposition = {x=1000, y=1000, z=7} --Place where the Player will be teleported if NOT VIP, change it
if(vip) then
doPlayerSendTextMessage(cid, 19, "you are allowed to pass.")
else
doPlayerSendTextMessage(cid, 19, "you can't pass.")
doTeleportThing(cid, kickposition, FALSE)
end
end
local vipStorage = 1234
local newPos = {x = 1234, y = 2345, z = 7}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if getPlayerStorageValue(cid, vipStorage) == 1 then
doTeleportThing(cid, newPos, true)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome Vip player!")
else
doTeleportThing(cid, fromPosition, false)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only Vip players can enter here.")
end
end
What Vip system are you using?
If it's by storage, use this or Blackish's script ;p
You don't need to put any cordinates on the teleport in the mapeditor, just put the cordinates in newPos ;pCode:local vipStorage = 1234 local newPos = {x = 1234, y = 2345, z = 7} function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if getPlayerStorageValue(cid, vipStorage) == 1 then doTeleportThing(cid, newPos, true) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome Vip player!") else doTeleportThing(cid, fromPosition, false) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only Vip players can enter here.") end end
add one here ...? YES / NO [ priv ]
--Function by Frankit0--
function onStepIn(cid, item, frompos, item2, topos)
local vip = getPlayerStorageValue(cid,11551) >= 1 --The storage that the vip system uses.
local kickposition = {x=1000, y=1000, z=7} --Place where the Player will be teleported if NOT VIP, change it
if(vip) then
doPlayerSendTextMessage(cid, 19, "you are allowed to pass.")
else
doPlayerSendTextMessage(cid, 19, "you can't pass.")
doTeleportThing(cid, kickposition, FALSE)
end
end