[Solved] With code

Posts 18 of 8 · Page 1 of 1
[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();
need "break;" in each "case ?"
Oh wow didnt even see that im retarted thx
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 >.<
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
/marked as solved
Posts 18 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?