Rejack

JailBreak Climbing Walls - 2013

Jan 16th, 2016 (edited)
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.64 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <fakemeta>
  3. #include <cstrike>
  4. #include <fakemeta_util>
  5.  
  6. new Float:g_iOrigin[32][3]
  7.  
  8. new g_iDay, CSD_NIGHT;
  9.  
  10. public plugin_init()
  11. {
  12.     register_plugin("WallClimb", "1.0f", "WallClimb by Python1320, Climbing Gear by Cheap_Suit")
  13.    
  14.     register_forward(FM_Touch,      "FwdTouch")
  15.     register_forward(FM_PlayerPreThink,     "FwdPlayerPreThink_Climb")
  16.    
  17. }
  18.  
  19. public FwdTouch( client, world )
  20. {
  21.     if ( g_iDay != CSD_NIGHT || !is_user_alive( client ) || cs_get_user_team( client ) != CS_TEAM_CT )
  22.         return 1;
  23.    
  24.     new szClass[ 32 ];
  25.    
  26.     pev( world, pev_classname, szClass, charsmax( szClass ) );
  27.    
  28.     if ( equal( szClass, "worldspawn" ) || equal( szClass, "func_wall" ) || equal( szClass, "func_breakable" ) )
  29.         pev( client, pev_origin, g_iOrigin[ client ] )
  30.    
  31.     return 1;
  32. }
  33.  
  34. public FwdPlayerPreThink_Climb( client )
  35. {
  36.     if ( g_iDay != CSD_NIGHT || cs_get_user_team( client ) != CS_TEAM_CT || !is_user_alive( client ) )
  37.         return 1;
  38.    
  39.     new button = fm_get_user_button( client );
  40.    
  41.     if ( button & IN_JUMP || button & IN_USE )
  42.     {
  43.         static Float:iOrigin[ 3 ];
  44.        
  45.         pev( client, pev_origin, iOrigin );
  46.        
  47.         if ( get_distance_f( iOrigin, g_iOrigin[ client ] ) > 10.0 )
  48.             return 1;
  49.        
  50.         if ( fm_get_entity_flags( client ) & FL_ONGROUND )
  51.             return 1;
  52.        
  53.         if ( button & IN_FORWARD )
  54.         {
  55.             static Float:iVelocity[ 3 ];
  56.            
  57.             velocity_by_aim( client, 270, iVelocity );
  58.            
  59.             fm_set_user_velocity( client, iVelocity );
  60.         }
  61.        
  62.         else if ( button & IN_BACK )
  63.         {
  64.             static Float:iVelocity[ 3 ];
  65.            
  66.             velocity_by_aim( client, -270, iVelocity );
  67.            
  68.             fm_set_user_velocity( client, iVelocity );
  69.         }
  70.     }
  71.    
  72.     return 1;
  73. }
Advertisement
Add Comment
Please, Sign In to add comment