My script uses ls_thirdperson 1 and ls_thirdperson 0 to change camera angles whenever /thirdperson and /firstperson are typed into chat. If a player dies in third person they get a glitchy spectate screen.
I’m trying to make ls_thirdperson set to 0 when a player dies. Here is my attempt, I can’t really test it now, but am I close?
function GM:DoPlayerDeath( ply, attacker, dmginfo )
if ( Player:IsValid() ) then
Player:ConCommand( "ls_thirdperson 0" )
end
end