User:Ugleh Ulrik/GiveBulkMoney

From Second Life Wiki
< User:Ugleh Ulrik
Revision as of 15:45, 22 January 2015 by ObviousAltIsObvious Resident (talk | contribs) (<lsl> tag to <source>)
(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

GiveBulkMoney(list u, integer amount){
integer a = 0;
while(a < llGetListLength(u))
{
    llGiveMoney(llList2Key(u,a), amount);
    ++a;
}
}

Example

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 = ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000000"];
        GiveBulkMoney(users,2);
    }
}