Advertisement
CheezPuff

[AMXX] Color Change every Jump

Mar 17th, 2020
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.99 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <engine>
  5. #include <fakemeta_util>
  6.  
  7. #define PLUGIN "Body Color Change when jump"
  8. #define VERSION "1.0"
  9. #define AUTHOR "author"
  10.  
  11.  
  12. public plugin_init() {
  13.     register_plugin(PLUGIN, VERSION, AUTHOR)
  14.    
  15.     // Add your code here...
  16. }
  17.  
  18. public client_PreThink( iPlayer )
  19. {
  20.     if( !is_user_alive( iPlayer ))
  21.         return;
  22.    
  23.     if( get_user_button( iPlayer ) & IN_USE ) {
  24.         if( get_entity_flags( iPlayer ) & FL_ONGROUND ) return
  25.        
  26.         static Float: iVelocity[ 3 ]
  27.         entity_get_vector( iPlayer, EV_VEC_velocity, iVelocity )
  28.        
  29.         if( iVelocity[ 2 ] < 0 ) {
  30.             iVelocity[ 2 ] = ( iVelocity[ 2 ] + 70.0 < -100 ) ? iVelocity[ 2 ] + 07.0 : -100.0
  31.             entity_set_vector( iPlayer, EV_VEC_velocity, iVelocity )
  32.             fm_set_rendering( iPlayer, kRenderFxGlowShell, random_num( 0, 255 ), random_num( 0, 255 ), random_num( 0, 255 ), kRenderNormal, 25 )
  33.         }
  34.     }
  35.     else if( get_user_button( iPlayer ) & ~IN_USE ) fm_set_rendering( iPlayer )
  36.    
  37.     return;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement