Author Topic: Click players for info  (Read 1282 times)

I've been wanting to make a script where you can click players to see info about them and here's what I'm trying to do right now

what I want the code below to do is tell me in the chat the name and bl_id of a player when I click them but the problem is the targets info doesn't show up (the rest of the message does)

Code: [Select]
package id
{
function Player::activateStuff(%player)
{
%v = Parent::activateStuff(%player);
%client = %player.client;

%target = containerRayCast(%player.getEyePoint(),vectorAdd(vectorScale(vectorNormalize(%player.getEyeVector()),2),%player.getEyePoint()),$TypeMasks::PlayerObjectType,%player);

if(!isObject(%target) || %target == %player || %player.getObjectMount() == %target)
return %v;

messageclient(%client, '', "\c6Name: \c3" @ %target.name @ "   \c6BL_ID: \c3" @ %target.getblid());

return %v;
}
};
activatePackage(id);

can someone help me out?

I've been wanting to make a script where you can click players to see info about them and here's what I'm trying to do right now

what I want the code below to do is tell me in the chat the name and bl_id of a player when I click them but the problem is the targets info doesn't show up (the rest of the message does)

Code: [Select]
package id
{
function Player::activateStuff(%player)
{
%v = Parent::activateStuff(%player);
%client = %player.client;

%target = containerRayCast(%player.getEyePoint(),vectorAdd(vectorScale(vectorNormalize(%player.getEyeVector()),2),%player.getEyePoint()),$TypeMasks::PlayerObjectType,%player);

if(!isObject(%target) || %target == %player || %player.getObjectMount() == %target)
return %v;

messageclient(%client, '', "\c6Name: \c3" @ %target.name @ "   \c6BL_ID: \c3" @ %target.getblid());

return %v;
}
};
activatePackage(id);

can someone help me out?
%target is the player object. Try using %target.client instead of just %target.

You just registered today and you're already programming?
Wow.

But on topic, I'm pretty sure what you're looking for is the armor::onTrigger function.

You just registered today and you're already programming?
Wow.

But on topic, I'm pretty sure what you're looking for is the armor::onTrigger function.

My BL_ID is in the 7ks lol

%target is the player object. Try using %target.client instead of just %target.

Thank you very much!  It work's flawlessly now :)





I don't know.
He just reeks of alt though.

Too many coding alts these days
what ever happened to logic? the new fangled programmers these days don't seem to have em'.

Too many coding alts these days
what ever happened to logic? the new fangled programmers these days don't seem to have em'.
I agree with both statements

This one may be Slicksilver555.


Oh, wrong guy. I knew I'd seen a slicksilver alt running around.