View Full Version : [Call Of Duty 2] Other players his HP bar
Anonymuis
7th April 2014, 18:57
Hello,
Does anyone have an example of an HP bar (The HP bar of an other player like level.killer = self.health and then level.killer as the value of the HP bar or something)
Thanksss,
Anonymuis.
Ni3ls
8th April 2014, 09:14
Its already in cod2. You only need to enable it in the menu file
Anonymuis
8th April 2014, 09:29
I want to create my own HP bar with an HUDelem
IzNoGoD
8th April 2014, 09:59
You should hook into callback_playerdamage and _healthoverlay.gsc for that then. Also, read some hud elem tutorials
Anonymuis
8th April 2014, 10:30
Are those tutorials on this website?
Tally
8th April 2014, 11:30
I want to create my own HP bar with an HUDelem
Why would you want to waste a hud element on something which is already available through the game itself, and which does a better job than any hud element could ever do (the stock health bar pulses when your health is not at max - you can't do that in a hud element)?
To enable the stock health bar you need to do the following:
1. You need to turn health regeneration off;
2. You need to turn on certain cvars on the client in onPlayerSpawned():
self setClientCvar( "cg_drawhealth", "1" );
self setClientCvar( "hud_fade_healthbar", "0" );
Anonymuis
8th April 2014, 11:43
Thats not what i want. There is one player in the game that has level.hp = ...., I want a hud elem so EVeryone in the game can see HIS HP
Tally
8th April 2014, 14:20
Thats not what i want. There is one player in the game that has level.hp = ...., I want a hud elem so EVeryone in the game can see HIS HP
Ok, got ya. Write your own then.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.