
Originally Posted by
lifeordeathza
Could you make it so you can aim at head and then another option to aim at chest?
I have been getting banned off a lot of servers for having a lot of head shots that would be cool

If you know how to alter code, try the following I quickly coded to either be able to change aimspot, or allow a random set of aimspots so you get some headshots, some chest shots. You can add more bones to aim at by adding them to BB.RandomAimSpots. It is set to enable the random aimspot by default, but if you want to disable it and go straight to headshots (or whatever you set the BB.StaticAimSpot to). Can't change the static aim spot in game at the moment. I just made this quickly, so I still have improvements and optimizations to make but it works.
Find:
Code:
BB.TimerName = BB.RandomString( 0, false, false );
BB.Unloaded = false;
BB.ToggleFade = nil;
After it ADD:
Code:
BB.StaticAimSpot = "ValveBiped.Bip01_Head1";
BB.RandomAimSpots = {"ValveBiped.Bip01_Head1","ValveBiped.Bip01_Neck1","ValveBiped.Bip01_Spine","ValveBiped.Bip01_Pelvis","ValveBiped.Bip01_Spine2","ValveBiped.Bip01_Spine4"};
BB.RandomAimSpot = "ValveBiped.Bip01_Spine";
Find:
Code:
function BB.ClosestAngle( players )
local flAngleDifference = nil;
local newAngle = nil;
local viewAngles = BB.ply():EyeAngles();
for _, ply in pairs( players ) do
After it Add:
Code:
if (BB.CVARS.Bools["Random Aimspot"].cvar:GetBool() == true) then
targetspot = BB.RandomAimSpot;
else
targetspot = BB.StaticAimSpot;
end
Directly below where you added that the line that starts with (didn't have the whole line because I altered it and am too lazy to get the original:
Code:
local vecPos, ang = ply:GetBonePosition( ply:LookupBone(
Replace that ENTIRE LINE with:
Code:
local vecPos, ang = ply:GetBonePosition( ply:LookupBone( targetspot ) or 12 );
Find:
Code:
timer.Create( BB.TimerName, 0.25, 0, function( )
if (!BB.IsTTT || GetRoundState() != 3) then
table.Empty( BB.DeadPlayers );
return;
end
After it add:
Code:
BB.RandomAimSpot = table.Random(BB.RandomAimSpots);