PDA

View Full Version : getPlayerProfile("string", var)


Bl0nkt
09-26-2006, 11:18 PM
It'd be nice to get a function to display a specific player's profile. Nothing complicated.

Small example:

function onPlayerChats() {
if (player.chat.starts("find")) {
temp.toks = player.chat.tokenize();
getPlayerProfile(temp.toks[1], 0);
}
}


There could also be ways to get certain information about it.

0 = display full profile
1 = return the name
2 = return the age
3 = return the email address

etc.

Skyld
09-26-2006, 11:32 PM
findPlayer("Foo").showProfile();
... already exists for opening the profile itself although I don't think you can get info from it.

In terms of actually collecting profile information, this might be possible using the serverlister, I will try it sometime.

KuJi
09-27-2006, 12:10 AM
Hachi's Post =o

I posted an example in the Code Gallery of show profile.

findPlayer("Foo").showProfile();
... already exists for opening the profile itself although I don't think you can get info from it.

In terms of actually collecting profile information, this might be possible using the serverlister, I will try it sometime.

Hmm... findPlayer("ACCOUNT") works clientside?

Anyway, heres something:
showProfile(); on it's own just shows a blank profile, to show your own profile you need to do one of the following:


player.showProfile();

players[0].showProfile();

xAndrewx
09-27-2006, 08:53 AM
function onPlayerChats() {
if (player.chat.starts("find")) {
temp.toks = player.chat.tokenize();
getPlayerProfile(temp.toks[1], 0);
}
}
Learn to stylise

function onPlayerChats()
{
if (player.chat.starts("find"))
{
player.chat.tokenize()[1].showProfile();
}
}

Yen
09-27-2006, 02:00 PM
function onPlayerChats() {
if (player.chat.starts("find")) {
temp.toks = player.chat.tokenize();
getPlayerProfile(temp.toks[1], 0);
}
}
Learn to stylise

function onPlayerChats()
{
if (player.chat.starts("find"))
{
player.chat.tokenize()[1].showProfile();
}
}

...
You've failed me.

xAndrewx
09-27-2006, 08:48 PM
Haha, my stylise wasn't any better, for some reason it added random returns where it shouldn't!

Crono
09-27-2006, 09:41 PM
Haha, my stylise wasn't any better, for some reason it added random returns where it shouldn't!

Don't worry, it still confuses noobs like me. :p

Admins
09-28-2006, 12:16 AM
requesttext("lister","getprofile",accountname)

KuJi
09-28-2006, 02:11 AM
requesttext("lister","getprofile",accountname)

Really... now =o.