Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <fakemeta>
- #include <hamsandwich>
- #include <cstrike>
- #define PLUGIN "" // Name the plugin as you want
- #define VERSION "0.0.1"
- new sv_maxvelocity
- new g_iMaxPlayers
- #define IsPlayer(%0) ( 1 <= (%0) <= g_iMaxPlayers )
- public plugin_init()
- {
- register_plugin( PLUGIN, VERSION, "ConnorMcLeod" )
- RegisterHam(Ham_TakeDamage, "player", "OnCBasePlayer_TakeDamage_Post", true)
- sv_maxvelocity = get_cvar_pointer("sv_maxvelocity")
- g_iMaxPlayers = get_maxplayers()
- }
- // int CBasePlayer :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType )
- public OnCBasePlayer_TakeDamage_Post( id, iInflictor, iAttacker, Float:flDamage, bitsDamageType ) // return int
- {
- 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) )
- {
- new Float:velocity[3]
- velocity[2] = get_pcvar_float(sv_maxvelocity)
- set_pev(id, pev_velocity, velocity)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement