Jump to content

Give items to a specific person


Sweet2770
 Share

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

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

Recommended Posts

Probably the existing script uses llGiveInventory() inside a touch_start() event. It seems you want to check whether the person who touched is the person you want to give the item to, so you need to "guard" that llGiveInventory with a conditional, something like:

if ("Sweet2770 Resident" == llDetectedName(0))
{
llGiveInventory…
}

(Ah, while I was typing Wulfie answered. I just used llDetectedName instead of llDetectedKey because it might be handier than looking up the key of the intended recipient, although that's also pretty easy especially because they're in the same region, touching stuff.)

Link to comment
Share on other sites

Just one more question, im still learning scripting :)

    touch_start(integer total_number)
    {
        if("sweet2770 Resident"== llDetectedKey(0))
        {
            llGiveInventory(user, llGetInventoryName(INVENTORY_NOTECARD, 0) ); 
        }

what is wrong here? :)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 243 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...