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

[TF2] Medic Showammo 1.0.9


Post New Thread Reply   
 
Thread Tools Display Modes
Author
BrutalGoerge
AlliedModders Donor
Join Date: Jul 2007
Plugin ID:
2204
Plugin Version:
1.0.9
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    Allows medics to see the ammo counts of the people they are healing
    Old 02-01-2011 , 04:51   [TF2] Medic Showammo 1.0.9
    Reply With Quote #1

    Description:
    People have been asking valve for a long time to show your healing target's ammo count. Uber someone and they have no ammo
    Well, with this plugin, you will be able to see the clip and total ammo of your target's primary weapon
    For Demomen, it shows both the primary and secondary.

    Uses client prefs to allow everyone to disable/enable, choose color, choose what charge level to begin seeing ammo acounts, and choose screen position for the message

    Cvars:
    sm_showammo_update_speed 0.5 // Speed to refresh medic ammo counts
    sm_showammo_charge_level 0.90 // charge level to begin displaying ammo counts

    Credits:
    Antithasys wrote a lot of the stocks i used, and made it real easy for me.

    Screenshot:
    http://cloud.steampowered.com/ugc/61...551BFB5038F23/

    Plans/Ideas:
    - Better labeling for the weapons?
    - healing spies....

    Changelog:
    Code:
    1.0.9
    - fix dumb is client in game error loggings :(
    
    1.0.8
    - fix counts for sniper/medic/pyro THANKS SO MUCH Tylerst
    
    1.0.7
    + add bottom left sync hud text position
    - fix typo with ammo counts with snipers
    
    1.0.6
    - fix move timer creation to OnPluginStart() mem leak :(
    
    1.0.5
    + add 2 convars to control who sees the ammo counts
    admins or everyone.
    
    1.0.4
    - change sync hud text to be the same duration as the update speed so 
    the colors show up better
    
    1.0.3
    - simplified message to show LOADED AMMO / MAX AMMO CLIP
    
    1.0.2
    - didnt upload  lulz
    
    1.1
      + add client pref settings for color, enabled, and position
      + add colors pink, green, and white
      - fix mistake with the default and min/max values for the charge level cvar. 
      --> min 0.0 max 1.0
      - replace 'Prim' and 'Sec' with #1 and #2
      --> still not sure if I like this :3
    Attached Files
    File Type: sp Get Plugin or Get Source (tf2_showammo.sp - 1725 views - 21.2 KB)
    __________________
    My Pluggies If you like, consider to me.

    Last edited by BrutalGoerge; 08-29-2012 at 14:04. Reason: Update
    BrutalGoerge is offline
    MEDIK
    Junior Member
    Join Date: Jul 2010
    Old 02-01-2011 , 07:44   Re: [TF2] Medics See Your Ammo!
    Reply With Quote #2

    Looks cool, great job.
    __________________
    MEDIK is offline
    jasonfrog
    Senior Member
    Join Date: Mar 2008
    Old 02-01-2011 , 12:19   Re: [TF2] Medics See Your Ammo!
    Reply With Quote #3

    Fantastic! Great work! You've made a lot of people happy with this.

    Lots of players use custom HUDs, so here are some wild suggestions to make it overly complex.

    Use clientprefs to allow a player to toggle it on or off, and include a command that allows the display to be repositioned.
    i.e. !medichud 0.1 0.78

    Or have a handful of predefined positions and that can be selected.
    jasonfrog is offline
    BrutalGoerge
    AlliedModders Donor
    Join Date: Jul 2007
    Old 02-01-2011 , 15:41   Re: [TF2] Medics See Your Ammo!
    Reply With Quote #4

    Quote:
    Originally Posted by jasonfrog View Post
    Fantastic! Great work! You've made a lot of people happy with this.

    Lots of players use custom HUDs, so here are some wild suggestions to make it overly complex.

    Use clientprefs to allow a player to toggle it on or off, and include a command that allows the display to be repositioned.
    i.e. !medichud 0.1 0.78

    Or have a handful of predefined positions and that can be selected.
    i was planning on it
    __________________
    My Pluggies If you like, consider to me.
    BrutalGoerge is offline
    PMAvers
    Member
    Join Date: Sep 2009
    Old 02-01-2011 , 18:11   Re: [TF2] Medics See Your Ammo!
    Reply With Quote #5

    Is the charge level cvar supposed to be 0.0 to 1.0 (default 0.9), or 0.0 to 100.0 (default 90.0)? In-game, it's using the latter, but in the post here it says the former and I'm wondering if that's why it's not showing up for me.

    EDIT: Looks like it's *supposed* to be the former, since when I changed it to 0.4, it started actually showing up.

    Last edited by PMAvers; 02-01-2011 at 18:15.
    PMAvers is offline
    BrutalGoerge
    AlliedModders Donor
    Join Date: Jul 2007
    Old 02-01-2011 , 18:15   Re: [TF2] Medics See Your Ammo!
    Reply With Quote #6

    yah i fixed that, sorry
    __________________
    My Pluggies If you like, consider to me.

    Last edited by BrutalGoerge; 02-01-2011 at 18:20.
    BrutalGoerge is offline
    jasonfrog
    Senior Member
    Join Date: Mar 2008
    Old 02-01-2011 , 18:52   Re: [TF2] Medics See Your Ammo!
    Reply With Quote #7

    Swift update!

    Couple of typos/errors here.
    Code:
    		if (StrEqual(sSelection, "midleft", false))
    		{
    			g_aClientSettings[client][iPosition] = POS_MIDLEFT;
    			SetClientCookie(client, g_hCookiePosition, "midleft");
    			PrintToChat(client, "[SM] Position set to HISH LEFT");
    		}
    		if (StrEqual(sSelection, "center", false))
    		{
    			g_aClientSettings[client][iPosition] = POS_CENTER;
    			SetClientCookie(client, g_hCookiePosition, "left");
    			PrintToChat(client, "[SM] Position set to CENTER HIGH");
    		}

    Last edited by jasonfrog; 02-01-2011 at 18:56.
    jasonfrog is offline
    BrutalGoerge
    AlliedModders Donor
    Join Date: Jul 2007
    Old 02-01-2011 , 19:43   Re: [TF2] Medics See Your Ammo!
    Reply With Quote #8

    durp
    __________________
    My Pluggies If you like, consider to me.
    BrutalGoerge is offline
    Cuz
    Senior Member
    Join Date: May 2007
    Location: Alaska
    Old 02-10-2011 , 17:20   Re: [TF2] Medic Showammo 1.0.3
    Reply With Quote #9

    Quote:
    Originally Posted by BrutalGoerge View Post
    Uses client prefs to allow everyone to disable/enable, choose color, choose what charge level to begin seeing ammo acounts, and choose screen position for the message
    What command does the client use ingame to set their prefs, and is there anyway, or can it be added so a client can set text size ?
    Cuz is offline
    BrutalGoerge
    AlliedModders Donor
    Join Date: Jul 2007
    Old 02-10-2011 , 17:37   Re: [TF2] Medic Showammo 1.0.4
    Reply With Quote #10

    sm_settings or /settings !settings in chat is the clientprefs menu command

    not aware of any way to change the text size.

    i made it so it will work without clientprefs, it just loses personal customization.
    __________________
    My Pluggies If you like, consider to me.

    Last edited by BrutalGoerge; 02-10-2011 at 17:40.
    BrutalGoerge is offline
    Reply


    Thread Tools
    Display Modes

    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 14:24.


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