|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
05-11-2006 11:26
Is there a way to automatically charge a user L$ when sitting on an object? Right now we can *give* $L to people sitting on our chairs and stuff(aka Draw) but is there a way to do Take?
|
|
Kayla Stonecutter
Scripting Oncalupen
Join date: 9 Sep 2005
Posts: 224
|
05-11-2006 11:41
Scripts can only take money from the owner, and only after PERMISSION_DEBIT has been granted by the owner. This has been done to prevent people stealing money from others.
|
|
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
|
05-11-2006 11:47
Haven't looked into this, but you may be able to set it up the opposite way . . . they can only sit if they pay. So, they "pay" from the pie menu, and upon receipt of the correct amount, the object allows them to sit. If they have not paid, they are automatically "unsit"ted.
Don't know how well this would work, just an idea off the top of my head.
Baron
|
|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
05-11-2006 12:00
Ok, so if PERMISSION_DEBIT has been granted by the user once, does it have to be done repeatedly?
So if they're sitting in my chair and they're supposed to pay L$5 time for every 20 minutes they're sitting down, will they have to give permission each time?
And I'm assuming its possible to do a check if payment fails 'cause their broke. if(nopay==true){get your ass up} (sudo code heh)
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
05-11-2006 13:06
I don't think you understood the earlier answer. It is only possible to request PERMISSION_DEBIT from the object's owner - that would be you. Unless they take ownership of the chair you can NOT autodebit them for sitting in it. I'm not sure what the deal is with llGiveMoney() if you try to give more than you've got.
Baron's approach should work - they pay up front to "hire" the chair and get reminded to pay it every however often, if they don't pay they get unsat. Doing it that way, the money event includes a variable for the amount they paid, so you can check it that way, and they can't pay more than they've got.
|
|
Rodrick Harrington
Registered User
Join date: 9 Jul 2005
Posts: 150
|
05-11-2006 22:27
From: Eloise Pasteur I'm not sure what the deal is with llGiveMoney() if you try to give more than you've got. not relevant to the OPs question, but it silently (to the script, though it does give an error in the debug window iirc) fails.
|