|
Yuli Orman
Registered User
Join date: 4 May 2006
Posts: 20
|
11-10-2006 02:03
hello i m searching for a script which execute a menu when the object is pay. ( sorry for my bad english, i'm french). I mean, i would like the client pay to use an object. When he pays the menu start.
I hope you understand what i m looking for. If doesnt exist, i would like the way to do that. Thanks for your help
|
|
Zebra North
Broadly Offensive
Join date: 7 May 2006
Posts: 48
|
11-10-2006 03:56
You get a money() event when paid. In the event handler, call llDialog() to display a dialog to the user.
|
|
Yuli Orman
Registered User
Join date: 4 May 2006
Posts: 20
|
11-10-2006 09:06
Thank you but :
I want the script run the object's menu (already exist) and i dont know where have i to put the money event.
I have to learn more in scripting but i really want to do that.
i think it s a similar script than a door needing money to open or a game wich execute when paid.
Thank you again.
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
11-10-2006 12:30
As Zebra North quite rightly stated add a money event to the normal running state. Below is a NON WORKING scriptlet that should give you a clue:- default { // Customer has paid us for a game money(key id, integer amt) { if(NULL_KEY == User) { if (amt >= iCost) { // customer has given us at least enough money amt -= iCost; StartGame(id); } } else { llSay(0,"Sorry But a game is currently in progress." ); } if (amt > 0) // give back change { llGiveMoney(id, amt); } }
}
|
|
Yuli Orman
Registered User
Join date: 4 May 2006
Posts: 20
|
11-10-2006 16:32
Thank you very much MERCI!
I m on the good way with your help.
bye bye
|