|
Senior Member
Join Date: Jun 2020
Location: Argentina
|
06-26-2022
, 12:35
Re: Requesting a HE damage multiplier that works and does not mess with scoreboard.
|
#5
|
Quote:
Originally Posted by DJEarthQuake
Rewritten with cs_ham_bots_api. Install it and include.
PHP Code:
/*Tired of weak grenades?*/ #include <amxmodx> #include <amxmisc> #include <engine> #include <hamsandwich>
#define CZ ///uncomment for CZ bot damage
#if defined CZ #tryinclude cs_ham_bots_api //https://github.com/djearthquake/amxx/tree/main/scripting/czero/AI #endif
#define PLUGIN "Grenade Damage Adjust" #define VERSION "06-25-22" #define AUTHOR "SPiNX"
#define HE_IMMUNITY_ACCESS ADMIN_RCON
#if !defined DMG_GRENADE const DMG_GRENADE = (1<<24) #endif
new Float:Xmultipler new const CvarXmultiplerDesc[]="Grenade damage multiplier" new bool:bOF_run new g_MOD_DMG
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR);
register_touch("grenade", "func_breakable", "@pop") register_touch("grenade", "func_pushable", "@pop")
bind_pcvar_num(get_cvar_pointer("mp_grenade_multiplier") ? get_cvar_pointer("mp_grenade_multiplier") : create_cvar("mp_grenade_multiplier", "10.0" ,FCVAR_SERVER, CvarXmultiplerDesc,.has_min = true, .min_val = 0.0, .has_max = true, .max_val = 10.0), Xmultipler)
bOF_run = is_running("gearbox") || is_running("valve") g_MOD_DMG = !bOF_run ? DMG_GRENADE : DMG_BLAST
RegisterHam(Ham_TakeDamage, "player", "Fw_Damage"); #if defined CZ if(is_running("czero")) { RegisterHamBots(Ham_TakeDamage, "Fw_Damage") } #endif }
@pop(grenade, breakable) ExecuteHam(Ham_TakeDamage,breakable,breakable,grenade,500.0,DMG_CRUSH)
public Fw_Damage(victim, inflictor, attacker, Float:fDamage, dmgbits) { if(is_user_connected(victim) && !is_user_bot(attacker)) { if( dmgbits == g_MOD_DMG) { if(fDamage) { #define DAMAGE 4 new Damage_adj = fDamage*Xmultipler;
if(/*access(victim, HE_IMMUNITY_ACCESS) ||*/ !Xmultipler) return HAM_SUPERCEDE else { SetHamParamFloat(DAMAGE, float(Damage_adj)) if(is_user_connected(attacker)) { client_print attacker, print_center, "%d", Damage_adj client_print attacker, print_console, "%n hit %n with %d grenade damage", attacker, victim, Damage_adj }
}
}
} else return HAM_IGNORED } return HAM_HANDLED }
|
Seems solid work, it is working really great. Thank you so so much! finally i have this!
i can donate little amount of USD because i dont use that currency in my country.
PM your paypal account
Last edited by Ark_Procession; 06-26-2022 at 12:36.
Reason: forgot to thank!
|
|
|
|