Is there any possibility to log context menu results?

Is there any possibility to log context menu info after each round? I want to gather statistics about roles have been played by each player.

I bet theres a hook for the traitor/detective menu which you could use, if not you’d need to ‘overwrite’ the DoClick functions of the buy buttons, which run their normal old function AND yours.

Let me rephrase my question. Can I check roles after round without having admin-root privileges (just connect to some random server and gather statistics)? I want to save results from context menu tab into some file (format doesn’t really matter). Or can I save info from ttt damage log, if it’s enabled on the server?

As long as you’re able to run Lua on your client, then in theory, it’s possible to gather statistics from random servers, as you say.

I can’t help much with TTT. Are you referring to the context menu in Sandbox? Also, if you want to gather teams statistics, assuming TTT uses the default method of creating teams, couldn’t you just loop through all players on round end and log their teams?

As of damage, unless TTT damage log shares with the client, you’re going to have to log the damage yourself, likely by using

P.S. assuming the damage log is some sort of menu ( Which I think it is ) in that case you’d be able to pull that info as well.

P.P.S. Again, can’t help down to detail as I am not familiar with TTT, but I can help with the logic behind it.

Thanks! That information should be enough for first time.