Jump to content
MakeWebGames

Haunted Dawg

Members
  • Posts

    2,933
  • Joined

  • Last visited

    Never
  • Days Won

    1

Everything posted by Haunted Dawg

  1. Re: DJ Control Center I am quite sure that this DJcenter would take longer to make than the "pass the parcel".
  2. Ok i am not the greatest at explaining how array's work and such. I know what they do and capable of and that is all i need to know. I made a small thing describing and showing array's. Some of you might find usefull. Enjoy. Do not critizise if i am wrong in place's with naming the array's. Correct me rather than be a critic. You can read through this php file & upload it to your game and go to the page to look at how the example's come out. Another thing. I made a function called rprintr because normaly print_r without <pre> around it, is just not as readable with <pre> & </pre> around it. Some of you should know what i mean. So this function already add's the <pre> & </pre> around the print_r function so now we do not have more line's lower down in the code. Please keep negative feedback away from my thread and post it to pm. This is because i am not good at making FAQ's but i thought i would try and help those one's that are trying to learn out. So here it is:   <?php ob_start(); echo '<title>Example of array\'s</title>'; function rprintr($ray) { echo '<pre>'; print_r($ray); echo '</pre>'; } /* * Example of array's and multidimensional array's. * Arrays: 1.- You can add alot to an array and call all the information you need using for() function. REF => [url]http://www.php.net/for[/url] 2.- An array is where you can store multiple information such as number's, letter's, character's. 3.- If you are formal with mysql_fetch_assoc or mysql_fetch_array well those perfom as a array. 4.- An example of an array: $raw_1 = array ( 1,2,3,4 ); 4.1- Better array with meaning vars: $raw_2 = array ( 1 => "VAR", 2 => "RAW", 3 => "EG", 4 => "TEST" ); * Note * here we are using a =>. when calling out which ever number for array( raw_2 ) you do not need to start at 0 to get the first variable. so we use $raw_2[1] which will then display "VAR". if you are using letter's as your sequal it would be like this: $raw_2_b = array ( "row" = "VAR" ); * Multidimensional Array's: 1.- It is the same as array's but this consist's of array's in array's for example: $raw_3 = array ( 1 => array ( "Name" => "Kyle", "Age" => 16 ), 2 => array ( "Name" => "Bot", "Age" => 913463214 ) ); * If need help just ask */ //Example of array raw_1: echo '[b]Example or normal Arrays:[/b]'; $raw_1 = array ( 1,2,3,4 ); rprintr ($raw_1); $val = count($raw_1); for ($i = 0; $i <= $val; $i++) { echo $raw_1[$i].' '; } //Example of array with vars echo ' [b]Example of arrays with vars:[/b]'; $raw_2 = array ( 1 => "VAR", 2 => "RAW", 3 => "EG", 4 => "TEST" ); rprintr ($raw_2); $val_n = count($raw_2); for ($p = 1; $p <= $val_n; $p++) { echo $raw_2[$p].' '; } //Example of multidimensional arrays echo ' [b]Example of multidimensional arrays:[/b]'; $raw_3 = array ( 1 => array ( "Name" => "Kyle", "Age" => 16 ), 2 => array ( "Name" => "Bot", "Age" => 923432 ) ); rprintr ($raw_3); $val_b = count($raw_3); for ($r = 1; $r <= $val_b; $r++) { echo 'Name: '.$raw_3[$r]['Name'].' Age: '.$raw_3[$r]['Age'].'<hr>'; } ?>   Enjoy.
  3. Re: hi i need help with my game Any pay?
  4. Re: Background image[Lite] I am dead sure that mccode's lite has css. Post your header. If not add: <style> CSS CODE ABOVE </style> to your header.php
  5. Re: Background image[Lite] No. Put it amongst the rest of your css. If you do not know what CSS is then look for <style language="text/css"> and place it inside that html code tag.
  6. Re: Background image[Lite] add to your header.php style: body { background-image: url('URL Here'); } I would also suggest going to look at bg image properties.
  7. Re: 2 questions event add & insert item   $sel = mysql_query("SELECT userid,username,user_level FROM users WHERE user_level=5"); while($soc = mysql_fetch_assoc($sel)) { mysql_query("UPDATE users SET money=money+1000 WHERE userid=".$soc['userid']); event_add($soc['userid'],"Hello ".$soc['user_name'].", You have been given $1, 000 for being staff. Thank you."); item_add($soc['userid'],19,1); }
  8. Re: mccode v2 Easily enough to do. run this as a sql query i believe. I suggest backing up your user's table tho. ALTER TABLE users SET userpass = md5('userpass');
  9. Re: DJ Control Center TBH. Does not look like something you could make. Maybe you got a script that is very similar to this and edited it to fit mccode's. But this look's abit too hard for you to make when you could not make the pass the parcel. Hope you do not take this harsh as i do not mean to offend your post nor you.
  10. Re: [mccode v2] Brothel Non exploitable   Correct, so the saying "You get what you pay for" comes to mind. Shit scripting by a supposedly 1337 "coder" All my paid mod's are way better than my free one's. All my paid mod's are tested one week before i put it up for sale.   Lmao this must be your catchphrase killah. You use it every time another programmer gives you the advice. Just shut up, take the advice and admit you could of done it better but didn't know how too, your never learn otherwise. Umm. Actualy i was going to use the "count" function. So why not just shut up yourself ;)
  11. Re: New Game. Blow your mind's away. Updates 1.- More optimization in coding. 0.00012 second's faster now i see. 2.- 50% Complete. Game still to be open into BETA around 20 - 25 january.
  12. Re: [MCC V2] - Brothel Non exploitable I was thinking about the count function while i was making this. But ey. it's free so shut up ;)
  13. I found out that the other brothel that people were releasing was exploitable. You could edit the source and pay 1 to get how much will. Well here is a new version of mine. Non exploitable as far as i know. Replace or create brothel.php and put this inside it:   <?php include("globals.php"); echo '<h2>Brothel</h2>'; $whore_woman = array ( 1 => array("Roxy",500), 2 => array("Kelly",1000), 3 => array("Shanique",1500), 4 => array("Rhonda",2000), 5 => array("Elizabeth",10000) ); $whore_men = array ( 1 => array("Bill",500), 2 => array("Marcus",1000), 3 => array("Greg",1500), 4 => array("Sam",2000), 5 => array("Kyle",10000) ); if($_GET['y'] == "F") { $x = abs(@intval($_GET['x'])); $will = rand(1,5); mysql_query("UPDATE users SET will=will+".$will.", money=money-".$whore_woman[$x][1]." WHERE userid=".$ir['userid']); echo 'You payed '.money_formatter($whore_woman[$x][1]).' to take '.$whore_woman[$x][0].' to the room and you gained '.$will.' will.'; $h->endpage(); exit; } else if($_GET['y'] == "M") { $x = abs(@intval($_GET['x'])); $will = rand(1,5); mysql_query("UPDATE users SET will=will+".$will.", money=money-".$whore_men[$x][1]." WHERE userid=".$ir['userid']); echo 'You payed '.money_formatter($whore_men[$x][1]).' to take '.$whore_men[$x][0].' to the room and you gained '.$will.' will.'; $h->endpage(); exit; } else { echo ' Woman: <table border="1" cellspacing="0" class="table" width="50%"> <tr> <th>Name</th> <th>Price</th> <th>Rent</th> </tr> <tr>'; $i = 0; while($i < 5) { $i++; echo ' <td>'.$whore_woman[$i][0].'</td> <td>'.money_formatter($whore_woman[$i][1]).'</td> <td>[url="'.$_SERVER['PHP_SELF'].'?y=F&x='.$i.'"]Rent[/url]</td> <tr>'; } echo ' </tr> </table> Men: <table border="1" cellspacing="0" class="table" width="50%"> <tr> <th>Name</th> <th>Price</th> <th>Rent</th> </tr> <tr>'; $i = 0; while($i < 5) { $i++; echo ' <td>'.$whore_men[$i][0].'</td> <td>'.money_formatter($whore_men[$i][1]).'</td> <td>[url="'.$_SERVER['PHP_SELF'].'?y=M&x='.$i.'"]Rent[/url]</td> <tr>'; } echo ' </tr> </table>'; } $h->endpage(); ?>   Now to add the link to your game:   [url='brothel.php']Brothel[/url]   You can actualy name this file as you want.
  14. Re: [MCC V2] - Search.php in one | Optimized I always prefer to put action="'.$_SERVER['PHP_SELF'].'". And MTG. i know ISSET()
  15. Re: [MCC V2] - Search.php in one | Optimized Yes. It is. I am going through my game file's once more and saw this would be alright to give out.
  16. Re: [MCC V2] - Search.php in one | Optimized It's basicly a code update. No visual update as of yet.
  17. Re: [v2]Simple Mine Crazy-T Please stop boosting your post count -.-
  18. Re: C.E FORUM COLORS! It is not about a game so why in game development. I would also like to choose from a variety of different theme's. Would be cool.
  19. Just replace search.php with this:   <?php include("globals.php"); echo '<h1>Search For a User</h1>'; if($_POST['username']) { $name = mysql_real_escape_string($_POST['username']); $fetch = mysql_query("SELECT userid,username,money FROM users WHERE username LIKE('%".$name."%')"); echo ' User\'s found: '.mysql_num_rows($fetch).' <table border="0" class="table" cellspacing="0" cellpadding="0" width="50%"> <tr> <th>Username</th> <th>Money</th> </tr>'; if(mysql_num_rows($fetch) == 0) { echo ' <tr> <td colspan="2"> <center> No user\'s found </center> </td> </tr> </table>'; $h->endpage(); exit; } while($soc = mysql_fetch_assoc($fetch)) { echo ' <tr> <td>[url="viewuser.php?u='.$soc['userid'].'"]'.$soc['username'].' ['.$soc['userid'].'][/url]</td> <td>'.money_formatter($soc['money']).'</td> </tr> <tr>'; } echo ' </tr> </table>'; $h->endpage(); exit; } if($_POST['ID']) { header("Location: viewuser.php?u=".$_POST['ID']); exit; } if($_POST['loc']) { $l = abs(@intval($_POST['loc'])); $rows = mysql_query("SELECT userid,username,money FROM users WHERE location=".$l); echo ' User\'s found: '.mysql_num_rows($rows).' <table border="0" class="table" cellspacing="0" cellpadding="0" width="50%"> <tr> <th>Username</th> <th>Money</th> </tr>'; if(mysql_num_rows($rows) == 0) { echo ' <tr> <td colspan="2"> <center> No user\'s found </center> </td> </tr> </table>'; $h->endpage(); exit; } while($soc = mysql_fetch_assoc($rows)) { echo ' <tr> <td>[url="viewuser.php?u='.$soc['userid'].'"]'.$soc['username'].' ['.$soc['userid'].'][/url]</td> <td>'.money_formatter($soc['money']).'</td> </tr> <tr>'; } echo ' </tr> </table>'; $h->endpage(); exit; } echo ' <form action="'.$_SERVER['PHP_SELF'].'" method="post"> Search by name: <input type="text" name="username"> <input type="submit" value="Search By Name"> Search by ID: <input type="text" name="ID"> <input type="submit" value="Search By ID"> Search by Location: <select name="loc" type="dropdown">'; $fe = mysql_query("SELECT cityid,cityname FROM cities WHERE cityminlevel <= ".$ir['level']); while($soci = $db->fetch_row($fe)) { echo '<option value="'.$soci['cityid'].'">'.$soci['cityname'].'</option>'; } echo ' </select> <input type="submit" value="Search By Location"> </form>'; $h->endpage(); ?>   And then delete: searchname.php searchlocation.php And your done.
  20. Re: [mccode v2] Preferences if($ir['userid']) { echo 'No you can not change pass because it belongs to demo' . $h->endpage() . exit; }
  21. Re: [MCcode v2] Advanced spying script [$10 USD] Good mod. just one thing. It's not clime. It's climb.
  22. Re: [MCCodes V2] View User This is set out like mine lol. On all my V2 game's i put the staff info right at the bottom and along with the staff note's. I knew i should'nt give you staff on RR :P.
  23. Haunted Dawg

    tutorial?

    Re: tutorial? PHP Official site =>php.net horizon's game engine => Purchasable to buy script => phphorizons.com
  24. Re: Error Reporting... Putty is a program you can use to go into SSH
  25. Re: Error Reporting... You should remove error_reporting(E_ALL); from your main script.
×
×
  • Create New...