Garry's Mod

Garry's Mod

DKChat - Huge messages, modable, tags and other!
 This topic has been pinned, so it's probably important
DangerKiddy  [developer] 24 Dec, 2019 @ 4:45am
How to add new module
name - name of the tag TagHelp - Will add this tag in "Emotes and other" menu, write here "false" or "nil" if you don't need that func - function(word, CurrentHeight, CurrentLine, CurrentWidth, LastTag, color) You need to return: #1 processed word #2 your tag name #3 color (OPTIONAL) #4 CurrentHeight + needed (how much you need to add) #5 CurrentLine + needed2 (how much you need to add) #6 CurrentWidth + needed3 (how much you need to add) Examples: DKChat_AddModule("<random_color>", "<random_color> randomize your message! </random_color>", function(word, CurrentHeight, CurrentLine, CurrentWidth, LastTag, color) if word:match("<random_color>") then word = string.Replace(word, "<random_color>", "") color = HSVToColor(math.random(0,360), 1, 1) return word, "random_color", color elseif word:match("</random_color>") then word = string.Replace(word, "</random_color>", "") color = color_white return word, "/random_color", color end end) DKChat_AddModule("bepolite", false, function(word, CurrentHeight, CurrentLine, CurrentWidth, LastTag, color) local start, endp, str = string.find(word, "♥♥♥♥") if start then word = string.sub( word, 1, start - 1 ) .. "****" .. string.sub( word, endp + 1 ) return word, "bepolite", color end end)


Have questions?Ask here!
Last edited by DangerKiddy; 24 Dec, 2019 @ 4:48am