public BulletImpact(Handle:event,const String:name[],bool:dontBroadcast)
{
new attacker = GetClientOfUserId(GetEventInt(event, "userid"));
new a
PrintToChatAll("%N стреляет", attacker);
GetLookPos(attacker, Pricel);
GetClientAbsOrigin(attacker, Post);
new color[4];
color[0]=77;
color[1]=77;
color[2]=77;
color[3]=255;
TE_SetupBeamPoints(Pricel, Post, g_sprite, 0, 0, 1, 1.0, 2.0, 2.0, 300, 200.0, color, 1);
}
GetLookPos(client, Float:Pricel[3])
{
decl Float:EyePosition[3], Float:EyeAngles[3], Handle:h_trace;
GetClientEyePosition(client, EyePosition);
GetClientEyeAngles(client, EyeAngles);
h_trace = TR_TraceRayFilterEx(EyePosition, EyeAngles, MASK_SOLID, RayType_Infinite, Filter, client);
TR_GetEndPosition(Pricel, h_trace);
CloseHandle(h_trace);
}
public bool:Filter(ent, mask, any:i)
{
return i != ent;
}