llGetPermissionsKey
function
Function syntax
key llGetPermissionsKey();- Returns
key- Energy
- 10
Returns the key (UUID) of the avatar that last granted or declined permissions to the script, or NULL_KEY if the permissions request was ignored or cancelled.
Returns NULL_KEY if permissions were neither granted nor declined (e.g., the permissions dialog was cancelled or otherwise ignored).
key result = llGetPermissionsKey();Examples
Section titled “Examples”Example 1
6 collapsed lines
// 1. rez a cube// 2. create a new script and paste this// 3. save script// 4. right-click the prim and choose attach// 5. touch the prim
announce_permissions_key(){ key permissionsKey = llGetPermissionsKey();
llSay(0, "key llGetPermissionsKey() = '" + (string)permissionsKey + "'");}
12 collapsed lines
default{ state_entry() { announce_permissions_key();
key owner = llGetOwner(); llRequestPermissions(owner, PERMISSION_ATTACH); }
touch_start(integer num_detected) { key id = llDetectedKey(0); key owner = llGetOwner(); key permissionsKey = llGetPermissionsKey();
if (id == owner)16 collapsed lines
{ if (permissionsKey == owner) llDetachFromAvatar(); else llSay(0, "Can't detach from you, you have not granted ATTACH perms."); } else llSay(0, "Sorry, you're not the owner!"); }
run_time_permissions(integer perm) { if (perm & PERMISSION_ATTACH) announce_permissions_key(); }}Known issues
Section titled “Known issues”- SVC-4862:
llGetPermissionsKey() doesn’t returnNULL_KEYwhen permissions are declined
See also
Section titled “See also”Functions
Section titled “Functions”Events
Section titled “Events”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.