View Single Post
nosoop
Veteran Member
Join Date: Aug 2014
Old 07-22-2018 , 04:17   Re: [TF2] Optional Instant Respawn Help
Reply With Quote #2

For the Dead Ringer portion, check if the event's death_flags property has TF_DEATHFLAG_DEADRINGER set:

Code:
if (event.GetInt("death_flags") & TF_DEATHFLAG_DEADRINGER) {
    // player feigned death
}
No idea about the class menu detection, other than polling the ConVar you mentioned. Any VGUI events I'd hook into are handled directly on the client's side without the server doing any work.

Would triggering the instant respawn with the Medic! voice keybind be sufficient? You could force the respawn at that point and open up the class select menu to allow class selection. Not 100% sure if it's blocked by the freezecam, though.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline