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

Teleport (only players lvl 100+ can enter)

PHP:
function onStepIn(cid, item, position, fromPosition)
pos1 = {x=, y=, z=}  ------- Enter the position the teleport should take you here
pos2 = {x=, y=, z=}  ------- Enter the position the teleport should take you if you're not level 100 here
if getPlayerLevel(cid) >= 100 then
doTeleportThing(cid, pos1, 1)
else
doTeleportThing(cid, pos2, 1)
return TRUE
end
 
Simply add a destination & action id to the teleport, and edit your citizen.lua script.

Add this to the Lua file:

Code:
	if(item.actionid == [COLOR="#FF8C00"]ACTION_ID[/COLOR]) then
		if(getPlayerLevel(cid) < 100) then
			doTeleportThing(cid, fromPosition, true)
			doCreatureSay(cid, "You cannot enter this teleport!", TALKTYPE_MONSTER)
		end
	end
 
Back
Top