Second Life Copybot
Give to Group Only script - Printable Version

+- Second Life Copybot (https://secondlifecopybot.com)
+-- Forum: SECOND LIFE PRODUCTS (https://secondlifecopybot.com/forum-1.html)
+--- Forum: SCRIPTS (https://secondlifecopybot.com/forum-1022.html)
+---- Forum: SCRIPTS (https://secondlifecopybot.com/forum-8.html)
+----- Forum: Business Scripts (https://secondlifecopybot.com/forum-44.html)
+----- Thread: Give to Group Only script (/thread-10879.html)



Give to Group Only script - IAmFireProof - 03-20-2016

Set the object to the group you want to share with, put in this script
 
Code:
default
{
   state_entry()
   {
       llSay(0, "");
   }

   touch_start(integer total_number)
   {
           string object = llGetInventoryName(INVENTORY_OBJECT, 0);
      
           if(object)
               {
               if(llSameGroup(llDetectedKey(0)))
                   {
                   llGiveInventory(llDetectedKey(0), object);
                   }
               else
                   {
                   llSay(0, "Sorry, " + llKey2Name(llDetectedKey(0)) + " you must be a member of and wear: Insert name here");  
                   }
               }
           else
               {
               llSay(0,"No object found.");
               }
   }
}