Been viewing Facepunch for many years but thought I should sign up!
I was wondering if anybody would look at my code below and tell me if you see anything wrong with it or if you think it might cause problems.
hook.Add( "Tick","PropLock",function() if pl:Team() != TEAM_PROPS then return end if ply:KeyPressed( IN_RELOAD ) && !ply:Freeze() then ply:Freeze( true ) elseif ply:KeyPressed( IN_RELOAD ) && ply:Freeze() then ply:Freeze( false ) end )
Server works with it and nobody gets kicked with errors. I just want to make sure I’ve done it right - the idea is if a player on the Props team (TEAM_PROPS) presses reload they are frozen but still able to look around (they default to 3rd person at round start).