Enable Ham_Weapon_SecondaryAttack on Weapons (Galil example)

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
219
Реакции
42
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
Код:
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")
}
 
Последнее редактирование:

iPlague

♿️
Сообщения
230
Реакции
130
Помог
2 раз(а)
HamSecondaryAttack is called if each weapon has secondary attack
 

iPlague

♿️
Сообщения
230
Реакции
130
Помог
2 раз(а)
set_member(weapon_entity,m_Weapon_bHasSecondaryAttack, true);

Did u read??

HamHook Ham_Weapon_SecondaryAttack will not call on galil!

On alienmodes some guys wrote about item post frame, try to find smthng about it
 
Сообщения
219
Реакции
42
set_member(weapon_entity,m_Weapon_bHasSecondaryAttack, true);

Did u read??

HamHook Ham_Weapon_SecondaryAttack will not call on galil!

On alienmodes some guys wrote about item post frame, try to find smthng about it
No, definitely you didn't read ANYTHING.
Hook can be called if you modify m_Weapon_bHasSecondaryAttack

Code is working. Don't annoy here.
Solved.
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу