Garry's Mod

Garry's Mod

Roblox Doors: Экран Смерти
 This topic has been pinned, so it's probably important
norstik 27 Sep, 2022 @ 2:43am
Step by step guide on how to make custom messages.
This discussion will show you step by step on how to create your own custom message when you get killed by an NPC, Nextbot, etc...

Before we begin, unsubscribe from the workshop one, otherwise it can mess it up.

First, you'll have to visit the GitHub link (https://github.com/Livelandr/gmod-doors-death) which is posted in the description and download the code in a ZIP file.

You can do this by clicking the green "Code" button and at the bottom, clicking "Download ZIP".

After you are done, extract the files and put the contents within the respectful files. If the specific file isn't inside the "garrysmod" folder, just drop the folder. (Ex: If there is no "sound" folder, just drop the "sound" folder in that came from the ZIP file.)

Now for the custom message part which is actually pretty simple to understand if you know what you are doing.

Locate the file named "doors_death_config.lua" inside the "lua" folder and open it with Notepad (or any programs which reads text like Microsoft Word.)

Now scroll down for a bit until you reach the section where it checks if an NPC has killed you.

You can use my example code below to copy, paste and edit it.

elseif attacker:GetClass() == "insert the npcs code name" then phrases = { { time = 21, text = "CLOSE_DEATH_SCREEN" }, -- This will close the death screen, DO NOT REMOVE! { time = 15, text = "Text 3" }, { time = 7, text = "Text 2" }, { time = 0, text = "Text 1" } }

In the mentioned code above, you'll first need to find which NPC you want for the death screen to make the custom message for it when that NPC kills you.

Normally, when you get killed by an NPC, it would show what the code name for the NPC is as "You died to (npc code name)...".

For example, I wanna make it so it makes a custom message when Angry Munci kills you. (Addon is below.)

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2849614620

So I'll first get the code name of Angry Munci above and it's "npc_angry_munci".

Once I have the code name, I will put the name inside the quotation marks after the "elseif attacker:GetClass() ==" so it would make something like this:

elseif attacker:GetClass() == "npc_angry_munci" then

Now, you can go ahead and make your own custom messages! Simply just edit the Text 1, Text 2 and Text 3 to your own messages!

You can also change how long the text will last by simply changing the number next to "time =" and it in second, for those wondering.

In the end, this is what my code look's like if anyone wanna copy and paste it for Angry Munci.

elseif attacker:GetClass() == "npc_angry_munci" then phrases = { { time = 21, text = "CLOSE_DEATH_SCREEN" }, { time = 15, text = "Wait no, you can't outrun him..." }, { time = 7, text = "Those eyes are really scary.\nTry to run from them!" }, { time = 0, text = "Who the hell was that?" } }

