Results 1 to 8 of 8
  1. #1
    cgallagher21's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,583
    Reputation
    11
    Thanks
    296
    My Mood
    Busy

    [Solved] With code

    Ok so me and hannibal are making a GUN RTD mod and im having trouble because sometimes it skips a roll and dont give me that wep whats wrong?

    Code:
    doRolls()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    
    		switch(RandomInt(16))
    		{
    		case 0:
    			self takeAllWeapons();
    			self iPrintlnBold("^5ROLL 1");
    			wait 1;
    			self giveWeapon("usp_mp", 0, false );
    			break;
    
    		case 1:
    			self takeAllWeapons();
    			self iPrintlnBold("^5ROLL 2");
    			wait 1;
    			self giveWeapon("m1014_mp", 0, false );
    			break;
    
    		case 2:
    			self takeAllWeapons();			
    			self iPrintlnBold("^5ROLL 3");
    			wait 1;
    			self giveWeapon("ranger_akimbo_mp", 0, false);
    			break;
    			
    		case 3:
    			self takeAllWeapons();			
    			self iPrintlnBold("^5ROLL 4");
    			wait 1;
    			self giveWeapon("m79_mp", 0, false );
    			break;
    			
    		case 4:
    			self takeAllWeapons();
    			self iPrintlnBold("^5ROLL 5");
    			wait 1;
    			self giveWeapon("rpd_grip_xmags_mp", 0, false);
    			break;
    			
    		case 5:
    			self takeAllWeapons();
    			self iPrintlnBold("^5ROLL 6");
    			wait 1;
    			self giveWeapon("spas12_grip_mp", 0, false);
    			break;
    
    		case 6:
    			self takeAllWeapons();
    			self iPrintlnBold("^5ROLL 7");
    			wait 1;
    			self giveWeapon("barrett_fmj_xmags_mp", 0, false);
    			break;
    
    		case 7:
    			self takeAllWeapons();
    			self iPrintlnBold("^5ROLL 8");
    			wait 1;
    			self giveWeapon("pp2000_silencer_xmags_mp", 0, false );
    			break;
    
    		case 8:
    			self takeAllWeapons();
    			self iPrintlnBold("^5Roll 9");
    			wait 1;
    			self giveWeapon("deserteagle_fmj_tactical_mp", 0, false );
    			
    		case 9:
    			self takeAllWeapons();
    			self iPrintlnBold("^5ROLL 10");
    			wait 1;
    			self giveWeapon("beretta393_akimbo_xmags_mp", 0, false );
    			break;
    
    		case 10:
    			self takeAllWeapons();
    			self iPrintlnBold("^5Roll 11");
    			wait 1;
    			self giveWeapon("riotshield_mp", 0, false );;
    			
    		case 11:
    			self takeAllWeapons();
    			self iPrintlnBold("^5ROLL 12");
    			wait 1;
    			self giveWeapon("mp5k_silencer_thermal_mp", 0, false );
    			break;
    
    		case 12:
    			self takeAllWeapons();
    			self iPrintlnBold("^5Roll 13");
    			wait 1;
    			self giveWeapon("uzi_eotech_rof_mp", 0, false );
    			
    		case 13:
    			self takeAllWeapons();
    			self iPrintlnBold("^5Roll 14");
    			wait 1;
    			self giveWeapon("famas_shotgun_mp", 0, false );
    			
    		case 14:
    			self takeAllWeapons();
    			self iPrintlnBold("^5ROLL 15");
    			wait 1;
    			self giveWeapon("sa80_thermal_mp", 0, false );
    			break;
    
    		case 15:
    			self takeAllWeapons();
    			self iPrintlnBold("^5Roll 16");
    			wait 1;
    			self giveWeapon("javelin_mp", 0, false );
    
    		}
    
    }
    Code:
    self thread doRolls();

  2. #2
    47116893's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    1
    My Mood
    Cold
    need "break;" in each "case ?"

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

    cgallagher21 (11-02-2010)

  4. #3
    cgallagher21's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,583
    Reputation
    11
    Thanks
    296
    My Mood
    Busy
    Oh wow didnt even see that im retarted thx

  5. #4
    47116893's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    1
    My Mood
    Cold
    if you have time, solve my problem.
    http://www.mpgh.net/forum/323-call-d...vate-room.html

  6. #5
    [WhA]4FunPlayin's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Not here
    Posts
    757
    Reputation
    8
    Thanks
    169
    My Mood
    Lonely
    I don't know but when I made robot invasion I also did
    randomInt(3)
    and case 0..3 (thought that 0 counts) but no, I never had option 3, so I just did randomInt(4) and it worked, and yea your last roll is missing a break;

    edit not just the last one >.<

  7. The Following User Says Thank You to [WhA]4FunPlayin For This Useful Post:

    cgallagher21 (11-02-2010)

  8. #6
    AZUMIKKEL's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    My moms house... what's so funny about that?
    Posts
    790
    Reputation
    19
    Thanks
    462
    My Mood
    Sneaky
    Use this and remove the onPlayerDeath() thread
    (dont forget the player thread onPlayerDeath(); too)
    And then just make your gungame shit there

    Edit: i 4Got the link. http://www.mpgh.net/forum/308-call-d...ase-kapow.html

    Just looked through the thread again and figured that you werent making a gungame. fel
    Last edited by AZUMIKKEL; 11-02-2010 at 02:30 PM.
    www.YouTube.com/MpKiller100

  9. The Following User Says Thank You to AZUMIKKEL For This Useful Post:

    cgallagher21 (11-02-2010)

  10. #7
    cgallagher21's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,583
    Reputation
    11
    Thanks
    296
    My Mood
    Busy
    Thanks
    azu and 4fun

  11. #8
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,923
    Reputation
    161
    Thanks
    3,096
    /marked as solved



Similar Threads

  1. [Help]problem with code[/solved]
    By pushdis15 in forum Visual Basic Programming
    Replies: 2
    Last Post: 04-08-2011, 07:41 AM
  2. [SOLVED]With coding some mod...
    By ZeroTroubles in forum Call of Duty Modern Warfare 2 Help
    Replies: 9
    Last Post: 07-13-2010, 09:12 PM
  3. Help with codes
    By kalwarbo2008 in forum C++/C Programming
    Replies: 8
    Last Post: 07-26-2008, 09:58 AM
  4. Help With Coding Please
    By pbguy145 in forum WarRock - International Hacks
    Replies: 1
    Last Post: 10-10-2007, 07:52 PM
  5. trouble with code
    By cool4345 in forum WarRock Korea Hacks
    Replies: 3
    Last Post: 05-28-2007, 12:36 PM