Quote:
Originally Posted by connorr
Replace pev(hit,pev_flags) & (FL_CLIENT | FL_FAKECLIENT) with 1 <= id <= maxplayers
|
Now I am getting index out of bounds
L 11/01/2008 - 14:23:06: [AMXX] Displaying debug trace (plugin "aimbotdetect.amxx")
L 11/01/2008 - 14:23:06: [AMXX] Run time error 4: index out of bounds
L 11/01/2008 - 14:23:06: [AMXX] [0] aimbotdetect.sma::fw_traceline (line 1093)
Line 1093:
if( !(g_bodyhits[shooter][hit] & 1<<hitGroup) )
PHP Code:
public fw_traceline(Float:v1[3], Float:v2[3], NoMonsters, shooter, ptr)
{
if(!shooter) return FMRES_IGNORED;
new hit = get_tr2(ptr,TR_pHit);
if( (1 <= shooter <= g_MaxPlayers) && (pev(shooter,pev_flags) & (FL_CLIENT | FL_FAKECLIENT)) )
{
new hitGroup = get_tr2(ptr,TR_iHitgroup);
if( !(g_bodyhits[shooter][hit] & 1<<hitGroup) )
set_tr2(ptr,TR_flFraction,1.0);
}
return FMRES_IGNORED;
}
__________________