Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

returning the avatar name

Monkey Carbetta
Registered User
Join date: 4 Feb 2007
Posts: 3
10-22-2008 11:59
hey, I'm trying to make a script that will store the names of the people who have payed money to an object in a list, however all I seem to manage is the key id for each avatar... any suggestions?
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
10-22-2008 12:28
This should get you started
CODE

// Very Keynes
// October 2008
//
list names;

default
{
money(key giver, integer amount)
{
string name = llKey2Name(giver);
if(-1 == llListFindList(names, [name]))
{
names += name;
}
}
touch_start(integer total_number)
{
llSay(0, "The following have donated");
integer x;
while( x++ < llGetListLength(names))
llSay(0, llList2String(names, x));
}
}
Monkey Carbetta
Registered User
Join date: 4 Feb 2007
Posts: 3
10-22-2008 13:15
Thanks man :)