Welcome, Guest. Please login or register.
Did you miss your activation email?
September 19, 2024, 11:54:21 PM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: [REQUEST] Lua script that auto-prints damage logs in console
Pages: [1]
Author Topic: [REQUEST] Lua script that auto-prints damage logs in console  (Read 3759 times)
Tigermisu
Poster

Posts: 28


« on: September 07, 2010, 09:40:04 PM »

Im requesting a lua script that auto-prints damage logs in console after every round ends.

Thanks ;)
Sam
Poster

Posts: 22



« Reply #1 on: September 08, 2010, 12:00:04 AM »

Add the code below to the bottom of garrysmod/gamemodes/terrortown/gamemode/admin.lua
hook.Add( "TTTEndRound", "PrintDmgLog", function()
for k, v in pairs( player.GetAll() ) do
if (not ValidEntity(v)) or v:IsSuperAdmin() then
v:ConCommand("ttt_print_damagelog")
end
end
end )

When the round ends, this will force all Super Admins to use the ttt_print_damagelog console command. If you want this for players other than Super Admins, you're going to have to remove the check from the code above and the function "PrintDamageLog" in admin.lua

http://www.steamcommunity.com/id/samm5506
Tigermisu
Poster

Posts: 28


« Reply #2 on: September 08, 2010, 03:57:56 AM »

Thanks ;)
refan3d
Poster

Posts: 1


« Reply #3 on: September 08, 2010, 04:51:27 AM »

Now is there a way to make this work with source mod?
phoenixf129
Poster

Posts: 476


I Rise from the Ashes.


« Reply #4 on: September 08, 2010, 10:31:34 AM »

Lol. It doesn't need to work with SM... just shove it in lua/autorun/server or edit that file he told you to. SM doesn't even come into it.

Software Upgrade Paradox - If you improve a piece of software enough times, you eventually ruin it.
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: [REQUEST] Lua script that auto-prints damage logs in console « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.008 seconds with 18 queries.