複製程式
public shockwave_damage(id)
{
new team = get_user_team(id)
new radius = get_pcvar_num(g_shockwave_range)
new damage = get_pcvar_num(g_shockwave_damage)
new distance
new originF[3], origin1[3]
get_user_origin(id,originF)
for(new i = 1; i <= maxplayers; i++)
{
if(is_user_alive(i) && get_user_team(i) != team)
{
get_user_origin(i, origin1)
distance = get_distance(originF, origin1)
if(distance < radius)
{
if (get_user_health(id) > damage)
fakedamage(i, "Shockwave", float(damage), 0)
else
zp_infect_user(i, id)
}
}
}
}
把原來的shockwave_damage(id)換成這段看看