LlSetPayPrice/ja

From Second Life Wiki
< LlSetPayPrice
Revision as of 17:40, 15 August 2008 by Asuka Neely (talk | contribs) (New page: {{LSL_Function/warning/ja|Security|常に (''常に!'') あなたのmoney()イベントで支払われる額を確認しましょう. このUI要素はモーダレスで、過...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Emblem-important-red.png 警告 Security

常に (常に!) あなたのmoney()イベントで支払われる額を確認しましょう. このUI要素はモーダレスで、過去に脆弱性のバグを持っています。 支払いのための制約手段だけのために、この関数を使用しないでください。クライアントソフトウェアがセキュアであることは一度も信用されていません。常に支払い額が予期された値であると、正当性を確認しましょう。

要約

関数: llSetPayPrice( integer price, list quick_pay_buttons );

支払いのテキストフィールドの初期額と、なんらかのこのオブジェクトのPayが選択されたときに表示するダイアログの支払いボタンを設定します。

• integer price PAY_* 定数あるいは正数
• list quick_pay_buttons Four PAY_* 定数と(あるいは)複数の正数の値

この関数はmoneyイベントを実行しなかったステートから呼び出された場合は効果ありません。

定数 Alt 解説
PAY_HIDE -1
0
簡易支払いボタンを隠します。
PAY_DEFAULT -2 簡易支払いボタンに初期値を使用します。
ボタンの並び
1
2
3
4
初期値
$1 $5
$10 $20

警告

  • この関数はオブジェクトに支払い可能な金額の限界が保証されるものではないでしょう。
All Issues ~ Search JIRA for related Bugs

サンプル

これはpriceフィールドを除いて、150の値のボタン一つのみのダイアログボックスをユーザに与えるでしょう。 <lsl>llSetPayPrice(PAY_HIDE, [150,PAY_HIDE,PAY_HIDE,PAY_HIDE])</lsl>

<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, "You paid "+(string)amount+", which is the wrong price, the price is: "+(string)price);
       }
       else
       {
           //insert your give code here.
           llInstantMessage(id, "You paid the right price");
       }
   }
}</lsl>

関連項目

イベント

•  money

関数

•  llGiveMoney

特記事項

Search JIRA for related Issues

Signature

function void llSetPayPrice( integer price, list quick_pay_buttons );
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。