I am trying to remove the 3 frags that the game gives when deactivating and exploding the bomb, but he does nothing who can help me
Код:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <reapi>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHookChain(RG_CGrenade_DefuseBombEnd, "CGrenade_DefuseBombEnd", 1);
RegisterHookChain(RG_CGrenade_ExplodeBomb, "CGrenade_ExplodeBomb", 1);
}
public CGrenade_DefuseBombEnd(ent, id, bool:bDefused)
{
if(bDefused)
{
set_entvar(id, var_frags, get_entvar(id, var_frags) - 3.0);
new name[32]
get_user_name(id,name,charsmax(name))
client_print_color(0,1,"DEFUSER IS %s",name);
}
}
public CGrenade_ExplodeBomb(ent)
{
new id = get_entvar(ent, var_owner);
if(is_user_connected(id))
{
set_entvar(id, var_frags, get_entvar(id, var_frags) - 3.0);
new name[32]
get_user_name(id,name,charsmax(name))
client_print_color(0,1,"BOMBER IS %s",name);
}
}