SweetMilitary
написал 2018-12-26 19:49:51
[img]/sml/103.gif[/img]
new trail
public plugin_init()
{
RegisterHam(Ham_TraceAttack, "worldspawn", "fw_TraceAttack", 1)
RegisterHam(Ham_TraceAttack, "func_breakable", "fw_TraceAttack", 1)
RegisterHam(Ham_TraceAttack, "func_wall", "fw_TraceAttack", 1)
RegisterHam(Ham_TraceAttack, "func_door", "fw_TraceAttack", 1)
RegisterHam(Ham_TraceAttack, "func_door_rotating", "fw_TraceAttack", 1)
RegisterHam(Ham_TraceAttack, "func_plat", "fw_TraceAttack", 1)
RegisterHam(Ham_TraceAttack, "func_rotating", "fw_TraceAttack", 1)
}
public plugin_precache()
{
Trail = precache_model("sprites/путь")
}
public fw_TraceAttack(iEnt, Attack, Float:flDamage, Float:fDir[3], ptr, iDamageType)
{
if(!is_user_alive(Attack))
return HAM_IGNORED
static Float:VEC[3]
get_tr2(ptr, TR_vecEndPos, VEC)
if(get_user_weapon(Attack) == CSW_M4A1)
{
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte (TE_BEAMENTPOINT)
write_short(Attack | 0x1000)
engfunc(EngFunc_WriteCoord, VEC[0])
engfunc(EngFunc_WriteCoord, VEC[1])
engfunc(EngFunc_WriteCoord, VEC[2])
write_short(Trail)
write_byte(1)
write_byte(15)
write_byte(1)
write_byte(14)
write_byte(0)
write_byte(255)
write_byte(255)
write_byte(0)
write_byte(255)
write_byte(255)
message_end()
}
return HAM_IGNORED
}