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

(REQUEST)(Movement)SIMPLE TP script! Rep++ for helping!

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,780
Solutions
31
Reaction score
2,299
Location
Sweden?
I need a script when player have a monster summoned then he cant enter the teleport, but if he has no monster summoned he can enter the teleport

Hmm i not a scripiter: but i think it will contaion this things:
if getPlayerLevel(cid) >= 35 then
if #getCreatureSummons(cid) >= 1 then
doPlayerSendCancel(cid,'Please call back your summon to enter the tp!.')
doPlayerSendCancel(cid,'Only levels 35 or up can enter.')


Help Rep+++
 
Last edited:
This should do:

LUA:
local position = {x=1000,y=1000,z=7} --the position to where he is tped
local minlvl = 35 --the minimum level required to enter the tp
function onStepIn(cid, item, pos)
local summons = #getCreatureSummons(cid)

if summons <= 0 then
   if getPlayerLevel(cid) > minlvl then
      doTeleportThing(cid,position)
   else
       doPlayerSendCancel(cid, "You need atleast level " ..minlvl.. " to enter!")
       return false
   end
else
    doPlayerSendCancel(cid, "You can't enter while a summmon is active!")
    return false
end
return true
end
 
Its come You can't enter while a summmon is active but i can still enter the teleport
 
Thanks rep! to dudeim! and cyko could you fix that he get push 1sqm back if he have the monster summoned? then i give you rep
 
Last edited:
LUA:
local position = {x=1000,y=1000,z=7} --the position to where he is tped
local minlvl = 35 --the minimum level required to enter the tp
function onStepIn(cid, item, pos, frompos) 
local summons = #getCreatureSummons(cid)
 
if summons <= 0 then
   if getPlayerLevel(cid) > minlvl then
      doTeleportThing(cid,position)
   else
       doPlayerSendCancel(cid, "You need atleast level " ..minlvl.. " to enter!")
       doTeleportThing(cid, frompos, TRUE)
       return false
   end
else
    doPlayerSendCancel(cid, "You can't enter while a summmon is active!")
    doTeleportThing(cid, frompos, TRUE)
    return false
end
return true
end
 
LUA:
local position = {x=1000,y=1000,z=7} --the position to where he is tped
local minlvl = 35 --the minimum level required to enter the tp

function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if #getCreatureSummons(cid) == 0 then
		   if getPlayerLevel(cid) >= minlvl then
			  doTeleportThing(cid, position)
			  doSendMagicEffect(pos, CONST_ME_TELEPORT)
			  doSendMagicEffect(position, CONST_ME_TELEPORT)
			  return
		   else
			   doPlayerSendCancel(cid, "You need atleast level " ..minlvl.. " to enter!")
		   end
		else
			doPlayerSendCancel(cid, "You can't enter while a summmon is active!")
		end
		doTeleportThing(cid, fromPos, true)
	end
end
 
Back
Top