Advertisement
Gayngel

Check if inventory item is shared to group

Sep 3rd, 2023 (edited)
2,009
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Check()
  2. {
  3.    
  4.   integer perm = llGetInventoryPermMask( "config",MASK_GROUP);
  5.  
  6.   llOwnerSay((string)perm); // returns 573440 if item is shared to group irrespective of the object being shared or set to move
  7.        
  8.         if(perm == 0x8C000)
  9.         llSay(0,"item is shared.");
  10.        
  11.         else
  12.         llSay(0,"item is not shared.");  
  13.    
  14. }
  15.  
  16. default
  17. {
  18.    
  19.     state_entry()
  20.     {
  21.      
  22.      Check();  
  23.        
  24.     }
  25.    
  26.     changed(integer change)
  27.     {
  28.         if(change & CHANGED_INVENTORY)
  29.         {
  30.          Check();
  31.         }
  32.     }
  33.  
  34.    
  35. }
  36.  
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement