• Chat time tags
    6 replies, posted
[b]Summary:[/b] This script adds a time tag to the beginning of chat messages posted by players. It works both client side and server side, and is completely configurable. [b]Usage:[/b] Simply extract and/or place the "[b]sh_timetags.lua[/b]" file into your "[b]garrysmod/lua/autorun[/b]" directory. If placed on the server, the file will automatically download for all connecting clients. After you have placed the file in the right directory, it should work with the default tag format. To change the format or any other settings, simply open your spawnmenu, go to "[b]Options > Player > Time tags[/b]" and change the enabled-ness, time format, whether it should use team color instead of custom color, custom color and other chat related settings as well. All settings will save automatically. The script itself is client side, so if one of your clients( or admins ) change something, it will only affect them. If you do not have access to the spawn menu, here are the equivalent console variables: [list] [*][b]chattag_enabled[/b] - Set to "[b]1[/b]" for enabled, "[b]0[/b]" for disabled, [*][b]chattag_format[/b] - Change the chat tag format, [*][b]chattag_teamcolor[/b] - Set to "[b]1[/b]" to use team color, "[b]0[/b]" to use custom color, [*][b]chattag_showdead[/b] - Set to "[b]1[/b]" to show the *DEAD* tag, "[b]0[/b]" to disable it, [*][b]chattag_showteam[/b] - Set to "[b]1[/b]" to show the (TEAM) tag, "[b]0[/b]" to disable it, [*][b]chattag_color_r[/b] - Red color value for custom color, [*][b]chattag_color_g[/b] - Green color value for custom color, [*][b]chattag_color_b[/b] - Blue color value for custom color. [/list] Here are the accepted time format items: [list] [*][b]%H%[/b] - Current hour in 24-hour format, [*][b]%h%[/b] - Current hour in 12-hour format, [*][b]%M%[/b] - Current minute, [*][b]%S%[/b] - Current second, [*][b]%P%[/b] - PM/AM indicator, [*][b]%p%[/b] - PM/AM indicator lowercased. [/list] The PM/AM indicator items only work if you are using the 12-hour format. [b]Media:[/b] [url=http://solidfiles.com/d/x7rb][img]http://cdn.solidfiles.net/t/x7rb.png[/img][/url] [url=http://solidfiles.com/d/B3VG][img]http://cdn.solidfiles.net/t/B3VG.png[/img][/url] [b]Download:[/b] [b]v1.1[/b] [url=http://www.garrysmod.org/downloads/?a=view&id=71172][img]http://www.garrysmod.org/img/?t=dll&id=71172[/img][/url] [url=http://solidfiles.com/d/lcqg][img]http://solidfiles.com/info_imgs/lcqg.jpg[/img][/url] [url=http://www.garrysmod.org/downloads/?a=view&id=71103][img]http://www.garrysmod.org/img/?t=dll&id=71103[/img][/url]
That's awesome, I needed something like this.
proper term is "Timestamp" brah. cheers.
[QUOTE=nekomimi aficioNYAdo;15675512]proper term is "Timestamp" brah. cheers.[/QUOTE] For some reason I like "time tag" better, but thanks for correcting me. I found a bug that I'm not really proud of. I'll release a small update some time today. Also, I'll make the pm/am thing as a separate format item. [B]Edit:[/B] Updated op.
Your time stamper crashes when the console talks. But no worries I fixed it for you. And I also piggy backed a chat logger I wrote into your code so now it will not only display and record time stamps of anyone who talks but also silently record it as well as their steam ID (so you can find them again) and when they spoke, as well as what map, and server and gamemode you were playing for easier reading later (the game info is only written the moment you join a game, not every time someone talks.) It also records console chat as the console so those elusive console conversations will finally get remembered! I'd have gotten the server's IP to find it again later, but that's not a function I could find listed anywhere. Files are stored by what day they were made. :) If you want I can upload it or something after I get my code working for a server side only version.
Now we've got chat titles, time tags, colors and uhh... what els? Almost everything I think. :)
Chat titles?
Sorry, you need to Log In to post a reply to this thread.