Post by AttackerCat33 on Oct 10, 2021 11:34:30 GMT
Sorry For Bad Teach And English,
Hello Guys I Teach How to Add Lost Souls Tracer System Like Golden AK47 And more.
From Old Tracer Like This:
To This:
Tracer Update v1.1:
Fix Some Bugs: if shot on any player at wall the tracer get invisible
If u use Golden AK47 (example) Add this:
RegisterHam(Ham_TraceAttack, "player", "Ham_TraceAttack_Player", false); RegisterHam(Ham_TraceAttack, "worldspawn", "Ham_TraceAttack_Player", false); RegisterHam(Ham_TraceAttack, "func_breakable", "Ham_TraceAttack_Player", false) RegisterHam(Ham_TraceAttack, "func_wall", "Ham_TraceAttack_Player", false) RegisterHam(Ham_TraceAttack, "func_door", "Ham_TraceAttack_Player", false) RegisterHam(Ham_TraceAttack, "func_door_rotating", "Ham_TraceAttack_Player", false) RegisterHam(Ham_TraceAttack, "func_plat", "Ham_TraceAttack_Player", false) RegisterHam(Ham_TraceAttack, "func_rotating", "Ham_TraceAttack_Player", false)
And Change This:
register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
To This
register_event("CurWeapon", "Ham_TraceAttack_Player", "be", "1=1", "3>0")
Add This Tracer Full Code:
public Ham_TraceAttack_Player(iVictim, iAttacker, Float:fDamage, Float:fDeriction[3], iTraceHandle, iBitDamage)
{
if(!is_user_alive(iAttacker))
return
if(get_user_weapon(iAttacker) != CSW_WEAPON) return
free_tr2(iTraceHandle)
if(!g_any[iAttacker]) return
static Float:end[3]
get_tr2(iTraceHandle, TR_vecEndPos, end)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMENTPOINT)
write_short(iAttacker | 0x1000)
engfunc(EngFunc_WriteCoord, end[0])
engfunc(EngFunc_WriteCoord, end[1])
engfunc(EngFunc_WriteCoord, end[2])
write_short(m_spriteTexture)
write_byte(start) // framerate start
write_byte(end) // framerate end
write_byte(life) // life
write_byte(width) // width
write_byte(noise)// noise
write_byte(r)// r, g, b
write_byte(g)// r, g, b
write_byte(b)// r, g, b
write_byte(brightness) // brightness
write_byte(speed) // speed
message_end()
}
And Remove Your Old Tracer Only
Note: If u went add some effects like plasma gun effect do this
Example: Balrog Ethereal Exp Effect
Note: Change The Tracer Ham To New Ham to Tracer Work Fine
public Ham_TraceAttack_Player(iVictim, iAttacker, Float:fDamage, Float:fDeriction[3], iTraceHandle, iBitDamage)
{
if(!is_user_alive(iAttacker))
return
if(get_user_weapon(iAttacker) != CSW_UMP45) return
free_tr2(iTraceHandle)
if(!g_has_balrog[iAttacker]) return
static Float:end[3]
get_tr2(iTraceHandle, TR_vecEndPos, end)
if(iVictim)
{
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(3)
engfunc(EngFunc_WriteCoord, end[0])
engfunc(EngFunc_WriteCoord, end[1])
engfunc(EngFunc_WriteCoord, end[2])
write_short(g_balrog_exp)
write_byte(10)
write_byte(15)
write_byte(4)
message_end()
}
else
{
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(3)
engfunc(EngFunc_WriteCoord, end[0])
engfunc(EngFunc_WriteCoord, end[1])
engfunc(EngFunc_WriteCoord, end[2])
write_short(g_balrog_exp)
write_byte(10)
write_byte(15)
write_byte(4)
message_end()
}
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMENTPOINT)
write_short(iAttacker | 0x1000)
engfunc(EngFunc_WriteCoord, end[0])
engfunc(EngFunc_WriteCoord, end[1])
engfunc(EngFunc_WriteCoord, end[2])
write_short(m_spriteTexture)
write_byte(0) // framerate start
write_byte(0) // framerate end
write_byte(1) // life
write_byte(7) // width
write_byte(4)// noise
write_byte(100)// r, g, b
write_byte(0)// r, g, b
write_byte(0)// r, g, b
write_byte(200) // brightness
write_byte(0) // speed
message_end()
}
And Check This Bro it work by me and thanks