Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Có ai muốn làm 1 ván dead end ko
[video=youtube;W205VLGsuWg]http://www.youtube.com/watch?v=W205VLGsuWg[/URL][/video]



#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#define PLUGIN "Nghich knife :))"
#define AUTHOR "Duy"
#define VERSION "1.0"
new g_attack[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fw_SecondaryAttack")
RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fw_SecondaryAttack_Post", 1)
RegisterHam(Ham_Weapon_SendWeaponAnim, "weapon_knife", "fw_Weapon_SendWeaponAnim")
}
public fw_SecondaryAttack(ent)
{
if (!pev_valid(ent)) return HAM_IGNORED
new id = pev(ent, pev_owner)
if (!is_user_connected(id)) return HAM_IGNORED
if (!is_user_alive(id) || get_user_weapon(id) != CSW_KNIFE) return HAM_IGNORED
g_attack[id] = 1
set_pdata_float(id, 83, 9999.0, 5)
set_task(0.75, "damage_ex", ent)
return HAM_SUPERCEDE // Đã return nhưng nó vẫn gây damage
}
public damage_ex(ent)
{
new id = pev(ent, pev_owner)
if (is_user_alive(id) && pev_valid(ent))
{
set_pdata_float(id, 83, 0.0, 5)
ExecuteHam(Ham_Weapon_SecondaryAttack, ent)
}
}
public fw_SecondaryAttack_Post(ent)
{
if (!pev_valid(ent)) return HAM_IGNORED
new id = pev(ent, pev_owner)
if (!is_user_connected(id)) return HAM_IGNORED
if (is_user_alive(id))
{
g_attack[id] = 0
SendAnim(id, 5)
}
return HAM_SUPERCEDE
}
public fw_Weapon_SendWeaponAnim(ent, iAnim, skiplocal, body)
{
new id = pev(ent, pev_owner)
if (!is_user_connected(id)) return HAM_IGNORED
if (g_attack[id] == 1) return HAM_SUPERCEDE
return HAM_IGNORED
}
SendAnim(id, anim)
{
if (!is_user_alive(id)) return;
set_pev(id, pev_weaponanim, anim)
message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, _, id)
write_byte(anim)
write_byte(0)
message_end()
}
Bạn di@ss đừng có khiêm tốn nữa, phô cmn ra cho mọi người biết tài đi^
^
- Chỉ có block hết rồi làm knife mới thôi. Chứ ko có vụ block 1 nửa còn 1 nửa sài
^
- ta ko rành weapon đâu. hỏi ta vô ích

wpnid = get_user_weapon(id)
if (headshot)
{
client_print(id, print_chat, "HS!")
}
else if (wpnid == CSW_KNIFE)
{
client_print(id, print_chat, "KF !")
}
else if (wpnid == CSW_HEGRENADE) // đáp bomb cũng ko chạy cái này mà nó print ra "KF !"
{
client_print(id, print_chat, "HE")
}
else
{
client_print(id, print_chat, "Normal")
}
Muốn biết cách fix thì hỏi bạn di@$$ nhé, mình biết cách nhưng bạn ấy giỏi hơn, chắc bạn ấy có cách hay hơnAi xem dùm em code này với .. check với quả bomb thì nó cứ thành dao..
