Difference between revisions of "LlSameGroupOfficer"
Jump to navigation
Jump to search
m |
Kaluura Boa (talk | contribs) m |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 18: | Line 18: | ||
touch_start(integer number) | touch_start(integer number) | ||
{ | { | ||
do | |||
{ | { | ||
key avatar = llDetectedKey(number); | key avatar = llDetectedKey(--number); | ||
if (llSameGroupOfficer(avatar)) | if (llSameGroupOfficer(avatar)) | ||
{ | { | ||
llGiveInventory(avatar, llGetInventoryName(INVENTORY_OBJECT, 0)); | |||
} | } | ||
else | else | ||
{ | { | ||
llSay(0, "You are not an officer of my group!"); | |||
} | } | ||
} | }while(number); | ||
} | } | ||
}</lsl> | }</lsl> |
Latest revision as of 01:58, 20 February 2009
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
LSL Feature Request | |
The described function does not exist. This article is a feature request. |
Summary
Function: integer llSameGroupOfficer( key agent );REQUEST | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns an integer boolean, that is TRUE if agent is officer in 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 in which agent is an officer
Caveats
Examples
<lsl>// Gives inventory object only to officers of the same group than the object default {
touch_start(integer number) { do { key avatar = llDetectedKey(--number); if (llSameGroupOfficer(avatar)) { llGiveInventory(avatar, llGetInventoryName(INVENTORY_OBJECT, 0)); } else { llSay(0, "You are not an officer of my group!"); } }while(number); }}</lsl>
See Also
Functions
• | llDetectedGroup | – | Used in conjunction with detection events | |
• | llSameGroup | |||
• | llSameGroupOwner |