AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [TF2] Health Bar for Spec (https://forums.alliedmods.net/showthread.php?t=270358)

w1200441 08-19-2015 13:34

[TF2] Health Bar for Spec
 
One of the Gun Mettle Updated:
Code:

Added teammate player glow outlines, names, and health bars for spectators
Server toggle: convar tf_spec_xray (defaults to on), Client can toggle in the Advanced Options menu

Does there some codes that can display same health bar for client?

friagram 01-12-2016 14:22

Re: [TF2] Health Bar for Spec
 
tf_spawn_glows_duration 9999999999

Benoist3012 01-31-2016 15:47

Re: [TF2] Health Bar for Spec
 
An other way is to add the condition 114 with duration -1 on the player. It will show to him teammates's healthbar.
Actually this condition isn't added in the tf2.inc file, but we can use it with
Code:
view_as<TFCond>(114)

w1200441 02-06-2016 13:31

Re: [TF2] Health Bar for Spec
 
Quote:

Originally Posted by Benoist3012 (Post 2388872)
An other way is to add the condition 114 with duration -1 on the player. It will show to him teammates's healthbar.
Actually this condition isn't added in the tf2.inc file, but we can use it with
Code:
view_as<TFCond>(114)

What is the name of this condition?

Benoist3012 02-06-2016 15:43

Re: [TF2] Health Bar for Spec
 
Quote:

Originally Posted by w1200441 (Post 2390577)
What is the name of this condition?

For now it doesn't exist in tf2.inc
But I made pull request on Git-Hub https://github.com/alliedmodders/sourcemod/pull/474

So maybe its name will be TFCond_SpawnOutline.

But for now you have to use it like that:
Code:
TF2_AddCondition(client, view_as<TFCond>(114), -1.0);

StormishJustice 04-19-2016 17:47

Re: [TF2] Health Bar for Spec
 
Quote:

Originally Posted by Benoist3012 (Post 2390614)
For now it doesn't exist in tf2.inc
But I made pull request on Git-Hub https://github.com/alliedmodders/sourcemod/pull/474

So maybe its name will be TFCond_SpawnOutline.

But for now you have to use it like that: Code:
TF2_AddCondition(client, view_as<TFCond>(114), -1.0);

So any cond that is not in tf2.inc, i will have to type view_as<TFCond> then the value in brackets? (for example, addcond 108 )

Phil25 04-19-2016 17:55

Re: [TF2] Health Bar for Spec
 
view_as basically tells the compiler to treat a value as a specific type. In this case, treat an integer as TFCond. AFAIK, TF2_AddCondition(client, 114); will work too, but there will be a warning in the compile log.


All times are GMT -4. The time now is 21:12.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.