Results 1 to 10 of 10
  1. #1
    krijnrien's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    68
    Reputation
    10
    Thanks
    7
    My Mood
    Goofy

    Exclamation one in the chamber code help

    hi guys and girls

    i have a request

    could some1 give me the code of one in the chamber
    that you start with 1 bullet and when you kill somebody you get 1 back
    or else you have too melee
    could some1 please give me that code

  2. #2
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    Ill make an example:
    Code:
    Ammoset()
    {
    
    self giveWeapon( "beretta_tactical_mp", 0, false );
    self setWeaponAmmoClip( "beretta_tactical_mp", 1);
    self setWeaponAmmoStock( "beretta_tactical_mp", 0 );
    self waittil("player_killed");
    self setWeaponAmmoClip( "beretta_tactical_mp", 1);
    
    
    }

  3. The Following User Says Thank You to mathieutje12 For This Useful Post:

    krijnrien (09-05-2011)

  4. #3
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    155
    http://www.mpgh.net/forum/308-call-d...w-version.html

    Master131 "ported" it from aIW to Steam.

  5. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,541
    My Mood
    Angelic
    Quote Originally Posted by mathieutje12 View Post
    Ill make an example:
    Code:
    Ammoset()
    {
    
    self giveWeapon( "beretta_tactical_mp", 0, false );
    self setWeaponAmmoClip( "beretta_tactical_mp", 1);
    self setWeaponAmmoStock( "beretta_tactical_mp", 0 );
    self waittil("player_killed");
    self setWeaponAmmoClip( "beretta_tactical_mp", 1);
    
    
    }
    Well, your code won't be so good in the OiC.....

    because you won't get more the 1 bullet if you kill 1.

    use the i as the ammo-clip value.

    and when you kill you increase the i value with 1. ( i++; )
    Like:
    i = 0;
    self waittil("player_killed");
    i++;
    self setWeaponAmmoClip( "beretta_tactical_mp", i);

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  6. The Following User Says Thank You to Jorndel For This Useful Post:

    krijnrien (09-05-2011)

  7. #5
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    I just made a fast thread there xD

  8. #6
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    is killed_player,

  9. The Following 2 Users Say Thank You to Yamato For This Useful Post:

    [MPGH]Jorndel (08-28-2011),krijnrien (09-05-2011)

  10. #7
    dsds1's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    63
    Reputation
    10
    Thanks
    2
    My Mood
    Fine
    here try this:
    make call of threads functions in spawned player and
    Code:
     
    dodeath() 
    { 
     self endon("disconnect"); 
     self waittill("death"); 
     //code bla bla bla 
    }
    and you could try to give weapons
    Code:
     
    self giveWeapon("beretta_mp", 0, false);
    this is little help thanks

  11. #8
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,541
    My Mood
    Angelic
    Quote Originally Posted by dsds1 View Post
    here try this:
    make call of threads functions in spawned player and
    Code:
     
    dodeath() 
    { 
     self endon("disconnect"); 
     self waittill("death"); 
     //code bla bla bla 
    }
    and you could try to give weapons
    Code:
     
    self giveWeapon("beretta_mp", 0, false);
    this is little help thanks
    WTF?!

    What are you doing man?

    This is nothing good....
    If he really want the OiC Mod.

    He can just google it and he find a good and easy code that he can copy from.
    Code:
    onPlayerSpawned() 
    { 
            self endon( "disconnect" ); 
     
            for(;;) 
            { 
                    self waittill( "spawned_player" ); 
                    self thread givegun(); 
                    self thread doAmmo(); 
                    self thread damage(); 
                    self thread doDvars(); 
                    self thread CheckDeaths(); 
            } 
    } 
     
    CheckDeaths() 
    { 
    if( self.deaths == 3 ) 
    { 
    self notify("menuresponse", game["menu_team"], "spectator"); 
    setDvar("ui_allow_teamchange", "0"); 
            } 
    } 
     
     
    doDvars() 
    {                
                    setDvar("bg_fallDamageMaxHeight", 9999 ); 
                    setDvar("bg_fallDamageMinHeight", 9998 ); 
                    self player_recoilScaleOn(0); 
                    self setClientDvar( "cg_ScoresPing_MedColor", "0 0 0 0"); 
                    self setClientDvar( "cg_ScoresPing_LowColor", "0 0 0 0"); 
                    self setClientDvar( "cg_ScoresPing_HighColor", "0 0 0 0");       
                    self setClientDvar( "ui_playerPartyColor", "0 0 0 0"); 
                    self setClientDvar( "cg_scoreboardMyColor", "0 0 0 0"); 
                    self setClientDvar( "lowAmmoWarningColor1", "0 0 0 0"); 
                    self setClientDvar( "lowAmmoWarningColor2", "0 0 0 0"); 
                    self setClientDvar( "lowAmmoWarningNoAmmoColor1", "0 0 0 0"); 
                    self setClientDvar( "lowAmmoWarningNoAmmoColor2", "0 0 0 0"); 
                    self setClientDvar( "lowAmmoWarningNoReloadColor1", "0 0 0 0"); 
                    self setClientDvar( "lowAmmoWarningNoReloadColor2", "0 0 0 0"); 
    } 
     
    damage() 
    { 
            self endon ( "disconnect" ); 
            self endon ( "death" ); 
            self.maxhealth = 30; 
            self.health = self.maxhealth; 
            while ( 1 ) { 
                    wait .4; 
                    if ( self.health < self.maxhealth ) 
                            self.health = self.maxhealth; 
            } 
    } 
    givegun() 
    { 
            self takeAllWeapons(); 
            self _clearPerks(); 
            wait .5; 
            self giveWeapon("usp_fmj_mp"); 
            wait .5; 
            self SwitchToWeapon("usp_fmj_mp"); 
            self SetWeaponAmmoClip( "usp_fmj_mp", 1 ); 
            self SetWeaponAmmoStock( "usp_fmj_mp", 0 ); 
    } 
    doAmmo()  
    {  
     
            self endon ( "disconnect" );   
            self endon ( "death" );  
            for(i=1; i<12; i++)  
            {    
                    self waittill("killed_enemy"); 
                    self setWeaponAmmoClip( "usp_fmj_mp", i  );  
            } 
    }

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  12. #9
    krijnrien's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    68
    Reputation
    10
    Thanks
    7
    My Mood
    Goofy
    wow didnt looked here for some time

    thnx guys really needed that mathieutje thanks *thanked*

    ok ty

    some1 plz close it??

  13. #10
    Heartview's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    KY Cygni
    Posts
    9,208
    Reputation
    717
    Thanks
    2,872
    Marked as Solved.
    Texture Mods


    Obedear, the sky is low

Similar Threads

  1. One in the chamber
    By robserob in forum Call of Duty Modern Warfare 2 Server / GSC Modding
    Replies: 8
    Last Post: 10-04-2010, 01:46 PM
  2. [Release] One in the Chamber (alterIWnet)
    By rathynia in forum Call of Duty Modern Warfare 2 Server / GSC Modding
    Replies: 18
    Last Post: 10-01-2010, 07:11 AM
  3. [RELEASE]Zalew's One in the chamber 1.1(Wager Match)(Now works with liberation)
    By zalew in forum Call of Duty Modern Warfare 2 Server / GSC Modding
    Replies: 31
    Last Post: 09-11-2010, 12:30 PM
  4. [RELEASE]Zalew's One in the chamber(Wager match)
    By zalew in forum Call of Duty Modern Warfare 2 Server / GSC Modding
    Replies: 35
    Last Post: 09-09-2010, 04:12 AM
  5. One in the Chamber
    By CJKay in forum Call of Duty Modern Warfare 2 Server / GSC Modding
    Replies: 29
    Last Post: 09-04-2010, 11:07 AM

Tags for this Thread