I can't find what's wrong but try this, I wrote it a long time ago anyway should work... (it's just part of code... make it useful)
Code:
PlayersStats()
{
while(isdefined(self))
{
trace = bullettrace(self geteye()+(0,0,20),self geteye()+(0,0,20)+maps\mp\_utility::vectorscale(anglestoforward(self getplayerangles()),99999),true,self);
if(isplayer(trace["entity"]))
{
if(!isdefined(self.info))
{
self.info = newClientHudElem(self);
self.info.alignx = "center";
self.info.aligny = "center";
self.info.x = 250;
self.info.y = 250;
self.info.fontscale = 0.8;
self.info.label = &"Name: ";
self.info setplayernamestring(trace["entity"]);
self.info.alpha = 0;
self.info fadeOverTime(0.4);
self.info.alpha = 1;
}
else
self.info setplayernamestring(trace["entity"]);
}
else if(!isplayer(trace["entity"]) && isdefined(self.info))
self.info destroy();
wait 0.05;
}
}
Precache:
Code:
precacheString(&"Name: ");