Results 1 to 8 of 8
  1. #1
    ch40s's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    34
    Reputation
    10
    Thanks
    6

    Disable Scoring?

    Hello,
    im totally new to mw2 scripting, so sorry for newbish questions .
    I want to know if there is a way to disable scoring for a specific weapon.
    For example, if someone knifes a player, i want him to get no score points for that.
    Or as a workaround, is there a way to determine who killed who with what weapon (something that needs to be called on every kill -> also how do i do that ^^ ?). Then i could just substract the added scorepoints when somebody knifes.
    Or as another idea, can i set the damage of a melee attack to zero somehow?
    I know i can do "self setClientDvar(player_meleerange,0)", but that affects everyone. I want someone not to be able to knife in certain circumstances (eg when he has a score > x). When using player_meleerange the effect works on everyone as long as the condition is valid for the host (me), so no one can knife when my score is > x, and everyone can knife (those who are not supposed to be able to, too) when my score is <= x.

    Anyone got any ideas for that?

    THX a lot and greetz

  2. #2
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,325
    My Mood
    Breezy
    Here you go! Edit the 100 value as you wish:

    EDIT - self AllowMelee is only for SP
    Code:
    checkStatus()
    {
        for(;;)
        {
            self.score = self.pers["score"];
      
            if(self isHost() && self.score > 100) //If you are the host and your score is higher than 100
            {
                setDvar("player_meleerange", 0); //Melee is disabled for everyone
            }
    
            if(self isHost() && self.score < 100) //If you are the host and your score is lower than 100
            {
                setDvar("player_meleerange", 64); //Melee is enabled for everyone
            }
            
            wait 0.1;
            
        }
    }
    
    noKnifing()
    {
        for(;;)
        {
            self.score = self.pers["score"]; //Get's the score
            if(self.score > 100) //If your score is higher than 100
            {
                self setClientDvar("player_meleerange", 0);
            }
            wait 0.1;
        }
    }
    Last edited by master131; 09-19-2010 at 07:27 AM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  3. #3
    ch40s's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    34
    Reputation
    10
    Thanks
    6
    aah....too bad, but thanks for the fast reply anyways

  4. #4
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,325
    My Mood
    Breezy
    yay, I got it!
    Make sure to add:
    self thread checkStatus();
    self thread noKnifing();

    on the onPlayerSpawned part.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  5. #5
    ch40s's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    34
    Reputation
    10
    Thanks
    6
    wow, thanks a lot! Pretty fast

    Three questions though (just for me to learn it):
    1. What does the CheckStatus() do (in context with the noKnifing() )
    2. In what file can i finde the noKnifing method, so i can take a closer look
    3. How can i check with which weapon someone was killed ?


    Again thanks for the (very fast) help

    greetz

  6. #6
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,325
    My Mood
    Breezy
    err, they're just some random threads I made up. The 2 threads could be put together into one but I couldn't be stuffed? lol. Here it is if you just want it as one thread:

    Code:
    checkStatus()
    {
        for(;;)
        {
            self.score = self.pers["score"];
      
            if(self isHost() && self.score > 100) //If you are the host and your score is higher than 100
            {
                setDvar("player_meleerange", 0); //Melee is disabled for everyone
            }
    
            if(self isHost() && self.score < 100) //If you are the host and your score is lower than 100
            {
                setDvar("player_meleerange", 64); //Melee is enabled for everyone
            }
            
            if(self.score > 100) //If your score is higher than 100
            {
                self setClientDvar("player_meleerange", 0);
            }
            wait 0.1;
            
        }
    }
    As for the noKnifing method thing, I just googled some key boards such as self.score and used random parts of code.

    To find out which weapon you were killed with... I don't know but in _damage.gsc if you look at this:
    Code:
    	if ( (sMeansOfDeath == "MOD_MELEE") )
    	{
    		
    		if ( IsSubStr( sWeapon, "riotshield" ) )
    		{
    			attacker incPlayerStat( "shieldkills", 1 );
    			
    			if ( !matchMakingGame() )
    				victim incPlayerStat( "shielddeaths", 1 );
    		}
    		else
    			attacker incPlayerStat( "knifekills", 1 );
    	}
    Basically, that's means that if your means of death was by melee (or simply if you were knifed), it increases the attacker's riot kills if he/she had a riot or increases his/her knife kills he/she didn't have a shield. Now there, you could add some extra stuff you mod could do if you were killed by a knife. I've tried 'decreasing' the score but failed miserably. Maybe if I can find the friendly fire script that decreases your score, I might be able to help.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  7. #7
    ch40s's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    34
    Reputation
    10
    Thanks
    6
    ah, didnt realise you edited your first reply, so i thought noknifing was an existing method.
    Anyways, unfortunately the player_meleerange thing doesnt help me (im using it already), since it enables/disables knifing for everyone if the host meets the conditions (althoug its setClientDvar).


    EDIT: thx for the help so far, ill read myself through the damage.gsc (playerkilledinternal and playerkilled
    methods).
    EDIT2: w00t u can change everything...nice! ;D no more weapon dropping
    Last edited by ch40s; 09-19-2010 at 10:13 AM.

  8. #8
    Insane's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    9,055
    Reputation
    1007
    Thanks
    1,997
    /Marked as Solved
    Insane
    Ex Middleman
    [
    PM|VM]
    |x|x|x|x|x|x|x|



    Quote Originally Posted by Boombox View Post
    Shut the fuck up insane you pussy bitch.
    Quote Originally Posted by arunforce View Post
    Shut the fuck up kid, everything that comes out of your mouth sounds retarded as fuck.

Similar Threads

  1. Disable Warrock update :)
    By jonny121 in forum WarRock - International Hacks
    Replies: 7
    Last Post: 02-23-2007, 10:12 AM
  2. Disable some of punkbuster's functions.
    By System79 in forum Game Hacking Tutorials
    Replies: 3
    Last Post: 09-07-2006, 12:32 AM
  3. What hacks got disabled by new patch?
    By wafflele in forum WarRock - International Hacks
    Replies: 4
    Last Post: 08-27-2006, 05:25 AM
  4. Does it realy work (pb disabler)
    By jeremywilms in forum WarRock - International Hacks
    Replies: 6
    Last Post: 06-13-2006, 12:43 PM
  5. Beat My Score
    By JTLOBAMHSK in forum General
    Replies: 11
    Last Post: 06-09-2006, 11:32 AM