ID:149479
 
How would i get an obj to check ones name when the person dose something. For Example... They try to buy a house but someone already owns it the obj will say no this house belongs to (the name of the owner). If anyone has any Tips plz tell me Thx



-Err0r
Err0r wrote:
How would i get an obj to check ones name when the person dose something. For Example... They try to buy a house but someone already owns it the obj will say no this house belongs to (the name of the owner). If anyone has any Tips plz tell me Thx

It's very simple! Just create a variable that will store a reference to someone. Some code will make it clear:
obj
house
icon = 'house.dmi'
var
mob/owner = null // Just to make it clear that noone owns this house.

verb
buy()
set src = oview(1)
if(owner)
usr << "This house is owned by [owner]."
else
owner = usr
usr << "Congratulations, you bought a house!"
In response to Gazoot
Thank You, do u have AIM my Aim is park3d MiNi vAn
In response to Err0r
Err0r wrote:
Thank You, do u have AIM my Aim is park3d MiNi vAn

No I don't.