[Half-Life AMXX] / climb.sma Repository:
ViewVC logotype

Diff of /climb.sma

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 38, Mon Feb 18 12:15:29 2008 UTC revision 40, Sun Feb 24 09:34:01 2008 UTC
# Line 269  Line 269 
269  #include <cstrike>  #include <cstrike>
270  #include <cstrike2>  #include <cstrike2>
271    
272  new const VERSION[ ] = "a3.7.6 Feb 18 05:11 MST"  new const VERSION[ ] = "a3.7.7 Feb 23 18:32 MST"
273  new const TRKCVAR[ ] = "climb_version"  new const TRKCVAR[ ] = "climb_version"
274    
275  new const DONOTHING[ ] = "donothing"  new const DONOTHING[ ] = "donothing"
# Line 1465  Line 1465 
1465    
1466  stock change_boost( id, newboost, silent = 0 )  stock change_boost( id, newboost, silent = 0 )
1467  {//Change Boost flags  {//Change Boost flags
1468          //if( !( cvar_enabled( id, p_boost, silent ) && isalive( id ) ) && notpaused( id ) ) return PLUGIN_HANDLED          //if( !( cvar_enabled( id, p_boost, silent ) && isalive( id ) ) && notpaused( id ) ) return;
1469          if( !isalive( id ) || !notpaused( id ) ) return PLUGIN_HANDLED          if( !isalive( id ) || !notpaused( id ) ) return;
1470    
1471          new msg[151], rmflag, cflags = timer[ id ][ TMR_CFLAGS ]          new msg[151], rmflag, cflags = timer[ id ][ TMR_CFLAGS ];
1472          if( cflags & CF_SOLID )          if( cflags & CF_SOLID )
1473          {          {
1474                  if( task_exists( 150 + id ) ) remove_task( 150 + id )                  if( task_exists( 150 + id ) ) remove_task( 150 + id );
1475                  rmflag = CF_SOLID                  rmflag = CF_SOLID;
1476                  msg = "Solid Boost Disabled.^n"                  msg = "Solid Boost Disabled.^n";
1477          }          }
1478          else if( cflags & CF_SUPER_JUMP )          else if( cflags & CF_SUPER_JUMP )
1479          {          {
1480                  rmflag = CF_SUPER_JUMP                  rmflag = CF_SUPER_JUMP;
1481                  msg = "Super Jump Disabled.^n"                  msg = "Super Jump Disabled.^n";
1482          }          }
1483          else if( cflags & CF_DOUBLE_JUMP)          else if( cflags & CF_DOUBLE_JUMP)
1484          {          {
1485                  rmflag = CF_DOUBLE_JUMP                  rmflag = CF_DOUBLE_JUMP;
1486                  msg = "Double Jump Disabled.^n"                  msg = "Double Jump Disabled.^n";
1487          }          }
1488          if( rmflag > 0 ) timer[ id ][ TMR_CFLAGS ] -= rmflag          if( rmflag > 0 ) timer[ id ][ TMR_CFLAGS ] -= rmflag;
1489          if( !( rmflag & newboost ) && \          if( !( rmflag & newboost ) &&
1490                  !check_timeout( id, time_stamps[id][TS_BOOST], BOOST_TIMEOUT, ( cflags & CF_START ? timer[id][TMR_CNTTME] / 10 : get_systime() ) ) )                  !check_timeout( id, time_stamps[id][TS_BOOST], BOOST_TIMEOUT, ( cflags & CF_START ? timer[id][TMR_CNTTME] / 10 : get_systime() ) ) )
1491          {          {
1492                  if( newboost == CF_SOLID && boost_enabled( id, SOLID, silent ) )                  if( newboost == CF_SOLID && boost_enabled( id, SOLID, silent ) )
1493                  {                  {
1494                          format( msg, 150, "%sSolid Boost Enabled.", msg )                          format( msg, 150, "%sSolid Boost Enabled.", msg );
1495                          new ida[1]                          new ida[1];
1496                          ida[0] = id                          ida[0] = id;
1497                          set_task( 15.0, "solid_boost_timer", 150 + id, ida, 1 )                          set_task( 15.0, "solid_boost_timer", 150 + id, ida, 1 );
1498                          if( timer[ id ][ TMR_CFLAGS ] & CF_START ) timer[ id ][ TMR_CNTBST ]++                          if( timer[ id ][ TMR_CFLAGS ] & CF_START ) timer[ id ][ TMR_CNTBST ]++;
1499                    }
1500                    else if( newboost == CF_SUPER_JUMP && boost_enabled( id, SJUMP, silent ) )
1501                            format( msg, 150, "%sSuper Jump Enabled.", msg );
1502                    else if( newboost == CF_DOUBLE_JUMP && boost_enabled( id, DJUMP, silent ) )
1503                            format( msg, 150, "%sDouble Jump Enabled.", msg );
1504                    else return;
1505                    timer[ id ][ TMR_CFLAGS ] += newboost;
1506                  }                  }
1507                  if( newboost == CF_SUPER_JUMP && boost_enabled( id, SJUMP, silent ) )          clmsg( id, msg );
                         format( msg, 150, "%sSuper Jump Enabled.", msg )  
                 if( newboost == CF_DOUBLE_JUMP && boost_enabled( id, DJUMP, silent ) )  
                         format( msg, 150, "%sDouble Jump Enabled.", msg )  
                 timer[ id  ][ TMR_CFLAGS ] |= newboost  
         }  
         if(strlen(msg))clmsg(id,msg)  
         return PLUGIN_HANDLED  
1508  }  }
1509    
1510  //Task to auto disable solid boost after timeout  //Task to auto disable solid boost after timeout
# Line 2180  Line 2180 
2180    
2181  stock clmsg( id, msg[] )  stock clmsg( id, msg[] )
2182  {//Show Hud Message  {//Show Hud Message
2183            //if( !strlen( msg ) ) return PLUGIN_HANDLED;
2184          set_hudmessage( get_pcvar_num( p_msg_r ), get_pcvar_num( p_msg_g ), get_pcvar_num( p_msg_b ),          set_hudmessage( get_pcvar_num( p_msg_r ), get_pcvar_num( p_msg_g ), get_pcvar_num( p_msg_b ),
2185                  get_pcvar_float( p_msg_x ), get_pcvar_float( p_msg_y ), 0, 0.0, 5.0, 0.5, 0.5, 4 )                  get_pcvar_float( p_msg_x ), get_pcvar_float( p_msg_y ), 0, 0.0, 5.0, 0.5, 0.5, 4 );
2186          show_hudmessage( id, msg )          show_hudmessage( id, msg );
2187    
2188          //Show to spectators          //Show to spectators
2189          for( new i = 1; i <= spec_ids[id][0]; i++ )          for( new i = 1; i <= spec_ids[id][0]; i++ )
2190                  show_hudmessage( spec_ids[id][i], msg )                  show_hudmessage( spec_ids[id][i], msg );
2191    
2192          return PLUGIN_HANDLED          return PLUGIN_HANDLED;
2193  }  }
2194    
2195  //Fill spectator data array used for msg replication  //Fill spectator data array used for msg replication

Legend:
Removed from v.38  
changed lines
  Added in v.40

Contact
ViewVC Help
Powered by ViewVC 1.0.4