ID:174162
 
How can I disallow teleport to any object that is in a certain Z level? In my game I have two, the "player area" (Z level 1) and the "GM area" (Z level 2). Those who host are always on the second Z level and messing everything up. -.-'
I need some code to give exact help. But what I recommend is using an IF statement on the Z of the mob that you are teleporting to.

If you used /mob/M in world. Then do If(M.Z==2) return, else..e.t.c.

~Ease~

<font size = -3>Everything is at ease with Ease</font>
Try creating a seperate /area for each z level, /area/player and /area/gm, then have area/gm check to see if the player entering is a gm, and if not, deny entry.

<code>area/gm Enter(mob/M) if(M.gm) return 1 else return 0</code>
In response to Foomer (#2)
OR you could be evil and do something like:
area
gm
Enter(mob/M)
if(ismob(M))
if(!M.gm)
M << "You can't be here!"
M.z = 1 //Make sure their location is saved on the proper Z level.
del(M) //And boot them for wrong-doing
else
return 1