It's also possible to add and remove the next text. Just remember to not forget to add a comma at the end if it's not in the last line (and remove it if it's in the last line.)

Also, one thing I forgot to mention, if you wanna go to the next line in the text, type "/n" so the text on the right will be in the next lane.

Once done, you can save and you're all done and ready to go! Boot up your game, get killed by the NPC and it will show up!
Last edited by norstik; 27 Sep, 2022 @ 3:00am
< >
Showing 1-15 of 17 comments
Livelandr  [developer] 27 Sep, 2022 @ 4:50am 
Also, you can just copy doors_death_config.lua to your garrysmod/lua/autorun folder, if it's easier for you
norstik 27 Sep, 2022 @ 10:01am 
Ah, that aswell too. I thought it would mess up with the one which is inside the workshop?
76561199075527947 29 Sep, 2022 @ 1:49pm 
so when you open the link, steam doesnt let you go there.
i managed to bypass the linkfilter by using a private window
norstik 29 Sep, 2022 @ 7:29pm 
Originally posted by MEGEN:
so when you open the link, steam doesnt let you go there.
i managed to bypass the linkfilter by using a private window
Perhaps it’s because of Steam trying to prevent malicious websites from peoples who tries to send peoples to wrongful websites.

For those who are trying to go to the link, click the one from the description instead. It should work.
Last edited by norstik; 29 Sep, 2022 @ 7:30pm
Idk why but it didnt work.

Code :


elseif attacker:GetClass() == "npc_mge_engineer" then

phrases = {

{ time = 21, text = "CLOSE_DEATH_SCREEN" },
{ time = 15, text = "If you hear music.. Run. If you can." },
{ time = 7, text = "MGE Brother.." },
{ time = 0, text = "Did you see that?" }

}



end

return phrases

end



Maybe i did something wrong?
Livelandr  [developer] 1 Oct, 2022 @ 2:57pm 
try

elseif attacker:GetClass() == "npc_mge_engineer" then

phrases = {

{ time = 21, text = "CLOSE_DEATH_SCREEN" },
{ time = 15, text = "If you hear music.. Run. If you can." },
{ time = 7, text = "MGE Brother.." },
{ time = 0, text = "Did you see that?" }

}


return phrases

end


return phrases


end
Last edited by Livelandr; 1 Oct, 2022 @ 3:05pm
Too didn't work. Idk why.
norstik 1 Oct, 2022 @ 11:30pm 
Originally posted by Kussia:
Too didn't work. Idk why.

Try posting only this code right after one of the familiar codes.

elseif attacker:GetClass() == "npc_mge_engineer" then phrases = { { time = 21, text = "CLOSE_DEATH_SCREEN" }, { time = 15, text = "If you hear music.. Run. If you can." }, { time = 7, text = "MGE Brother.." }, { time = 0, text = "Did you see that?" } }

For example;

elseif attacker:GetClass() == "npc_glitch" then -- This is when Glitch kills someone. phrases = { { time = 21, text = "CLOSE_DEATH_SCREEN" }, { time = 15, text = "Stay close together!" }, { time = 7, text = "However, I did notice you lagged\nback from your friends." }, { time = 0, text = "That is odd. I cannot figure out who\nyou died to." } } elseif attacker:GetClass() == "npc_mge_engineer" then -- This is your code you'v made. phrases = { { time = 21, text = "CLOSE_DEATH_SCREEN" }, { time = 15, text = "If you hear music.. Run. If you can." }, { time = 7, text = "MGE Brother.." }, { time = 0, text = "Did you see that?" } } elseif attacker:GetClass() == "npc_ambush" or attacker:GetClass() == "npc_livelandr_ambush" or attacker:GetClass() == "npc_drg_ambushdoors" then -- This is where Ambush kills someone. phrases = { { time = 21, text = "CLOSE_DEATH_SCREEN" }, { time = 15, text = "Use what you have learned from\nRush!" }, { time = 7, text = "It is a tricky one." }, { time = 0, text = "You died to who you call Ambush..." } }

I'd usually put my code between the codes of Glitch and Ambush to make it simple.

To locate the code you're trying to find, open the config in Notepad and hit Ctrl + F . This will open a little search bar and type "npc_glitch". It should redirect you.

I'll prob make a video soon to make thing's a whole lot simpler.
Last edited by norstik; 1 Oct, 2022 @ 11:34pm
Thanks. Now it works.
norstik 1 Oct, 2022 @ 11:45pm 
Glad to help!
is there a more ez way this is to much for my 8 year old brain
norstik 13 Oct, 2022 @ 1:50am 
Originally posted by natalie.e.wood1989:
is there a more ez way this is to much for my 8 year old brain
I could do a video one day but it depends.
wrightistheidiot 15 Oct, 2022 @ 2:31pm 
does not work.
norstik 17 Oct, 2022 @ 3:44pm 
Originally posted by WrightIsTheIdiot:
does not work.
Can you mention the issue?
cge7-193 13 Feb, 2023 @ 12:46am 
i need help whenever i edit the text it always puts the normal text and not the one i edited
< >
Showing 1-15 of 17 comments
Per page: 1530 50