- Status
- Offline
- Joined
- Mar 3, 2026
- Messages
- 730
- Reaction score
- 457
Ever tried to lock onto a sweat in a public lobby only to find your aimbot ignoring them entirely? Modders have been abusing specific ped configuration flags to create a "bubble" that prevents engines from recognizing them as valid targets or causes aimbots to treat them as friendly peds.
This simple logic iterates through the entity list and force-resets these flags. If you're building an internal menu for the RAGE engine, adding this to your tick loop is a must to counter users trying to hide behind DisablePlayerLockon or friendly status spoofing.
Technical Breakdown
The snippet targets the CPed class by checking for common protection flags. By flipping these bits back to false, you essentially strip away their "anti-aim" protections in real-time.
Implementation Notes
It's a basic fix, but it's enough to tilt anyone relying on these simple ped protections. Drop your crash logs below if you have trouble integrating this into your SDK.
This simple logic iterates through the entity list and force-resets these flags. If you're building an internal menu for the RAGE engine, adding this to your tick loop is a must to counter users trying to hide behind DisablePlayerLockon or friendly status spoofing.
Technical Breakdown
The snippet targets the CPed class by checking for common protection flags. By flipping these bits back to false, you essentially strip away their "anti-aim" protections in real-time.
Code:
namespace Core::Features
{
class cAntiAimCounter
{
public:
void Update()
{
if ( !g_Config.Player->AntiAimCounter ) return;
auto local = SDK::Pointers::pLocalPlayer;
if ( !local || !Mem.IsAddressValid( (uintptr_t)local ) )
return;
std::vector<SDK::Game::EntityStruct> snap;
{
std::lock_guard<std::mutex> lk( SDK::Game::EntityListMutex );
snap = SDK::Game::EntityList;
}
for ( auto& e : snap )
{
CPed* ped = e.Ped;
if ( !ped || !e.IsPlayer || ped == local ) continue;
if ( !Mem.IsAddressValid( (uintptr_t)ped ) || !ped->IsValid() ) continue;
if ( ped->GetHealth() <= 0 ) continue;
if ( ped->HasFlag( ePedConfigFlag::DisablePlayerLockon ) )
ped->SetConfigFlag( ePedConfigFlag::DisablePlayerLockon, false );
if ( ped->HasFlag( ePedConfigFlag::AllowLockonToFriendlyPlayers ) )
ped->SetConfigFlag( ePedConfigFlag::AllowLockonToFriendlyPlayers, false );
if ( ped->HasFlag( ePedConfigFlag::TreatAsFriendlyForTargetingAndDamage ) )
ped->SetConfigFlag( ePedConfigFlag::TreatAsFriendlyForTargetingAndDamage, false );
if ( ped->HasFlag( ePedConfigFlag::DisableReticuleFixedLockon ) )
ped->SetConfigFlag( ePedConfigFlag::DisableReticuleFixedLockon, false );
if ( ped->HasFlag( ePedConfigFlag::DisableLockonToRandomPeds ) )
ped->SetConfigFlag( ePedConfigFlag::DisableLockonToRandomPeds, false );
}
}
};
inline cAntiAimCounter g_AntiAimCounter;
}
Implementation Notes
- Ensure your entity list is updated frequently; otherwise, you might have high latency in flipping flags on moving peds.
- The check for TreatAsFriendlyForTargetingAndDamage is usually what hits the hardest against modders who want to be ignored by your aim logic.
- You'll need a valid SDK that defines ePedConfigFlag and the SetConfigFlag native or memory offset.
- DisablePlayerLockon: Prevents hard-locks.
- TreatAsFriendly: Makes the game think they are on your team.
- DisableReticuleFixedLockon: Messes with the aim UI and target state logic.
- TreatAsFriendly: Makes the game think they are on your team.
- DisableReticuleFixedLockon: Messes with the aim UI and target state logic.
It's a basic fix, but it's enough to tilt anyone relying on these simple ped protections. Drop your crash logs below if you have trouble integrating this into your SDK.