So I saw this job (https://scriptfodder.com/jobs/view/2754) on Scriptfodder where the guy requested a Call of Duty-like killcam for Garry’s Mod and some people in the comments saying that it wasn’t possible or would cause too much lag, this interested me so I sorta took it as a challenge to try to make functional killcam. Also I believe this is the first killcam addon that actually tries to simulate the player’s death instead of doing a freeze cam or something similar.
Its basically entity tracking on the server and prediction on the client. When a player fires it saves data about the position, weapon used, angle, and gun sound then when another player dies it checks if their killer had fired a shot recently and if so, sends the killcam data to the client. On the client we just create 3 ClientsideModels and LerpVector them using the data from the server along with a HUDPaint and CalcView hook to make things look real fancy! This addon should work without a problem on any gamemode that doesn’t override GM:PlayerDeathThink with the exception of TTT because I added a fix in for that.