Solved Aim Bullet, Set Angle Or Position

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

lukaluka

Coder
Meme Tier VIP
Jul 6, 2015
285
1,213
3
Hello
I Want To Make Aim Bullet, I Has Set Bullet Projectile To Enemy Position, But Bullet Only Move To Wall, Not Aim Enemy.
Give Your Conclusion, My Code Is Fully Fine Also Get Position And Read Entity Fine Too And No Problem, But Get Distance Like As Not Work,
 
Last edited:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,153
78,998
2,396
Hello
I Want To Make Aim Bullet, I Has Set Bullet Projectile To Enemy Position, But Bullet Only Move To Wall, Not Aim Enemy.
Give Your Conclusion, My Code Is Fully Fine Also Get Position And Read Entity Fine Too And No Problem, But Get Distance Like As Not Work,
You mean "silent aim"?

I would hook try to this function:
C++:
bool gun::attack(vec &targ)
{
    int attackmillis = lastmillis-owner->lastaction - gunwait;
    if(attackmillis<0) return false;
    gunwait = reloading = 0;

    if(!owner->attacking)
    {
        shots = 0;
        checkautoreload();
        return false;
    }

    attackmillis = lastmillis - min(attackmillis, curtime);
    updatelastaction(owner, attackmillis);
    if(!mag)
    {
        audiomgr.playsoundc(S_NOAMMO);
        gunwait += 250;
        owner->lastattackweapon = NULL;
        shots = 0;
        checkautoreload();
        return false;
    }

    owner->lastattackweapon = this;
    shots++;

    if(!info.isauto) owner->attacking = false;

    if(burstshotssettings[this->type] > 0 && shots >= burstshotssettings[this->type]) owner->attacking = false;

    vec from = owner->o;
    vec to = targ;
    from.z -= weaponbeloweye;

    attackphysics(from, to);

    attackevent(owner, type);

    hits.setsize(0);
    raydamage(from, to, owner);
    attackfx(from, to, 0);

    gunwait = info.attackdelay;
    mag--;

    sendshoot(from, to, attackmillis);

    return true;
}
Put an if statement in it like this psuedo code:
C++:
if(bSilentAim)
{
to = enemy position;
from = somewhere that doesn't cause a collision
}
return gun::attack(to)
Your modified to and from variables would trickle down to the traceline function eventually. This is all assuming there is no server side validation on this, which I don't think there is, since till0sch and others were able to do something similar
 

lukaluka

Coder
Meme Tier VIP
Jul 6, 2015
285
1,213
3
Silent Aim = Set View Angle Silently.
but it's not Silent Aim, It's Real Change, Move Bullet Projectile.

Also I'm Not Understand Your Source, You Make This Using Class, Some Function Gone
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,153
78,998
2,396
Silent Aim = Set View Angle Silently.

but it's not Silent Aim, It's Real Change, Move Bullet Projectile.

Also I'm Not Understand Your Source, You Make This Using Class, Some Function Gone
#1)Silet aim doesn't move your view angles, it tells the game/server that your angles are different but you never actually change them on the client. If you did change them, it wouldn't be silent eh?

#2)There is no projectile/bullet! There is a line being traced and when a collision with an object is found, it displays an animation of a bullet impact.

#3) the function I showed you is from the Assault Cube source code
 

lukaluka

Coder
Meme Tier VIP
Jul 6, 2015
285
1,213
3
Rake;43189 said:
#1)Silet aim doesn't move your view angles, it tells the game/server that your angles are different but you never actually change them on the client. If you did change them, it wouldn't be silent eh?

#2)There is no projectile/bullet! There is a line being traced and when a collision with an object is found, it displays an animation of a bullet impact.

#3) the function I showed you is from the Assault Cube source code
Yeh, I Moved line collision to Enemy
 

lukaluka

Coder
Meme Tier VIP
Jul 6, 2015
285
1,213
3
Yeh, I Has Moved Collision, But Get Distance Not Work, So Bullet Moved To Wall
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods