14891 ratings
Hit Numbers
Rate  
Favorite
Favorited
Unfavorite
Type: Tool, Effects, Addon
Tags: Fun, Cartoon, Comic
Tags: Misc
File Size:
Posted:
Updated:
0.007 MB
Nov 30, 2012 @ 3:19am
Jun 22 @ 12:07am
26 change notes ( view )
Description
Adds damage indicators whenever you hurt something.
This is a serverside (or singleplayer) addon. The server must have this addon installed in order to work in multiplayer.



Clients:

hitnums_toggle - Toggle show/hide the indicators in-game for client only. This command is blocked by default by the server convar sv_hitnums_allowusertoggle (see below, under "Server" category)


Server:

sv_hitnums_enable 0/1 - Disable/Enable this addon server-wide. Obviously ON by default.
sv_hitnums_allowusertoggle 0/1 - Disallow/Allow users to use the client convar hitnums_enable. This is OFF (disallowed) by default.
sv_hitnums_breakablesonly 0/1 - Defaulted to ON. Set this to OFF (0) to show indicators for indestructable props (like barrels), too.
sv_hitnums_showalldamage 0/1 - Defaulted to OFF. Set to ON (1) to show all damage inflictions being made anywhere in the server.
sv_hitnums_ignorez 0/1 - Defaulted to OFF. Ignore depth testing. Basically, setting this to ON (1) means you can see the indicators through walls and objects.
sv_hitnums_scale scale - Defaulted to 0.3. Scale the size of the indicators.
sv_hitnums_ttl seconds - Defaulted to 1.0. Time-to-live in seconds. How long until the indicator completely faded out.
sv_hitnums_showsign 0/1 - Defaulted ON. When enabled, the - (minus) sign on indicators is shown.
sv_hitnums_alpha 0-1 - Defaulted 1.0. Alpha multiplier for indicators. Range is from 0.0 (0%) to 1.0 (100%).

sv_hitnums_critmode mode - Defaulted to 7. Sets how criticals are shown (See list below...)
0 = No Crit (Damage is shown, but not in critical colour)
1 = dmg# (Damage only, in critical colour)
2 = Crit!
3 = Critical!
4 = Crit dmg#
5 = Critical dmg#
6 = Crit! AND dmg#
7 = Critical! AND dmg#

Masking:
(1 = enable/show, most of these are defaulted ON)

