ID:148215
 
area
house
var/owner
var/occupied
Entered(atom/A)
if(ismob(A))
var/mob/M = A
if(!src.occupied)
owner = M.key
occupied = 1
else
if(M.key == owner)
M << "Welcome to your home!"
M.houseX = src.x
M.houseY = src.y
M.houseZ = src.z
M.homeless = 1
else
M << "This house is already occupied!"
else
return
houseenter
Enter(atom/A)
if(ismob(A))
var/mob/M = A
for(var/area/house/H in world)
if(H.occupied == 1)
if(H.owner == M.key)
M.loc = locate(M.houseX,M.houseY,M.houseZ)
else
M.loc = locate(H.x, H.y, H.z)
M << "[usr.x],[usr.y],[usr.z]"
else
return

houseexit
Enter()
usr.loc = locate(6,25,1)


This locates them in one of the houses but thats the problem it locates the everyone that enters the area in the same house when only the owner should be able to enter. See anything wrong with this?
*bump*
No put usr in Enter(). Ungh.

Lummox JR
Basically what happens in your houseenter/Enter() proc is that if a mob is what is trying to enter, it sends it to each house in the world in succession, so everyone who enters will end up in the house area that is the last in the list.
In response to Jon88
*Gasp!* Its jon88! Havent seen you in a while.