ID:175004
 
I'm having this problem with inventory... I can't seem to get it right..

How would I check to see if he's wearing this specific overlay (obj/shorts/redshorts, or 'red shorts.dmi'), and if he is, he takes the overlay off, but if not, he puts it on?
Thanks in advance

-Camaro-
obj
redshorts
icon='Red Shorts.dmi'
var/wearing
layer=MOB_LAYER+10
verb
Pick_Up()
set src in oview(1)
set category="Items"
Move(usr)
Wear()
set category="Items"
if(src.wearing==0)
src.wearing=1
usr.overlays+=src
usr<<"You wear the [src]"
else
src.wearing=0
usr.overlays-=src
usr<<"You remove the [src]"