Difference between revisions of "LlSameGroupOwner"

From Second Life Wiki
Jump to navigation Jump to search
m (Correction of an error in the script)
m
Line 18: Line 18:
     touch_start(integer number)
     touch_start(integer number)
     {
     {
         --number;
         do
        for (; number >= 0; --number)
         {
         {
             key avatar = llDetectedKey(number);
             key avatar = llDetectedKey(--number);
 
             if (llSameGroupOwner(avatar))
             if (llSameGroupOwner(avatar))
             {
             {
              llGiveInventory(avatar, llGetInventoryName(INVENTORY_OBJECT, 0));
                llGiveInventory(avatar, llGetInventoryName(INVENTORY_OBJECT, 0));
             }
             }
             else
             else
             {
             {
              llSay(0, "You are not an owner of my group!"
                llSay(0, "You are not an owner of my group!"
             }
             }
         }
         }while(number);
     }
     }
}</lsl>
}</lsl>

Revision as of 23:44, 17 July 2008

Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: integer llSameGroupOwner( key agent );
0.0 Forced Delay
10.0 Energy

Returns an integer boolean, that is TRUE if agent is owner of the same group than the object, otherwise FALSE

• key agent must be in the same sim and must carry the appropriate group tag

Also returns TRUE if the object is deeded to the group of which agent is an owner

Examples

<lsl>// Gives inventory object only to owners of the same group than the object default {

   touch_start(integer number)
   {
       do
       {
           key avatar = llDetectedKey(--number);
           if (llSameGroupOwner(avatar))
           {
               llGiveInventory(avatar, llGetInventoryName(INVENTORY_OBJECT, 0));
           }
           else
           {
               llSay(0, "You are not an owner of my group!"
           }
       }while(number);
   }
}</lsl>

See Also

Functions

•  llDetectedGroup Used in conjunction with detection events
•  llSameGroup
•  llSameGroupOfficer

Deep Notes

Signature

//function integer llSameGroupOwner( key agent );