ID:167056
 
I need a delete proc that is mixed up with deleting objects and that the user who wants to delete it can only delete it if he/she made it with Owner.
I think this is what you mean:
mob/verb
Del_Obj(obj/O in oview(1))
if(O.Owner == src.key) //if the obj belongs to the mob
del(O) //delete the obj
else
src<<"\red This Object Doesnt Belong To You!"
In response to Jester619
Thanks
In response to Halovader
i just found out.If you make it you also cant delete it.
In response to Halovader
Please don't double post.

The reason for that is probably because you're not setting the owner to the builder's key.
In response to Mysame
Well my game has names so i had to change src.key to src.name but it dosent work.
In response to Halovader
Euh, mind showing us your delete code and build code?
In response to Mysame
yeh
In response to Halovader
(I accidently pressed post)
here are they


mob/
verb
P_Bag()
set category = "Build"
src.owner = "[usr.key]"
new/obj/P_Bag(usr.loc)


mob/verb
Del_Obj(obj/O in oview(1))
if(O.owner == src.key) //if the obj belongs to
del(O) //delete the obj
else
src<<"\red This Object Doesnt Belong To You!"


In response to Halovader
your doing your build code completely wrong

mob
verb
P_Bag()
set category = "Build"
var/A = new/obj/P_Bag(src.loc)
A.owner = src.key
In response to A.T.H.K
oh ok.Thanks


EDIT.
That codes totaly wrong.
In response to Halovader
Woops sorry its to late for this
mob
verb
P_Bag()
set category = "Build"
var/obj/A = new/obj/Combines/Rock(src.loc)
A.owner = src.key



i forgot var/obj/A
In response to A.T.H.K
Thanks.Now its working