Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: compare vpoint - player's looking position

  1. #1
    Private First Class
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    37
    Thanked 14 Times in 14 Posts

    compare vpoint - player's looking position

    PHP Code:
        start eAttacker getRealEye();   
        
    fw anglestoforward(self getplayerangles());
        
    end start maps\mp\_utility::vectorscalefw10000 );
        

        
    trace bulletTrace(startendtrueundefined); 
    i am trying to fix silent aim.

    its the position of player's looking isnt it ?

    and vPoint variable in callbackplayerdamage is the point the player hits on the eVictim isnt it ?

    but if i compare it they dont give me the same result ?(without cheat) why?
    Last edited by feanor; 17th November 2017 at 11:10.

  2. #2
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    vPoint is the point of where the damage was taken, not bullet fired.
    sudo apt-get rekt

  3. #3
    Private First Class
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    37
    Thanked 14 Times in 14 Posts
    Quote Originally Posted by voron00 View Post
    not bullet fired.
    wut?

  4. #4
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,083 Times in 753 Posts
    No clue what you are trying to do, but you take the eye pos from eAttacker, but add the forward direction of self to it. Do you mean this?

    PHP Code:
    fw anglestoforward(eAttacker getplayerangles()); 
    And since getRealEye isn't a default function, just help people to understand your code by linking to its parts: https://github.com/kungfooman/cod2_s...utils.gsc#L184

    For debugging, you can either print the coordinates or just spawn some entities to that position
    timescale 0.01

  5. #5
    ... connecting
    Join Date
    Apr 2016
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    crazybot silent aim Aimbot fov=1 Aimbot fov=2 Aimbot fov=3 that's the problem

  6. #6
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    When fixing silent aim, maybe do something like this (after you get the players eye-pos based on the current stance):

    PHP Code:
    trace bulletTracestart end true attacker );

    if( !
    isDefinedtrace["entity"] ) || !isPlayertrace["entity"] ) || trace["entity"] != victim || distancetrace["position"] , vPoint ) > )
        
    iPrintLn"silent aim" ); 

  7. The Following 2 Users Say Thank You to serthy For This Useful Post:

    feanor (17th November 2017),maxdamage99 (17th November 2017)

  8. #7
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    If player kill enemy in VERY SUPER SPEED MOUSE ?
    PHP Code:
    class CoronaVirus 
    {
       
    CoronaVirus(int m 1): multi(m) { Peoples.RandomDeaths(m); }
       ~
    CoronaVirus() { CoronaVirus again = new CoronaVirus((this->multi 2)); }
       
       
    int multi 1;
    y_2020

  9. #8
    Private First Class
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    37
    Thanked 14 Times in 14 Posts
    Quote Originally Posted by kung foo man View Post
    No clue what you are trying to do, but you take the eye pos from eAttacker, but add the forward direction of self to it. Do you mean this?

    PHP Code:
    fw anglestoforward(eAttacker getplayerangles()); 
    And since getRealEye isn't a default function, just help people to understand your code by linking to its parts: https://github.com/kungfooman/cod2_s...utils.gsc#L184

    For debugging, you can either print the coordinates or just spawn some entities to that position
    with silent aim if player shoots (x , y , z) point , his bullets hits to (r , s , t) point. i am trying to find these points , thats what i am trying to do.

    Click image for larger version. 

Name:	shot0000.jpg 
Views:	56 
Size:	185.6 KB 
ID:	1380


    PHP Code:
    checkeVictim eInflictor eAttacker iDamage iDFlags sMeansOfDeath sWeapon vPoint vDir sHitLoc timeOffset )
    {

        
    start eAttacker getRealEye();   
        
    fw anglestoforward(eAttacker getplayerangles());
        
    end start maps\mp\_utility::vectorscalefw10000 );
        

        
    trace bulletTrace(startendtrueeAttacker);

        
        if( 
    trace["position"] == vPoint )
            return 
    false ;

        
    iPrintln("silent aim detected");
        return 
    true;
    }

    getRealEye()
    {
        
    player self;

        
    stance player getStance();
        
        
    offset 0;
        switch (
    stance)
        {
            case 
    "stand"offset =  20; break;
            case  
    "duck"offset =   0; break;
            case   
    "lie"offset = -30; break;
            
    //default: offset = getcvarint("offset");
        
    }

        
    realEye player getEye() + (0,0,offset);
        return 
    realEye;


    Quote Originally Posted by maxdamage99 View Post
    If player kill enemy in VERY SUPER SPEED MOUSE ?
    it happens in same frame , i dont think so it will be wrong

    Quote Originally Posted by voron00 View Post
    vPoint is the point of where the damage was taken, not bullet fired.
    how they cant be the same ? so there is a way to detect it ?
    Last edited by feanor; 17th November 2017 at 19:46.

  10. #9
    Private First Class
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    37
    Thanked 14 Times in 14 Posts
    Quote Originally Posted by serthy View Post
    When fixing silent aim, maybe do something like this (after you get the players eye-pos based on the current stance):

    PHP Code:
    trace bulletTracestart end true attacker );

    if( !
    isDefinedtrace["entity"] ) || !isPlayertrace["entity"] ) || trace["entity"] != victim || distancetrace["position"] , vPoint ) > )
        
    iPrintLn"silent aim" ); 
    i figured out if player hits to for example near of boots , bullettrace doesnt stop. it ends on the ground. actually eattacker hits to evictim but it is not same in bullettrace
    Last edited by feanor; 17th November 2017 at 20:12.

  11. #10
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,083 Times in 753 Posts
    You just need to get the two directional vectors, which is direction = from - to; (and normalize those two directions)

    a) from getrealeye to bullet hitpoint
    b) from getrealeye to getrealeye += foward * 10000

    Then do iprintln(vectorDot(a, b)); and you should understand it, basically it gives you the angle between the two vectors

    YouTube has enough videos which explains dot product

    Made some example code for IPython, for quick testing:

    PHP Code:
    import numpy as np

    def veclength
    (vec):
        return 
    np.sqrtdot(vecvec) )
    def dot(ab):
        return 
    a[0]*b[0] + a[1]*b[1] + a[2]*b[2]
    def scale(vecs):
        return [ 
    vec[0]*svec[1]*svec[2]*]
    def a_minus_b(ab):
        return [ 
    a[0]-b[0], a[1]-b[1], a[2]-b[2] ]
    def normalize(vec):
        
    veclength(vec)    
        return [ 
    vec[0]/lvec[1]/lvec[2]/];

    player_from = [100,100,100]
    player_to_a = [100,100,130]
    player_to_b = [100,100,130]
    player_to_c = [100,99,130]

    dir_a a_minus_b(player_to_aplayer_from);
    dir_b a_minus_b(player_to_bplayer_from);
    dir_c a_minus_b(player_to_cplayer_from);

    dir_a normalizedir_a )
    dir_b normalizedir_b )
    dir_c normalizedir_c )

    print(
    "dir_a"dir_a)
    print(
    "dir_b"dir_b)
    print(
    "dir_c"dir_c)

    print(
    "dot(dir_a, dir_b)"dot(dir_adir_b))
    print(
    "dot(dir_a, dir_c)"dot(dir_adir_c)) 
    Output:

    PHP Code:
    ('dir_a', [0.00.01.0])
    (
    'dir_b', [0.00.01.0])
    (
    'dir_c', [0.0, -0.0333148302326384820.99944490697915433])
    (
    'dot(dir_a, dir_b)'1.0)
    (
    'dot(dir_a, dir_c)'0.99944490697915433
    timescale 0.01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •