Difference between revisions of "Money/pl"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{LSL_Function/warning|Security|Zawsze (''ZAWSZE!'') sprawdzaj wysokość oplaty.}}{{LSL_Event |event_id=20 |event_delay |event=money |p1_type=key|p1_name=id|p1_desc=who paid |p2_type=inte...)
 
m
Line 39: Line 39:
         {
         {
             llGiveMoney(id, amount);
             llGiveMoney(id, amount);
             llInstantMessage(id, "You paid "+(string)amount+", which is the wrong price, the price is: "+(string)price);
             llInstantMessage(id, "Wlacono "+(string)amount+", a jest to suma bledna, Wlasciwa ilosc wynosi: "+(string)price);
         }
         }
         else
         else
         {
         {
             llInstantMessage(id, "You paid the right price");
             llInstantMessage(id, "No. Suma sie zgadza");
         }
         }
     }
     }

Revision as of 11:38, 18 March 2008

Emblem-important-red.png Security Warning!

Zawsze (ZAWSZE!) sprawdzaj wysokość oplaty.

Description

Event: money( key id, integer amount ){ ; }

Wywolywane gdy id wplaca pieniadze do prima w wysokosci amount.

• key id who paid
• integer amount the amount paid

Specification

Kiedy L$ sa wlacana do prima, wtedy przekazywane sa wlascicielowi.
Jesli pieniadze sa wplacane do prima, ktorego wlascicielem jest grupa sa natychmiast rowno dzielone miedzy czlonkow grupy (To wlasnie dlatego grupa nie moze grantowacPERMISSION_DEBIT).<br.> Nie zapomnij ustawic w obiekcie funkcji pay.
Przycisk PAY powinien byc skonfigurowany w wiekszosci aplikacji gdzie pieniadze sa przekazywane (llSetPayPrice), to bardzo ulatwia wplate do obiektu.

Examples

<lsl>integer price = 10;

default {

   state_entry()
   {
       llSetPayPrice(PAY_HIDE, [PAY_HIDE ,PAY_HIDE, PAY_HIDE, PAY_HIDE]);
       llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
   }
   run_time_permissions(integer perm)
   {
       if(perm & PERMISSION_DEBIT)
           state cash;
   }

}

state cash {

   state_entry()
   {
       llSetPayPrice(price, [price ,PAY_HIDE, PAY_HIDE, PAY_HIDE]);
   }
   money(key id, integer amount)
   {
       if(amount != price)
       {
           llGiveMoney(id, amount);
           llInstantMessage(id, "Wlacono "+(string)amount+", a jest to suma bledna, Wlasciwa ilosc wynosi: "+(string)price);
       }
       else
       {
           llInstantMessage(id, "No. Suma sie zgadza");
       }
   }

}</lsl>

See Also

Functions

•  llGiveMoney Przekaz pieniadze nastepnemu avatarowi
•  llSetPayPrice Skonfiguruj przycisk pay

Deep Notes

Signature

event void money( key id, integer amount );