Garry's Mod

Garry's Mod

Not enough ratings
NPC CustomName Base
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Gamemode
Addon Tags: Fun, Roleplay
File Size
Posted
37.094 KB
16 Nov, 2023 @ 1:36pm
1 Change Note ( view )

Subscribe to download
NPC CustomName Base

Description
Have you ever wondered how SNPC And other kind of Scripted/VJ NPC's have Custom Kill Icon Names but yours have not? Well look no further!! This mod is very simple to do so!


Q: How do i set my own NPC a custom name?
A: Very simply just add: self.npc.ClassLangOverride = "Put name here" <-- You can copy and paste it
Q: Does this work with SNPC? or VJ NPC's?
A: No they have their own ClassLang codes.

What it does is when ever NPC that has the custom ClassLang with name when it kills a NPC,Player or dies it will display it's custom name. If you add the code into the Custom Scripted NPC Your making without this addon installed the custom name will not display.

All the coding credits are from Uklejamini

Keep in mind if original base gamemode updates this mod will be updated too
New Image will come soon.
3 Comments
CP Unit  [author] 25 Feb, 2024 @ 6:20am 
@Fish You put them into the init.lua It only works for NPC's
horizon 6 Jan, 2024 @ 3:29am 
sooo wheres the self.npc.classlangoverride sorry if i am stupid
gm_Redlerman16 22 Dec, 2023 @ 6:58am 
[NPC CustomName Base] gamemodes/base/gamemode/player.lua:192: Tried to use a NULL entity!
1. GetClass - [C]:-1
2. unknown - gamemodes/base/gamemode/player.lua:192
3. BlastDamageInfo - [C]:-1
4. unknown - lua/weapons/wiz_lightning_caller.lua:343

found this error, fix?