Just check to see if the player's contents length is over a certain point, and if it is don't let them add anything else to their contents. You'll also want to make any Get() actions, have an alternative "You can't get that message!" to make it look right, like this:
<code>mob/var/max_items = 5 mob/Enter() if(src.contents.len > max_items) return 0 else return 1</code>
Just check to see if the player's contents length is over a certain point, and if it is don't let them add anything else to their contents. You'll also want to make any Get() actions, have an alternative "You can't get that message!" to make it look right, like this:
<code>obj/Get() if(Move(usr)) usr << "You got it!" else usr << "You don't got it!"</code>