llGiveMoney

From Second Life Wiki
Revision as of 16:14, 19 March 2007 by Awsoonn Rawley (talk | contribs) (added a simple example.)
Jump to navigation Jump to search

Summary

Function: integer llGiveMoney( key destination, integer 0)" style="border-bottom:1px dotted; cursor:help;">amount );

Transfer amount of L$ money from script owner to destination avatar.
Returns an integer that is always zero.

• key destination avatar key.
• integer amount number of L$, must be greater than zero, (amount > 0)

Caveats

  • An object cannot pay another object.
  • Once a script has the PERMISSION_DEBIT permission it can empty an account of L$.
    • Fraud & theft are both Linden Lab violations and crimes.
All Issues ~ Search JIRA for related Bugs

Examples

integer AMOUNT = 100;

default
{
    state_entry()
    {
        llRequestPermissions(llGetOwner(), PERMISSION_DEBIT );  
    }

    changed(integer change)
    {
        if(change &  PERMISSION_DEBIT)
        {
            state ready;     
        }
    }
}

state ready
{
    touch_start(integer num)
    {
        llGiveMoney(llDetectedKey(0), AMOUNT);
    }
}

See Also

Events

•  money

Deep Notes

Search JIRA for related Issues

Signature

function integer llGiveMoney( key destination, integer amount );