Jump to content
MakeWebGames

BlueDevil23

Members
  • Posts

    328
  • Joined

  • Last visited

Everything posted by BlueDevil23

  1. Re: [mccode v2] Player Card ($8) Thanks everyone for the good comments :) and thanks to all the buyers :) Thanks, Killah, I did forget that :P. I also forgot another small error feature. If the url, is not formatted properly, it will output, this.
  2. Hey all, this mod was put together by myself and Killah/Haunted Dawg, and thought we'd share it with the community. It will allow your players to supply their ID in a url, and place the url in a forum's [ img] tag's (or anywhere that supports a similar function) and it will display an image with their username, level, money, their referral link(free advertising!), and if they're online or offline. That's enough text though, here's the real thing: This is the original one made for Killah's game, he replaced the referral link with "Under Construction" instead though. :) Now how did I get that? All I did was type [ img]http://www.gamename.tld/pcard.php?id=PLAYERIDHERE[/img] *note* The URL above, if replaced with www.deadlykillah.net, will not work, since he changed it around a bit more, for his game. :) If you would like to purchase this mod, send $8 to [email protected], and the mod will be delivered to you ASAP. REQUIREMENT: You'll need at least PHP 4.3.0(which I hope you have at least 5, by now! :P) Make sure to include, with the payment, the email you would like it sent to(if different from your paypal email), the domain it will be used on, your name on CE, and the colors you would like your player card to look like, because this mod also comes with a custom player card, suited for your game :) *note* The player card image shown above was not made by Killah(who will be making the ones that come with the mod), he had to pay a good $10-15 more, to have that designed by a GFX artist we know.
  3. Re: Image pixel max-height and max-width are CSS selectors, not attributes of the img tag.
  4. Re: voting help mysql_num_rows -
  5. Re: [Guide]MC Economy     Could this be the shortest reply by Rainbow yet?! :P
  6. Re: [mccode v2] Annoucements Upgrade!   Sorry, would of helped you earlier xD, but just saw your post, when re-reading through this thread. You can, you just have to escape it with another %. ie: %%100
  7. Re: [TGM] Stat Level [TGM] Not positive, but there's a good chance, you can find it on the Cronwerks Forum
  8. Re: Couple of things.. {mods} What gym are you using? The original? Nyna's ? custom ?
  9. Re: How Can I Secure A Game? I deleted it. It was in no way helpful, and you know it.
  10. Re: [MMCODE V2] Set Sell Price of houses after they are Purchased... Ahh, yep, thanks Lithium. Code updated.
  11. Re: [MMCODE V2] Set Sell Price of houses after they are Purchased... Code updated, try again.
  12. Re: [MMCODE V2] Set Sell Price of houses after they are Purchased...     <?php require_once "globals.php"; echo <<<EOFS1 <style type="text/css"> .success { color: green; } .fail { color: red; } table { text-align: center; } #housing th { border: thin solid; } #housing td { border: thin dotted; } </style> EOFS1; $housesConfig = array('DEFAULTHouse' => 'Shed', 'DEFAULTHouseMaxWill' => 100, 'listingStyle' => 'LIST'); // Make sure to change these to your // default house's name, and that house's // Options for listingStyle // will. // are LIST or TABLE $currentHouse = sprintf("SELECT `hNAME`, `hWill` FROM `houses` WHERE (`hWILL` = %d)", $ir['maxwill']); $mpq = mysql_query($currentHouse); if($mpq === FALSE) { echo "".mysql_error().""; } $mp = $db->fetch_row($mpq); $_GET['property']= (!empty($_GET['property']) && ctype_digit($_GET['property']) && isset($_GET['property']) ? ($_GET['property']) : FALSE); $_GET['sellhouse'] = (!empty($_GET['sellhouse']) && ctype_digit($_GET['sellhouse']) && isset($_GET['sellhouse']) ? $_GET['sellhouse'] : FALSE); if($_GET['property']) { $getProperties = sprintf("SELECT `hWILL`, `hNAME`, `hPRICE` FROM `houses` WHERE (`hID` = %d)", $_GET['property']); $npq = mysql_query($getProperties); if($npq === FALSE) { echo "".mysql_error().""; } $np = $db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { echo "<h3 class='fail'> You cannot go backwards in houses! </h3>"; } else if ($np['hPRICE'] > $ir['money']) { printf("<h3 class='fail'> You do not have enough money to buy the %s </h3>", $np['hNAME']); } else { $updateHouses = sprintf("UPDATE `users` SET `money` = `money` - %d, `will` = 0, `maxwill` = %d WHERE (`userid` = %u)", ($np['hPRICE']), ($np['hWILL']), ($userid)); mysql_query($updateHouses); printf("<h3 class='success'> Congrats, you bought the %s for \$%d!", stripslashes($np['hNAME']), ($np['hPRICE'])); } } else if ($_GET['sellhouse']) { $getProperties = sprintf("SELECT `hPRICE`, `hNAME`, `hSELLPRICE` FROM `houses` WHERE (`hWILL` = %d)", ($ir['maxwill'])); $npq = mysql_query($getProperties); if($npq === FALSE) { echo "".mysql_error().""; } $np = $db->fetch_row($npq); if($ir['maxwill'] == $housesConfig['DEFAULTHouseMaxWill']) { echo "You already live in the lowest property!"; } else { $beginnerHouse = sprintf("UPDATE `users` SET `money` = `money` + %d,`will` = 0, `maxwill` = %d WHERE (`userid` = %u)", abs(@intval($np['hSELLPRICE'])), $housesConfig['DEFAULTHouseMaxWill'], abs(@intval($userid))); $do_beginnerHouse = mysql_query($beginnerHouse); if($do_beginnerHouse === FALSE) { echo "".mysql_error().""; } printf("<h3 class='success'> You sold your %s for %d and went back to your %s </h3>", stripslashes($np['hNAME']), abs(@intval($r['hSELLPRICE'])), $housesConfig['DEFAULTHouse']); } } else { printf("<h4 style='padding-bottom:25px;'> Your current property is <span style='font-weight:bold;'> %s </span>", stripslashes($mp['hNAME'])); echo "<h5 style='padding-bottom:10px;'> The houses you can buy are listed below. Click a house to buy it </h5>"; $sellHouse = ($ir['maxwill'] > $housesConfig['DEFAULTHouseMaxWill'] ? "[url='estate.php?sellhouse=1'] Sell Your House [/url]" : FALSE); if(isset($sellHouse)) { echo $sellHouse; } $houseList = sprintf("SELECT `hID`, `hNAME`, `hPRICE`, `hWILL` FROM `houses` WHERE (`hWILL` > %d) ORDER BY `hWILL` ASC", ($ir['maxwill'])); $hq = $db->query($houseList); if($hq === FALSE) { echo "".mysql_error().""; } if($housesConfig['listingStyle'] == 'LIST' || strlen($housesConfig['listingStyle']) < 1 || !in_array($housesConfig['listingStyle'], array('LIST', 'TABLE'))) { $styles = array('style' => array("<ul stlye='list-style-type:none;line-height:2em;'>", "[/list]"), 'stylechild' => array("[*]", ""), 'styleseperator' => array("<span style='padding-left:25px;padding-right:25px;'>", "</span>")); } else { $styles = array('style' => array("<table style='width:75%;border-spacing:1;' id='housing'>", "</table>"), 'trow' => array("<tr>", "</tr>"), 'stylechild' => array("<td>", "</td>")); } echo $styles['style'][0]; if($housesConfig['listingStyle'] == 'TABLE') { echo "<tr>"; echo "<th> House Name </th>"; echo "<th> House Price </th>"; echo "<th> House Will </th>"; echo "<th> House Sell Price </th>"; echo "</tr>"; } while($r = $db->fetch_row($hq)) { echo $styles['stylechild'][0]; printf("[url='estate.php?property=%d'] %s [/url]", $r['hID'], stripslashes($r['hNAME'])); if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][1]; } if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][0]; } if(isset($styles['styleseperator'][0])) { echo $styles['styleseperator'][0]; } printf("Cost: \$%s", number_format($r['hPRICE'],'')); if(isset($styles['styleseperator'][1])) { echo $styles['styleseperator'][1]; } if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][1]; } if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][0]; } printf("Will Bar: %d", ($r['hWILL'])); if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][1]; } if($housesConfig['listingStyle'] == 'TABLE') { echo $styles['stylechild'][0]; } printf("Sell Price: %d", money_formatter(abs(@intval($np['hSELLPRICE'])),'')); echo $styles['stylechild'][1]; if(isset($styles['trow'][1])) { echo $styles['trow'][1]; } } echo $styles['style'][1]; } $h->endpage(); ?>   Try that, not tested.
  13. Re: How can you get a different Icon for your website?   Yeah, that'd be better, if your explicitly naming your favicons, favicon1 and favicon2. Though you could use your same idea, by adding the names of your favicons to an array, and using array_rand().
  14. Re: How can you get a different Icon for your website? simple way, and without complicating it too much   $foo = mt_rand(1,2); ($foo == 1 ? print '<link rel="icon" href="favicon1.ico" type="image/vnd.microsoft.icon" />' : print '<link rel="icon" href="favicon2.ico" type="image/vnd.microsoft.icon" />');   2 images. favicon1.ico and favicon2.ico Put that in <head> part in header.php
  15. Re: [mccode v2] Stock Market. Working + Secured Good job Killah :) one thing though:   while($soc = mysql_fetch_assoc($log)) { ... }   Don't declare a function inside a loop, your only slowing your script down, because the function is being called on every iteration.   $soc = mysql_fetch_assoc($log); while($soc) { ... }
  16. Re: Ideas/Requests [Free Mod 4 U] That is the whole point. For him to get an idea, and either sell the mod or release it free. But either way the "idea-giver" is happy because he'll get the his idea done, and for free. Hope that clears it up for ya :)
  17. Re: [V2] Distrubed City   It's actually a free website template from Arcsin, and I converted to MCC somewhere around here, so he's free to use it either way, as long as he leaves Arcsin's name on it.
  18. Re: Radio buttons and enabling textfields Example site up (thanks to Killah for hosting it) http://deadlyhustle.net/test2.php
  19. Re: Radio buttons and enabling textfields The basic idea is to create a JS function, and fire it, when a radio button is clicked. Also, you want to think about the people with JS turned off, so create a function, and add it into your <head>, and then insert it into the <body> tag. All this function will do is disable the inputs onload, instead of doing it straight in the <input /> tag, so if the user does have JS disabled, they are still able to access the fields, since they'll never be disabled in the first place.   <head> <script type="text/javascript"> function disableInputs() { document.someForm.inputUno.disabled = true; document.someForm.inputDos.disabled = true; } </script>   </head> <body onload="disableInputs()"> <form action="example.php" method="POST" name="someForm"> [list=1] [*] <label for="radioUno"> Radio 1 </label> <input type="radio" name='radios' id="radioUno" onclick="enableInput(form)" value="one" /> [*] <label for="radioDos"> Radio 2 </label> <input type="radio" name='radios' id="radioDos" onclick="enableInput(form)" value="two" /> [*] <label for="inputUno"> Input 1 </label> <input type="text" id="inputUno" name="inputUno" /> [*] <label for="inputDos"> Input 2 </label> <input type="text" id="inputDos" name="inputDos" /> [*] <input type="submit" value="Example" /> [/list] </form> </fieldset> </div> <script type='text/javascript'> function enableInput(obj) { if(obj.radios[0].checked==true) { obj.inputUno.disabled = false; obj.inputUno.focus(); obj.inputDos.disabled = true; } if(obj.radios[1].checked==true) { obj.inputDos.disabled = false; obj.inputDos.focus(); obj.inputUno.disabled = true; } } </script> ...   Not sure why I used the [ php] tags lol, but it gives some level of syntax highlighting. Oh, and I might add, JS is very hard to get X-Browser compatibility with, so you might want to consider using a JS lib. ie: I use the Dojo Toolkit, so instead of   obj.radios[0].checked==true;   I could change that to something like   dojo.attr(dojo.query('[name="radioUno"]')[0], 'selected')   for more X-Browser compatibility. This is a working example, and you should be able to just plug it straight in, with minor changes :)
  20. Re: Easy Help Tutorial With Admin Feature   Though that is a better way, it's hard to do that most of the time with MCC, because most users end their HTML, and other various things in the endpage function...   Ive never found any issues using it with Mc Yeah, it's just all in how you have it set up, if your closing HTML is in your endpage function, then simply just using return, is going to make the page look funky, and invalid.
  21. Re: Easy Help Tutorial With Admin Feature   Though that is a better way, it's hard to do that most of the time with MCC, because most users end their HTML, and other various things in the endpage function...
  22. Re: [MCCODES V2] Millionare game $20.00 How is the time limit done? JS, PHP, other? What happens when the time limit is up?
  23. Re: [mccodes v2] Combined Gallery and Comment System [$40.00]   It's been over a month now, I would say suisse has the right to be ticked off.
  24. Re: [mccode v2] Estate Recode I'm not going to change this in the script, to include this, because I doubt everyone's economy is as bloated(I hope at least) But simply cast the variable that is inserted in the database to bigint and also the variable that displays the price. ie: abs( (bigint) $var);
  25. Re: Energy Bar too long?   if($ir['energy'] < 0) mysql_query(sprintf("UPDATE `users` SET `energy` = 0 WHERE (`userid` = %u)", abs(@intval($userid))));
×
×
  • Create New...