hey i was bolo santosi and i made this
enjoy
Code:
hook.Add("CreateMove", "psilent", function(cmd)
v = [your function .. that return a player ] //get the target from getvangle
local wep = LocalPlayer():GetActiveWeapon() //Get our weapon
if v ~= nil and wep != nil then //if v == nil so if there no player to aim at and the weapon is nil
if old_angs != nil then //if old_angs not nil
cmd:SetViewAngles(old_angs) //if old angle is a angle then set the view angle to the old_angs
old_angs = nil //set the old_angs to nil
cmd:ClearButtons() //clear all buttons
return //return ...
end
if cmd:KeyDown( IN_ATTACK ) then //if our IN_ATTACK Key is down
if (math****und(CurTime(),4)) >= (math****und(wep:GetNextPrimaryFire(),4)) and wep:CanPrimaryAttack() then//I round the CurTime and the GetNextPrimaryFire ofcause if i used the 15 dig number it never went true O.o we also check if the clip isnt empty and we can shoot
old_angs = cmd:GetViewAngles() //if we can shoot we save the angle
v:SetAnimation( 0 ) //set the animation to 0
local targethead = v:LookupBone"ValveBiped.Bip01_Head1") //get the aimbone
local targetheadpos,targetheadang = v:GetBonePosition(targethead) //get the position of the targetbone
cmd:SetViewAngles( ((targetheadpos+ Vector(0, 0, 2)) - LocalPlayer():GetShootPos()):Angle() ) //Set the view angle to the enemy
else return end
end
end
end )