thanks alot for the script!
i've built a script of my own which divides the money payed between two people, it works perfectly.
only problem is when i try to link it with other parts of my project (when the object with the payment script isn't chosen last) it wont let me pay the set amount, instead it asks how much would i like to pay.
even if i set the right amount it gives me problems..
here is a screenshot of the screen received
also here is the code i wrote
integer percentage=50;
key player;
integer priceToPlay = 2;
key dudu = "791a6a83-0c8f-4b8f-bb7c-a03c64eff29c";
key eran= "7d9de5a1-0a60-4101-8fbf-6cfbcdf87b59";//"6f9118fa-504b-447d-bb14-02edfaae8a24";
default
{
state_entry()
{
llSetClickAction(CLICK_ACTION_PAY);
llSetPayPrice(PAY_HIDE, [ priceToPlay ,PAY_HIDE,PAY_HIDE,PAY_HIDE]);
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
}
money(key id, integer amount)
{
if ( amount >= priceToPlay )
{
llGiveMoney(eran, llRound(amount * (float)(percentage/100.0)));
llGiveMoney(dudu, llRound(amount * (float)(percentage/100.0)));
player = id;
key id = llDetectedKey(0);
string name = llKey2Name(id);
string detectedName = llDetectedName(0);
llSay (-5, "start");
llSay (-5, name);
state default;
}
}
}
any help would appreciated
thanks