Advertisement
IdoGame

niv ya magniv

Nov 18th, 2014
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <fakemeta>
  3. #include <hamsandwich>
  4. #include <cstrike>
  5.  
  6. #define PLUGIN "" // Name the plugin as you want
  7. #define VERSION "0.0.1"
  8.  
  9. new sv_maxvelocity
  10.  
  11. new g_iMaxPlayers
  12. #define IsPlayer(%0) ( 1 <= (%0) <= g_iMaxPlayers )
  13.  
  14. public plugin_init()
  15. {
  16. register_plugin( PLUGIN, VERSION, "ConnorMcLeod" )
  17. RegisterHam(Ham_TakeDamage, "player", "OnCBasePlayer_TakeDamage_Post", true)
  18.  
  19. sv_maxvelocity = get_cvar_pointer("sv_maxvelocity")
  20. g_iMaxPlayers = get_maxplayers()
  21. }
  22.  
  23. // int CBasePlayer :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType )
  24. public OnCBasePlayer_TakeDamage_Post( id, iInflictor, iAttacker, Float:flDamage, bitsDamageType ) // return int
  25. {
  26. if( IsPlayer(iAttacker) && iAttacker == iInflictor && is_user_alive(id) && get_user_weapon(iAttacker) == CSW_DEAGLE && cs_get_user_team(id) != cs_get_user_team(iAttacker) )
  27. {
  28. new Float:velocity[3]
  29. velocity[2] = get_pcvar_float(sv_maxvelocity)
  30. set_pev(id, pev_velocity, velocity)
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement