Difference between revisions of "LlGiveMoney"

From Second Life Wiki
Jump to navigation Jump to search
(added a simple example.)
Line 10: Line 10:
*Once a script has the PERMISSION_DEBIT permission it can empty an account of L$.
*Once a script has the PERMISSION_DEBIT permission it can empty an account of L$.
**Fraud & theft are both {{LL|TOS}} violations and crimes.
**Fraud & theft are both {{LL|TOS}} violations and crimes.
|examples
|examples=<pre>
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);
    }
}
</pre>
|helpers
|helpers
|also_functions
|also_functions

Revision as of 16:14, 19 March 2007

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 );