hi,
i'd like to find out how i can display a hud element while being in spectator mode. i wan't to display some player stats like k/d etc. of the spectated player.
since your codjumper mode can do something very similiar by displaying fps and pressed keys of a spectated player i thought somebody will be able to help me here
below is what i tried. where self is the player being in specatator mode. sadly this doesn't work at all .. it seems that only hudelements assigned to the spectated player are displayed, not hud elements owned by the spectating player.
- self.spectatordisplay = NewClientHudElem(self);
- self.spectatordisplay.x = 6;
- self.spectatordisplay.y = -34;
- self.spectatordisplay.horzAlign = "left";
- self.spectatordisplay.vertAlign = "bottom";
- self.spectatordisplay.alignX = "left";
- self.spectatordisplay.alignY = "middle";
- self.spectatordisplay.alpha = 0;
- self.spectatordisplay.fontScale = 1.4;
- self.spectatordisplay.hidewheninmenu = false;
- self.spectatordisplay.label = &"^5FPS: ^7&&1";
- self.spectatordisplay FadeOverTime(.5);
- self.spectatordisplay.alpha = 1;
- self.spectatordisplay.glowcolor = (0.0, 0.0, 1.0);
- self.spectatordisplay.glowalpha = 1;
Alles anzeigen
so i tried to create the hudelem like this:
- spectatedplayer = self getspectatorclient();
- self.spectatordisplay = NewClientHudElem(spectatedplayer);
that does work as expected, but displays the hudelement for the spectated player and for the spectating player of course .. how can i display a hudelement only to the spectating player?