User:Toy Wylie/RLV Documentation/addoutfit

From Second Life Wiki
Jump to navigation Jump to search


@addoutfit

Type

Restriction

Implemented

Implemented since RLV version 1.10

Usage

@addoutfit[:<clothingtype>]=<y/n>

Purpose

This is a counterpart function to @addattach. Blocks the user from wearing the specified clothing type. <clothingtype> may be one of the following items:
  • gloves jacket pants shirt shoes skirt socks underpants undershirt skin eyes hair shape alpha tattoo
If you don't provide a clothing type, the user will be prevented from wearing any clothes at all. Using this general restriction does not remove any single outfit blocks already present. So if you remove the general block later, the single blocks will still be in effect. No clothing items will be detached by this command itself.

Notes

* You can't specify more than one item of clothing at the same time. You need to do one call for each type of clothing you want to block.

See Also

Example

<lsl>integer mode;

default {

   on_rez(integer num)
   {
       llResetScript();
   }

   state_entry()
   {
       mode=0;
       llOwnerSay("Touch me to change the restrictions applied to you.");
   }

   touch_start(integer num)
   {
       if(llDetectedKey(0)==llGetOwner())
       {
           mode++;
           if(mode==3)
           {
               mode=0;
           }
           if(mode==0)
           {
               llOwnerSay("@clear");
               llOwnerSay("You can now wear clothes freely once again.");
           }
           else if(mode==1)
           {
               llOwnerSay("@addoutfit:pants=n,addoutfit:socks=n");
               llOwnerSay("You are now prevented from wearing pants and socks.");
           }
           else if(mode==2)
           {
               llOwnerSay("@addoutfit:pants=y,addoutfit:socks=y,addoutfit=n");
               llOwnerSay("You are now prevented from wearing clothes at all.");
           }
       }
   }

}

</lsl>