Forum

ASSIST, AMERICA'S ARMY COMMUNITY - RELIVE THE GLORY DAYS OF AMERICA'S ARMY 2.5

Author Topic: Round 9 (June 14) - Thursday Night Fights  (Read 9124 times)

0 Members and 1 Guest are viewing this topic.

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: Round 9 (June 14) - Thursday Night Fights
« Reply #45 on: Wednesday, June 13, 2012, 22:09:32 PM »
Here's my code:
Code: [Select]
<?php
echo "welcome to spankys random map generator!<br />&nbsp;<br />";

// array of maps
$maps = array("MOUT McKenna""Pipeline""Bridge Crossing""Mountain Pass""Bridge SE""Mountain Pass SE""Urban Assault""Border""Headquarters Raid""Collapsed Tunnel""Insurgent Camp""River Basin""FLS Assault""JRTC Farm Raid""Mountain Ambush""Swamp Raid""Weapons Cache""Weapons Cache SE""Radio Tower""Woodland Outpost""Dusk""SF CSAR""SF Hospital""SF Recon""SF Sandstorm""SF Arctic""SF Oasis""SF Taiga""SF Village""SF Courtyard""SF PCR""SF Extraction""Pipeline SF""SF Blizzard""SF Water Treatment""SF Dockside""[mAAp] Glass Kill House""[mAAp] PBall""[mAAp] Teh Yeti's Lair""[mAAp] UT04""[mAAp] Aztec""[mAAp] Breakout""[mAAp] Shipment""[mAAp] Square""[mAAp] Ice""[mAAp] Monkey Island""[mAAp] Berg""[mAAp] Bridge Construction""[mAAp] Pipeline""[mAAp] Urban Assault SE""[mAAp] Interdiction""[mAAp] SF Refinery""[mAAp] Rummage");
// sort the array alphabetically
asort($maps);





// check if map selection data was already posted here
if($_POST){
// these are the maps that were selected in the form
$map1 $_POST['map1'];
$map2 $_POST['map2'];
$map3 $_POST['map3'];
$map4 $_POST['map4'];
// grab the names of those maps before removing them
$mapname1 $maps[$map1];
$mapname2 $maps[$map2];
$mapname3 $maps[$map3];
$mapname4 $maps[$map4];
// remove those maps from the array
unset($maps[$map1]);
unset(
$maps[$map2]);
unset(
$maps[$map3]);
unset(
$maps[$map4]);

echo 
"You chose $mapname1$mapname2$mapname3$mapname4 as maps that were played last week.<br />They have been removed from the following random selection:<br />&nbsp;<br />";

// choose 4 maps from the array randomly
$maps_rand array_rand($maps4);
echo 
$maps[$maps_rand[0]] . "<br />";
echo 
$maps[$maps_rand[1]] . "<br />";
echo 
$maps[$maps_rand[2]] . "<br />";
echo 
$maps[$maps_rand[3]] . "<br />";
}





// no post data, show the map selection form
else{
?>

<br />&nbsp;<br />
What maps were played last week?
<form method="post" action="<?php echo $PHP_SELF;?>">
<select name="map1">
<option selected value="">Select...</option>
<?php 
    
foreach($maps as $map => $value
    { 
       echo 
'<option value="'$map .'">'$value .'</option>';
    }
?>

</select>
<select name="map2">
<option selected value="">Select...</option>
<?php 
    
foreach($maps as $map => $value
    { 
       echo 
'<option value="'$map .'">'$value .'</option>';
    }
?>

</select>
<select name="map3">
<option selected value="">Select...</option>
<?php 
    
foreach($maps as $map => $value
    { 
       echo 
'<option value="'$map .'">'$value .'</option>';
    }
?>

</select>
<select name="map4">
<option selected value="">Select...</option>
<?php 
    
foreach($maps as $map => $value
    { 
       echo 
'<option value="'$map .'">'$value .'</option>';
    }
?>

</select>
<input type="submit" value="Generate" name="submit">
</form>
<?php
// post else
?>
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline eKC0mm

Re: Round 9 (June 14) - Thursday Night Fights
« Reply #46 on: Wednesday, June 13, 2012, 22:23:18 PM »
looks like it gets the job done. :)
eKComm - Team Non-Sense

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: Round 9 (June 14) - Thursday Night Fights
« Reply #47 on: Wednesday, June 13, 2012, 23:42:06 PM »
Alright, version 1 is finished. Use it or not, it's there!

http://rand.aao25.com/
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline k!cker

  • Full Member
  • ***
  • Posts: 171
    • View Profile
  • AA: k!cker
Re: Round 9 (June 14) - Thursday Night Fights
« Reply #48 on: Wednesday, June 13, 2012, 23:46:47 PM »
Alright, version 1 is finished. Use it or not, it's there!

http://rand.aao25.com/

It will be used.

Offline Ganja

Re: Round 9 (June 14) - Thursday Night Fights
« Reply #49 on: Thursday, June 14, 2012, 07:36:47 AM »
Sounds like you really want the editor.

ROFL !!

 

Download Assist

×

Download Game Client

Important: Battletracker no longer exists. However, old Battletracker accounts may still work. You can create a new 25Assist account here

Download Server Manager