Button Gives Single Item

Button Gives Single Item

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/******************************************************************
* This example will give an object to an avatar who presses a BUTTON in the menu
* You will need a line in the AVP_Positions notecard to create the BUTTON:
* e.g. BUTTON Coffee|0
******************************************************************/

string button = "Coffee";
string itemname = "Coffee Cup";

default{
    link_message(integer sender, integer num, string msg, key id){
        if(msg==button){
            llGiveInventory(id,itemname);
        }
    }
}

Trending Tags