husano896
|
分享:
▲
▼
下面是引用 上帝的右手^^ 于 2012-02-05 21:04 发表的 : 测试过上面大大的代码,但也无效X.X 如果有大大可以帮忙的话,双倍奖赏:D 2/6 17:57修改:traceattack版复制程式
#define TASK_GOTHURT CSW_KNIFE
#define DOUBLE_ATTACK_TIME 0.2 //同时攻击有效的时间
new nohurt[33], Float:g_damage[33]
public fw_TraceAttack(victim, attacker, Float:damage, Float:direction[3], tracehandle, damage_type)
{
if (victim == attacker || !is_user_connected(attacker))
return HAM_IGNORED;
if (!is_user_connected(victim))
return HAM_IGNORED;
switch (nohurt[victim])
{
case 0:
{
if(get_user_weapon(attacker) == CSW_KNIFE)
nohurt[victim] = 1
else if(get_user_weapon(attacker) == CSW_USP)
nohurt[victim] = 2
set_task(DOUBLE_ATTACK_TIME,"remove_hurt",id+TASK_GOTHURT)
g_damage[victim] += damage
return HAM_SUPERCEDE;
}
case 1:
{
if(get_user_weapon(attacker) == CSW_USP)
{
damage +=g_damage[victim]
SetHamParamFloat(3, damage)
remove_hurt(id+TASK_GOTHURT)
return HAM_IGNORED;
}
return HAM_SUPERCEDE;
}
case 2:
{
if(get_user_weapon(attacker) == CSW_KNIFE)
{
damage +=g_damage[victim]
SetHamParamFloat(3, damage)
remove_hurt(id+TASK_GOTHURT)
return HAM_IGNORED;
}
return HAM_SUPERCEDE;
}
}
return HAM_IGNORED;
}
ZBOT支援省略(炸飞
[ 此文章被husano896在2012-02-06 18:00重新编辑 ]
|
|
x1
[5 楼]
From:台湾中华电信股份有限公司 | Posted:2012-02-06 09:45 |
|
|
|