• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

MoveEvent Help Teleport vip

Keshoo

Newer Rich
Joined
Feb 23, 2010
Messages
166
Reaction score
5
Hello Otlanders i made teleport and wanna script that when the vip player go on it it teleport him to vip city and if free player go on it it back him and say only vip players who can use that teleport want this script please :(
 
if you only use a tile without teleport then this is the script

PHP:
	<movevent type="StepIn" uniqueid="30000" event="script" value="VipTp.lua"/>



PHP:
        --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


and if you use teleport

PHP:
        <movevent type="StepIn" uniqueid="30000" event="script" value="vipteleport.lua"/>

PHP:
        --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


Rep+ please:P
 
Last edited:
What Vip system are you using?

If it's by storage, use this or Blackish's script ;p
Code:
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
You don't need to put any cordinates on the teleport in the mapeditor, just put the cordinates in newPos ;p
 
What Vip system are you using?

If it's by storage, use this or Blackish's script ;p
Code:
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
You don't need to put any cordinates on the teleport in the mapeditor, just put the cordinates in newPos ;p

where to put this?
 
--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

Doenst work for 0.3.6? O.o
 
Back
Top