The maxHitRange native AI script function sets the maximum hit range for the player, in meters.
()maxHitRange(MaxHitRange: f)
()maxHitRange(50); // Set the max hit range to 50 meters for all NPCs in the group.
This example code sets the maximum hit range to 50 meters for all NPCs in the group.