Ham_Weapon_SecondaryAttack is called on weapons that have zoom or silencer.
How to enable that forward to other weapons? (I used Galil example)
I see m_bHasSecondaryAttack on ReGameDLL: https://github.com/s1lentq/ReGameDLL_CS/blob/master/regamedll/dlls/weapons.cpp#L818
So I make this code, but print isn't working.
EDIT: is working. The fault was on the plugin I implemented it
How to enable that forward to other weapons? (I used Galil example)
I see m_bHasSecondaryAttack on ReGameDLL: https://github.com/s1lentq/ReGameDLL_CS/blob/master/regamedll/dlls/weapons.cpp#L818
So I make this code, but print isn't working.
EDIT: is working. The fault was on the plugin I implemented it
Код:
public plugin_init()
{
register_clcmd("say test", "clcmd_saytest")
RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_galil", "fw_Weapon_SecondaryAttack")
}
public clcmd_saytest(id)
{
new iWeaponEnt = give_item(id, "weapon_galil")
cs_set_user_bpammo(id, CSW_GALIL, 90)
set_member(iWeaponEnt, m_Weapon_bHasSecondaryAttack, true) // enable SecondaryAttack on HAM
}
public fw_Weapon_SecondaryAttack(ent)
{
new id = entity_get_edict(ent, EV_ENT_owner)
client_print(id, print_chat, "hola")
}
Последнее редактирование: