Raised This Month: $12 Target: $400
 3% 

[TF2] Health Bar for Spec


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
w1200441
Senior Member
Join Date: Dec 2011
Old 08-19-2015 , 13:34   [TF2] Health Bar for Spec
Reply With Quote #1

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?
w1200441 is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-12-2016 , 14:22   Re: [TF2] Health Bar for Spec
Reply With Quote #2

tf_spawn_glows_duration 9999999999
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 01-31-2016 , 15:47   Re: [TF2] Health Bar for Spec
Reply With Quote #3

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)
__________________

Last edited by Benoist3012; 02-01-2016 at 10:11.
Benoist3012 is offline
w1200441
Senior Member
Join Date: Dec 2011
Old 02-06-2016 , 13:31   Re: [TF2] Health Bar for Spec
Reply With Quote #4

Quote:
Originally Posted by Benoist3012 View Post
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?
w1200441 is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 02-06-2016 , 15:43   Re: [TF2] Health Bar for Spec
Reply With Quote #5

Quote:
Originally Posted by w1200441 View Post
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);
__________________
Benoist3012 is offline
StormishJustice
Member
Join Date: May 2015
Location: In a mysterious place.
Old 04-19-2016 , 17:47   Re: [TF2] Health Bar for Spec
Reply With Quote #6

Quote:
Originally Posted by Benoist3012 View Post
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 )
__________________

Last edited by StormishJustice; 04-19-2016 at 17:47.
StormishJustice is offline
Send a message via AIM to StormishJustice Send a message via Yahoo to StormishJustice Send a message via Skype™ to StormishJustice
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 04-19-2016 , 17:55   Re: [TF2] Health Bar for Spec
Reply With Quote #7

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.
Phil25 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:19.


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