Advertisement
worstbull

Give NC when sitting down

Jan 29th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. default
  2. {
  3.     state_entry()
  4.     {
  5.         // set sit target, otherwise this will not work
  6.         llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION);
  7.     }
  8.  
  9.     changed(integer change)
  10.     {
  11.         if (change & CHANGED_LINK)
  12.         {
  13.             key av = llAvatarOnSitTarget();
  14.             if (av) // evaluated as true if key is valid and not NULL_KEY
  15.             {
  16.                 llGiveInventory(av, llGetInventoryName(INVENTORY_NOTECARD, 0));
  17.             }
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement