Results 1 to 10 of 20

Thread: Block the "silent aim" cheat

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private
    Join Date
    Feb 2014
    Posts
    27
    Thanks
    11
    Thanked 0 Times in 0 Posts
    hi ,
    I do not have much knowledge about modding and scripting, so I will trying until something works.

    I had put this part within the Callback_PlayerDamage,
    PHP Code:
    //call in Callback_PlayerDamage(): (self == victim)
    if( checkSilentAimsMeansOfDeath self attacker ) )
        
    iDamage 0
    and this just below the end of Callback_PlayerDamage ( )
    PHP Code:
    checkSilentAimsMeansOfDeath victim attacker )
    {
        
    // check only bullet weapons
        
    if( sMeansOfDeath != "MOD_HEAD_SHOT" && !isSubStrsMeansOfDeath "BULLET" ) )
            return 
    false;

        
    attackerViewDir anglesToForwardattacker getPlayerAngles() );
        
    attackerToVictimDir vectorToAnglesvictim.origin attacker.origin ); // maybe change the origins here
        
    angleBetweenDirs vectorDotattackerViewDir attackerToVictimDir ); // returns acos of angle
        
    maxAngle aCos); // 5 degrees

        
    if( angleBetweenDirs <= maxAngle )
            return 
    false;

        return 
    true;
    }

    vectorDotv1 v2 )
    {
        return 
    v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];

    thus resulted in this error:
    PHP Code:
    ******* Script compile error *******
    uninitialised variable ' attacker ' : ( file ' maps / mp / gametypes / sd.gsc ' line 433 )
    *if ( 
    checkSilentAim sMeansOfDeath self Attacker ) ) 
    *****************************************
    I changed the first "atracker" by "eAttacker" , and server runs. I have no idea if it has any difference.
    I did right?
    thank you very much for your help, sorry that I can not verify if it worked in practice, because I have no hacks to test.
    I think everyone should use it on their servers, it has much of this "silent aim" in cod2 and cod4.

  2. #2
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Quote Originally Posted by qwrtyp View Post
    sorry that I can not verify if it worked in practice
    You could comment out the first if-condition and test with a grenade on yourself:

    PHP Code:
    checkSilentAimsMeansOfDeath victim attacker )
    {
        
    // check only bullet weapons
        //if( sMeansOfDeath != "MOD_HEAD_SHOT" && !isSubStr( sMeansOfDeath , "BULLET" ) )
       //     return false;

        
    attackerViewDir anglesToForwardattacker getPlayerAngles() );
        
    attackerToVictimDir vectorToAnglesvictim.origin attacker.origin ); // maybe change the origins here
        
    angleBetweenDirs vectorDotattackerViewDir attackerToVictimDir ); // returns acos of angle
        
    maxAngle aCos); // 5 degrees

        
    if( angleBetweenDirs <= maxAngle )
            return 
    false;

        
    iPrintLnBold"TEST: angle = " cosangleBetweenDirs ) );

        return 
    true;


Posting Permissions

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