[SOLVED] Emit sound with Ham_TakeDamage?
Hey :D
I'm trying to change the sound when we hit the zombie with my extra item, but is not sending anything. I'm using the following code: Code:
RegisterHam(Ham_TakeDamage, "weapon_knife", "Ham_Player_TakeDamage");Code:
RegisterHam(Ham_Item_Deploy, "weapon_knife", "Ham_ItemDeploy_Post", 1); |
Re: [HELP] Emit sound with Ham_TakeDamage?
PHP Code:
Vê se essa boolean tá true. Se tiver, tenta sem ela pra vê se pega. Check if the g_has_item[id] is true. If its, try without him. Tenta fazer debugs com os seus códigos pra vê qual pode ser o problema. Usa tudo que tiver pra descobrir ele. Try debugs for know whats the problem with your code. |
Re: [HELP] Emit sound with Ham_TakeDamage?
[PT-BR]
Código corrigido, haha'. Ok, vou tentar verificar. [EN] Corrected code, haha. OK, I'll try to check. |
Re: [HELP] Emit sound with Ham_TakeDamage?
You also should check for attacker == inflictor, because damage can be done via grenade.
|
Re: [HELP] Emit sound with Ham_TakeDamage?
Remove get_user_weapon check.
There's multiple sounds because you never blocked the other sounds. |
Re: [HELP] Emit sound with Ham_TakeDamage?
if (!is_user_alive(id) || g_has_item[id]) return HAM_IGNORED;
==> if (!is_user_alive(id) || !g_has_item[id]) return HAM_IGNORED; i think |
Re: [HELP] Emit sound with Ham_TakeDamage?
Quote:
|
Re: [HELP] Emit sound with Ham_TakeDamage?
Solved. Just use forward update client data..
|
| All times are GMT -4. The time now is 20:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.