sv_hitnums_mask_players 0/1 - Mask players.
sv_hitnums_mask_npcs 0/1 - Mask NPCs.
sv_hitnums_mask_ragdolls 0/1 - Mask ragdolls. (Ragdolls typically don't have health. In that case, sv_hitnums_breakablesonly should be enabled.)
sv_hitnums_mask_vehicles 0/1 - Mask vehicles. (Same thing with ragdolls.)
sv_hitnums_mask_props 0/1 - Mask props. (More specifically; prop_physics* and prop_dynamic*)
sv_hitnums_mask_world 0/1 - Mask world. (More specifically; func_* like func_breakable (ie. glass, doors). This one is defaulted OFF.)

Font:
(These should be set in the server configuration file (cfg/server.cfg, cfg/listenserver.cfg if listen server or singleplayer,) or in the settings file (data/hitnumbers/settings.txt). These should not be modified in-game because fonts are only loaded when the player initializes)

sv_hitnums_font_name fontname - Indicator font face. (Default is coolvetica)
sv_hitnums_font_size size - Size of the font. (Default is 50)
sv_hitnums_font_weight weight - Weight of the font. (Default is 800 [normal weight for coolvetica])
sv_hitnums_font_underline 0/1 - Underline for indicators. (Default is OFF)
sv_hitnums_font_italic 0/1 - Italic indicators. (Default is OFF)
sv_hitnums_font_shadow 0/1 - Adds a little shadow to indicators. (Default is OFF. Not visible when outline is enabled)
sv_hitnums_font_additive 0/1 - Use additive rendering for indicators. (Default is OFF)
sv_hitnums_font_outline 0/1 - Add outline to indicators. (Default is ON)

Colours:
(These are in RRGGBB hexadecimal format[en.wikipedia.org]. For example, sv_hitnums_color_critical FF00FF will make critical hits purple)

sv_hitnums_color_generic RRGGBB - Colour for generic/bullet damage. (Default is FFE6D2)
sv_hitnums_color_critical RRGGBB - Colour for critical damage. (Default is FF2828)
sv_hitnums_color_fire RRGGBB - Colour for fire/burning damage. (Default is FF7800)
sv_hitnums_color_explosion RRGGBB - Colour for explosion damage. (Default is F0F032)
sv_hitnums_color_acid RRGGBB - Colour for acidic/poison/toxic damage. (Default is 8CFF4B)
sv_hitnums_color_electric RRGGBB - Colour for electric/shock damage. (Default is 64A0FF)



Are the Hit Numbers too obnoxious or in the way?
Try some of these tips to fine-tune them:

- Use sv_hitnums_scale to modify the size of the indicators
- Set sv_hitnums_alpha to a low number, like 0.3 - 0.5 so you can see through them easier
- Include sv_hitnums_font_additive 1 in your server's server.cfg file to enable additive[en.wikipedia.org] rendering



ATTN: Server Admins and/or Developers:

I have uploaded the code to GitHub. You may freely modify for your own needs and addons.
However, this does NOT mean you can republish this (original) addon.
Please credit the original author of this addon by linking back to this page. Thank you.

See repository and more details here: http://github.com/ief015/hitnumbers



Want to support the developer?
I rarely play Garry's Mod anymore, so it's not out of the question that one day my addons may lose support. Help motivate me improve and keep my addons up-to-date, and inspire me to create more kickass addons by donating a couple bucks! Every little bit helps, and a huge thank you to those who donate!

PayPal: ief015@gmail.com
Popular Discussions View All (3)
4
Nov 24 @ 6:47pm
Bug Reports
✯OverGod✯
3
Jun 19 @ 6:06pm
This new update is generating errors server side.
Zignd #IRL
0
Dec 18 @ 8:01pm
how to get hitnums on bullets
window and mac guy c:
363 Comments
< >
«☢λndre1009☢» Dec 26 @ 11:53am 
doesnt work help! D:
-{]THRA[}- Alphonse Dec 22 @ 2:03pm 
Ok, thanks!
ief~  [author] Dec 22 @ 10:59am 
@Alphonse you can select any font in your garrysmod\garrysmod\resource\fonts path
-{]THRA[}- Alphonse Dec 22 @ 7:46am 
Are the selectable fonts limited to what comes with this, or can I pick from my downloaded ones?
Baron Dec 6 @ 8:10pm 
Yup works fine the nextbot test npc but not thise nextbot zombies.

Baron<STEAM_0:1:5283917> spawned NPC npc_tf2_ghost
Baron<STEAM_0:1:5283917> spawned NPC npc_nextbot_slowclassic

First one is the test npc while the second one is the nextbot zombie.

http://steamcommunity.com/sharedfiles/filedetails/?id=236239138
ief~  [author] Dec 6 @ 7:00pm 
@Baron as far as I'm concerned it should be working on nextbots (numbers seem to pop up on the test nextbot for me.) Idk how well versed you are with gmod scripting, but as long as the nextbot's "taken damage" hook doesn't interfere with the gamemode's "on entity damaged" hook, it should work fine
Baron Dec 6 @ 3:59pm 
How would I get the hit numbers to show up on nextbot npcs? Its able to show up on regular npcs perfectly fine but not nextbot npcs?
*](-=Pork_King=-)[* Dec 6 @ 12:25pm 
it only works with MK9 Weps for me, how can i fix it?
ThE_HaCKeR101010 Nov 29 @ 5:09pm 
Hi i have a sbox server and i know what is conflicting ulx but i kinda need it none of the hit marker like tools work please help
Sleeping Romney Nov 14 @ 3:29pm 
thanks so much!