AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Medic Showammo 1.0.9 (https://forums.alliedmods.net/showthread.php?t=149027)

BrutalGoerge 02-01-2011 04:51

[TF2] Medic Showammo 1.0.9
 
10 Attachment(s)
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


MEDIK 02-01-2011 07:44

Re: [TF2] Medics See Your Ammo!
 
Looks cool, great job.

jasonfrog 02-01-2011 12:19

Re: [TF2] Medics See Your Ammo!
 
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.

BrutalGoerge 02-01-2011 15:41

Re: [TF2] Medics See Your Ammo!
 
Quote:

Originally Posted by jasonfrog (Post 1404666)
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 :D

PMAvers 02-01-2011 18:11

Re: [TF2] Medics See Your Ammo!
 
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.

BrutalGoerge 02-01-2011 18:15

Re: [TF2] Medics See Your Ammo!
 
yah i fixed that, sorry

jasonfrog 02-01-2011 18:52

Re: [TF2] Medics See Your Ammo!
 
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");
                }


BrutalGoerge 02-01-2011 19:43

Re: [TF2] Medics See Your Ammo!
 
durp

Cuz 02-10-2011 17:20

Re: [TF2] Medic Showammo 1.0.3
 
Quote:

Originally Posted by BrutalGoerge (Post 1404406)
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 ?

BrutalGoerge 02-10-2011 17:37

Re: [TF2] Medic Showammo 1.0.4
 
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.


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

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