PDA

View Full Version : Player see in Game Info Score



killersmiley
7th May 2016, 11:40
I have a problemm
I have found in call of duty 2 and have the built in my mod in coduo
and it's also when I show my weapon on a player then me the info is displayed on the player how much does he score
but I mus very close to the player are and just because klapt that now the question how do I do that best that the distance is no issue and if I'm in a house and the other player is down and I player on because of the window display is the info is not shown to you have an ide


PlayersSee()
{

while(1)
{
trace = bullettrace(self geteye(),self geteye()+maps\mp\_utility::vectorscale(anglestofor ward(self getPlayerAngles()),99999),true,self);
if(isplayer(trace["entity"]))
{
if(!isdefined(self.info))
{
self.info = newClientHudElem(self);
self.info.alignx = "center";
self.info.x = 320;
self.info.y = 240;
self.info.alpha = 1;
self.info.fontscale = 0.8;
self.info.label = &"score:";
self.info setValue(trace["entity"].score);
}
}
if(!isplayer(trace["entity"]) && isdefined(self.info))
self.info destroy();

wait 0.1;

}
}

IzNoGoD
7th May 2016, 14:35
PlayersSee()
{

while(1)
{
trace = bullettrace(self geteye(),self geteye()+maps\mp\_utility::vectorscale(anglestofor ward(self getPlayerAngles()),99999),true,self);
if(isplayer(trace["entity"]))
{
if(!isdefined(self.info))
{
self.info = newClientHudElem(self);
self.info.alignx = "center";
self.info.x = 320;
self.info.y = 240;
self.info.alpha = 1;
self.info.fontscale = 0.8;
self.info.label = &"score:";
self.info setValue(trace["entity"].score);
}
else
{
self.info setvalue(trace["entity"].score);
}
}
if(!isplayer(trace["entity"]) && isdefined(self.info))
self.info destroy();

wait 0.1;

}
}

killersmiley
9th May 2016, 08:47
(Germany)

OK danke habe das gesehen hast du für leicht noch neh ide mit der distance , denn ich mus immer sehr dicht an den player sein das das angezeigt wird und das ist doof das wäre schon cool wenn man das auch von sehr weiter distance auch gehen würde

(translate.google - English)

OK thank you've seen that you have for slightly more neh ide with the distance because I mus always be the player that is very dense shown that and that is stupid that would be cool if you would go from very wide distance also

IzNoGoD
9th May 2016, 23:36
Just for your information: PM-ing me the EXACT SAME message as you post here will not make me want to help you more. It will make me want to help you less.

IzNoGoD
10th May 2016, 16:13
I can see nothing wrong with your code, it's just that over a long distance, you have to aim very directly at the player to get the stuff to show. If you dont like that, write your own trace thingy, probably with a few vector operations in it.
Good luck.