PDA

View Full Version : Getting Player Images


killerogue
03-26-2007, 01:11 AM
I was bored. So I scripted this. It isn't anything special. Just nets' you the info of the images currently set to the player, and then echoes it to the F2 Window.

Could be used as is or built upon and used for other things, like getting other attributes from the player.


//#CLIENTSIDE
function onPlayerChats()
{

this.allowed = {

"irule13",
"Codein",
"Admin-Playerworld145",
"mandangop2p"
};

if (player.account in this.allowed)
{
if (player.chat.starts("/openinfo"))
{
tokens = player.chat.tokenize();
pl = findPlayer(tokens[1]);

this.plhd = pl.headimg;
this.plsh = pl.shieldimg;
this.plbd = pl.bodyimg;
this.plsw = pl.swordimg;

}
}
sendrpgmessage("These are" SPC pl.account @ "'s stats:" NL "Head:" SPC this.plhd NL "Shield:" SPC this.plsh NL "Body:" SPC this.plbd NL "Sword:" SPC this.plsw);
}


Have fun! :p

Twinny
03-26-2007, 04:35 AM
Could have used a format() for the sendrpgmessage() part but eh: it all works ^^.

cbk1994
04-01-2007, 04:18 PM
Is there any difference between sendrpgmessage() and echo() clientside?

Twinny
04-01-2007, 04:33 PM
Echo() used serverside just echos into RC (NC to be specific) while sendrpgmessage() serverside sends the echo clientside to the player into the F2 menu, much like a clientside echo().

...did that make sense?

Chandler
04-01-2007, 05:03 PM
Is there any difference between sendrpgmessage() and echo() clientside?

no

xXziroXx
04-01-2007, 08:00 PM
echo() on serverside = message sent to NC
sendrpgmessage() on serverside = message sent to F2 log
echo() on clientside = message sent to F2 log
sendrpgmessage() on clientside = uhm.. doesnt even work?


I would rather see player.echo() then sendrpgmessage() -_-