Jump to content

set pay amount on pay buttons


AnaZofia
 Share

You are about to reply to a thread that has been inactive for 4278 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I cant get it to work... can you please help me?

 

integer CHANNEL = 55;integer total;generalParticleEmitterOn()                (xxx cutted long script)default{        on_rez(integer s)    {//       llResetScript();    }    state_entry()    {        updateText();//        {generalParticleEmitterOn();        llListen(CHANNEL, "", llGetOwner(), "");    }       money (key giver, integer amount) {        llSay(0, "Thanks for the " + (string)amount + "L$, " + llKey2Name(giver));        total+=amount;        updateText();        generalParticleEmitterOn();                            }        touch_start(integer count)    {        if(llDetectedKey(0)==llGetOwner())        {            llDialog(llDetectedKey(0), "Clear total amount?", ["Yes","No"], CHANNEL);        }    }        listen(integer channel, string name, key id, string message)    {        if( message=="Yes" && id==llGetOwner() )        {            total = 0;            updateText();        }    }}

 

Link to comment
Share on other sites

That should do the trick:

integer CHANNEL = 55;integer total;generalParticleEmitterOn()                (xxx cutted long script)default{        on_rez(integer s)    {//       llResetScript();    }    state_entry()    {        updateText();//        {generalParticleEmitterOn();        llListen(CHANNEL, "", llGetOwner(), "");        llSetPayPrice(PAY_HIDE,[25,100,200,500]);    }       money (key giver, integer amount) {        llSay(0, "Thanks for the " + (string)amount + "L$, " + llKey2Name(giver));        total+=amount;        updateText();        generalParticleEmitterOn();                            }        touch_start(integer count)    {        if(llDetectedKey(0)==llGetOwner())        {            llDialog(llDetectedKey(0), "Clear total amount?", ["Yes","No"], CHANNEL);        }    }        listen(integer channel, string name, key id, string message)    {        if( message=="Yes" && id==llGetOwner() )        {            total = 0;            updateText();        }    }}

 

  • Like 1
Link to comment
Share on other sites

If you set your listening filter like this:

llListen(CHANNEL, "", llGetOwner(), "");

why do you need this check:

    listen(integer channel, string name, key id, string message)    {        if( message=="Yes" && id==llGetOwner() )        {            . . .         }    }

Who else is it going to listen to except for the owner?

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4278 days.

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
 Share

×
×
  • Create New...