Originally Posted by HamletEagle
Knife is the only weapon that doesn't have client prediction, expect for deploy. So no, you can't do it for other weapons without disabling prediction, recreating the entire weapon and having terrible hit reg.
Btw: why are you using ResetHud to detect Spawn in 2020? Use Ham_Spawn, please.
Ham_Spawn is good method for CS and recommended if a plug-in is CS only.
But just as additional info, and nothing to do with this post, just for more knowledge, there are games such as TFC, DoD I guess and others where Ham_Spawn only gets called on respawn, i.e. when u conenct to a TFC server and join a team and spawn, CBasePlayer::Spawn is not called, and the best reliable method is to use FM_SetOrigin and check if the user is alive, this gets called when it's origin is set, however, it doesn't get called when the player moves even if his origin is updated. It's probably called when EngFunc_SetOrigin is updated, however, it won't be called if this is updated from plug-ins, and it seems that from the engine it's only called when the player spawns as either alive or spectator.