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 |
|
|
|