Group Only Give

Written by Kitsune

Gives an Object only to avatars with the same active group. 

Object to give must be inside prim with this script.

If item is not an object or you wish to give more than 1 item at once, put those items into a "box" object to be given.

 

 

default
{
    touch_start(integer total_number)
    {
        integer number = 0;
        do
        {
            if (llDetectedGroup(number))
                llGiveInventory(llDetectedKey(number), llGetInventoryName(INVENTORY_OBJECT,0));
            else
                llSay(0, "Wrong active group!");
        }while(total_number > ++number);
    }
}