Cory94bailly Posted May 9, 2010 Share Posted May 9, 2010 $maps = $_POST['maps']; $mlg = array("Capture the Flag on Highrise", "Demolition on Highrise", "Search and Destroy on Highrise", "Capture the Flag on Invasion", "Demolition on Invasion", "Search and Destroy on Invasion", "Search and Destroy on Karachi", "Capture the Flag on Scrapyard", "Demolition on Scrapyard", "Search and Destroy on Scrapyard", "Capture the Flag on Terminal", "Demolition on Terminal", "Search and Destroy on Terminal"); $mlg_amount = "12"; //Make sure you take the # of MLG setups and subtract 1! (13 MLG setups = 12.) $i=0; while($i<$maps) { $i++; echo $mlg[rand(0,$mlg_amount)]; echo "<br />"; } Yes, I know.. It could be better but I am lazy and I made this when I was extremely tired. How could I possibly weigh a certain option more? I would guess obviously putting the same options in more than once would work but how would I go on making it like "$map_scrapyard = '30';", 30 being 30%? Any ideas? If more code is needed, I can do that.. (Also, if anyone is willing to help me clean-up the code, please tell me.. I think I have alot of un-needed code) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.