User:Ugleh Ulrik/GiveBulkMoney

From Second Life Wiki
< User:Ugleh Ulrik
Revision as of 17:36, 29 April 2010 by Ugleh Ulrik (talk | contribs) (Created page with 'GiveBulkMoney function will send money to all the uuid's inside of a list. '''Function''' <lsl> GiveBulkMoney(list u, integer amount){ integer a = 0; while(a < llGetListLength(u...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

GiveBulkMoney function will send money to all the uuid's inside of a list.

Function <lsl> GiveBulkMoney(list u, integer amount){ integer a = 0; while(a < llGetListLength(u)) {

   llGiveMoney(llList2Key(u,a), amount);
   ++a;

} }</lsl>

Example Make sure you change the uuid's in the list, i don't want your money accidentally :) <lsl> GiveBulkMoney(list u, integer am){ integer a = 0; while(a < llGetListLength(u)) {

   llGiveMoney(llList2Key(u,a), am);
   ++a;

} }

default {

   state_entry()
   {
        llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
        
   }
   touch_start(integer total_number)
   {

list users = ["fafe960b-a98f-4a65-9168-a94b55f4a8dd", "fafe960b-a98f-4a65-9168-a94b55f4a8dd"];

       GiveBulkMoney(users,2);
   }

}

</lsl>