Ladder Script

Just a simple LUA by Trivkz that hides the view model when on a ladder.

Credits:
Me - Requesting: http://www.facepunch.com/showthread.php?t=946013
Trivkz - Actually scripting it…

Thanks.

Save the file to desktop and then put in lua/autorun.

Would this stop you from shooting completely or does it ONLY hide the view model, and let you still shoot?

I’m assuming it hides viewmodel and stops you from shooting.

But does it contain custom animations for other players to see, as in a climbing animation?


 PMeta = FindMetaTable("Player")  
   
 function PMeta:IsOnLadder( )  
    if ( self:GetMoveType( ) == MOVETYPE_LADDER ) then  
         return true  
   end  
      
   return false  
       
end  
  
 function CheckLadder( )  
      
    for k, ply in pairs( player.GetAll() ) do  
         if ( ply:IsOnLadder( ) ) then  
             ply:DrawViewModel(false)  
            ply:DrawWorldModel(false)  
           return;  
        end  
          
        ply:DrawViewModel(true)  
       ply:DrawWorldModel(true)  
   end  
 
 end  
hook.Add( "Think", "ThinkCheckLadder", CheckLadder )  

It looks like it just hides both World and View models, no animations.

Hmmm…someone should try that, making a Ladder Climb animation, using the Lua API addon.