Proto99 Posted February 26, 2016 Share Posted February 26, 2016 i try to make a tip jar,but it keep give the money to the owner of the tip jar.,i can get the id from the one tiped,money(key id, integer amount) { Total += amount; string str = (string) [Loginname, "'s Tip Jar.\nL$", amount," Was Donated last!\nL$", Total, " Donated so far" ]; llSetText(str, <1,1,1>, 1); llInstantMessage(id,"Thanks for the tip!"); llInstantMessage(id, llKey2Name(id) + " donated L$" + (string) amount ); as i owne the tip jar the tip will all get to me. Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 26, 2016 Share Posted February 26, 2016 That's what it's supposed to do. When you give money to an object, it always goes to the owner of the object. if you want to then send it to someone else, you will need to add llRequestPermissions and a run_time_permissions event in which you use llTransferLindenDollars to send the L$ somewhere else. Link to comment Share on other sites More sharing options...
Proto99 Posted February 26, 2016 Author Share Posted February 26, 2016 Now it asking permision to the owner if bob can tip julie...still not work.. money(key id, integer amount) { Total += amount; string str = (string) [Loginname, "'s Tip Jar.\nL$", amount," Was Donated last!\nL$", Total, " Donated so far" ]; llRequestPermissions(llDetectedKey(0),PERMISSION_DEBIT); llSetText(str, <1,1,1>, 1); llInstantMessage(id,"Thanks for the tip!"); llInstantMessage(id, llKey2Name(id) + " donated L$" + (string) amount ); } run_time_permissions(integer perm) { if (perm & PERMISSION_DEBIT) { llTransferLindenDollars(tid, amount); llWhisper(0,"Thanks for the tip!"); } } } Link to comment Share on other sites More sharing options...
Proto99 Posted February 26, 2016 Author Share Posted February 26, 2016 how thos tips jar work in all those clube,they never ask me premision ............... Link to comment Share on other sites More sharing options...
steph Arnott Posted February 26, 2016 Share Posted February 26, 2016 There are two types, pay as if you give monies to you freind or perms are invoked by a drop down menu. IE you click pay and you have given permission. Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 26, 2016 Share Posted February 26, 2016 Proto99 wrote: Now it asking permision to the owner if bob can tip julie...still not work.. [ .... ] Of course not. You've put the llRequestPermissions statement in the money event. You're not supposed to be requesting permission to debit the account of the person who just donated to the tip jar. You need to request permission from the owner of the tip jar (YOU) to debit the owner's account, so it can send the tip to someone else. You only need to get that permission once, when the script is set up (or when it's restarted). After that, it will always have permission to send tips from you to whoever you designate (your target named tid). Link to comment Share on other sites More sharing options...
Proto99 Posted February 26, 2016 Author Share Posted February 26, 2016 anyway,,waste of time.. Link to comment Share on other sites More sharing options...
Rolig Loon Posted February 26, 2016 Share Posted February 26, 2016 Don't give up now. You're very close. Just get that llRequestPermissions up where it belongs in state_entry and you should have the whole thing solved. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now