Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Payment Script

TheCreator McCoy
Junior Member
Join date: 3 May 2004
Posts: 5
06-27-2004 20:07
I have been working on a game for a while, and I am nearing completion. The last part that I need to do is a little coding, where it gives a winner the money. It should be easy, because the money will be a fixed amount (20L) and I have everything completed except for the event. What I need to know is how to give the 20L to the same person who paid at the beginning. To recieve money to begin the game, I used the money(key giver, interger amount); string. Can anyone help me with giving the money to the winner?
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
06-27-2004 22:16
Store that giver variable in a global variable and then use the line:
llGiveMoney(globalGiver,20);

You will also need to get PERMISSION_DEBIT from your self (llGetOwner()) in order to give your machine permission to give away your money.

www.badgeometry.com/wiki/llGiveMoney
www.badgeometry.com/wiki/GlobalVariables
http://www.badgeometry.com/wiki/llRequestPermissions
_____________________
--
010000010110110101100001001000000100111101101101011001010110011101100001
--
TheCreator McCoy
Junior Member
Join date: 3 May 2004
Posts: 5
06-28-2004 17:26
I have been trying to figure this out but I dont know how to store the giver as a global variable.
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
06-28-2004 17:54
Well then you suck.
Global variables are declared at the beginning of the script, before "default".
CODE

key globalGiver;

default
{

money(key giver, integer amount)
{
globalGiver=giver;
}

}