Advertisement
RuthvenWillenov

Unsit If not in list

Jun 23rd, 2018
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. list whitelist = ["some name", "some name 2"];
  2. default
  3. {
  4.     changed(integer change)
  5.     {
  6.         if(change & CHANGED_LINK)
  7.         {
  8.             key id = llAvatarOnSitTarget();
  9.             if(id)
  10.             {
  11.                 if(id != llGetOwner())
  12.                 {
  13.                     string name = llKey2Name(id);
  14.                     if(llListFindList(whitelist, [name]) == -1)
  15.                     {
  16.                         llUnSit(id);
  17.                     }
  18.                 }
  19.             }
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement