Excuse me for my English, I use a translator
I would like to have changed in this script the ONLY group members( with the right grouptag) can buy by coins (g & s currency)
one has the group does not come * sorry wrong group
the script ( i now that the script works whit a ather script the API Coins(RP-HUd) script)
_____________________________________________________________________________________
// Put this script in same prim as the API Coins (RP-HUD [G&S])
// ** Price in G&S Coins
integer PVP = 100
;
// ** Price in L$
integer PL = 1
;
string nom_obj;
integer active = FALSE;
display()
{
integer cnt = llGetInventoryNumber( INVENTORY_OBJECT );
active = cnt>0;
if(active){
llSetText (" "
+(string)
PVP+" G&S Coin \nor L$"+(string)PL+"\nAvailable: "+(string)cnt, <1,1,1>, 1);
llSetObjectName("G&S Vendor: " +llGetInventoryName(INVENTORY_OBJECT,0));
}else{
llSetText("** Empty **", <1,1,1>, 1);
}
}
default {
state_entry() {
llSetPayPrice(-1,[PL,-1,-1,-1]);
llRequestPermissions(llGetOwner(),PERMISSION_DEBIT);
}
run_time_permissions(integer perm)
{
if (perm&PERMISSION_DEBIT)
{
display();
}
}
touch_start(integer num_detected) {
if(active){
llMessageLinked(LINK_SET, 700, llGetInventoryName(INVENTORY_OBJECT,0)+","+(string)PVP,llDetectedKey(0));
}
}
link_message(integer sender_num, integer num, string str, key id) {
if(num == 701){
llSay( 0 , "Thank you for your purchase: "+llGetInventoryName(INVENTORY_OBJECT,0)+" delivered to "+llKey2Name(id) );
llGiveInventory( id, llGetInventoryName(INVENTORY_OBJECT,0) );
display();
}
if(num == 702){
llSay( 0 , "Vendor is being used by: "+str );
}
}
changed(integer change){
if (change & CHANGED_INVENTORY){
display();
}
}
money(key id, integer amount)
{
if (active && amount==PL)
{
llSay( 0 , ""+llGetInventoryName(INVENTORY_OBJECT,0)+""+llKey2Name(id) );
llGiveInventory( id, llGetInventoryName(INVENTORY_OBJECT,0) );
display();
}
else if (amount)
{
llInstantMessage(id,"There was something wrong with your payment. Your money will be refunded.");
llTransferLindenDollars(id,amount);
}
}
transaction_result(key id, integer success, string data)
{
if (success) llWhisper(0,"Payment refunded");
else llInstantMessage(llGetOwner(),"Refund failure: "+llKey2Name(llList2Key(llParseString2List(data,[","],[]),0))+" "+data);
}
}
______________________________________
Thank you