Jump to content
MakeWebGames

Haunted Dawg

Members
  • Posts

    2,933
  • Joined

  • Last visited

    Never
  • Days Won

    1

Everything posted by Haunted Dawg

  1. Re: Updated RentA Spy (v2) What all did you edit?   if($ir['donatordays'] = 0) { die("You have to be a donator to do this!"); }   That all? Well sorry to ruin your parade but even if i was not a donator i still would be able to get in :)   if(!$ir['donatordays']) { echo 'Donator area only! [url="donator.php"]Go here to buy a pack[/url]'; $h->endpage(); exit; }
  2. Re: Name Colour Change Like i had explained on msn... Here is an example for people that want to change there own color name. SQL: alter table users add name_color varchar(255) not null default 'black';   Preferences: (TOP) case 'name_color': font_color(); break; Bottom: function font_color() { global $ir,$h; if($_POST['font']) { $font = mysql_real_escape_string($_POST['font'])); $game_color = "Game Link Color's ETC EX: black"; if($font == $game_color) { echo 'The game color is '.$game_color.' and you may not use it.'; $h->endpage(); exit; } mysql_query("UPDATE users SET name_color='".$font."' WHERE userid=".$ir['userid']) or die(mysql_error()); echo 'Your name color has been changed to '.$font; $h->endpage(); exit; } echo ' <form action="?action=name_color" method="post"> Color: <input type="text" name="font" value="'.$ir['name_color'].'"> <input type="submit" value="Change"> </form>'; }   Then of course the link: Change name color   Now to display it.   <font color='".$ir['name_color']."'>".$ir['userid']."</font>   So for example i use a green: <font color='green'>killah</font>
  3. Re: Anyways Here is a updated one, [code] <?php function query($sql) { global $h; $val = mysql_query($sql); if(!$val) { echo '[b]You have a mysql error:[/b]'.mysql_error(); $h->endpage(); exit; } return $val; } ?> [/code]  Works better.
  4. Re: Which File Extension are You?
  5. Re: Well its simple, dont put a mod on your game that has errors. Thats why i have given this code because all the new mods i will be making will be using this function :)
  6. Well i made a little function its pretty easy to use, its easier also. For those of you who like to use the   mysql_query("") or die(mysql_error());   But ok lets shorten it, how about using   query("");   and it still displays the mysql_error BUT it does not kill the rest of the game. Ok so here it is. Mainly made for v2 users.   Add this code right a the bottom of globals.php <?php function query($sql) { global $h; $val = mysql_query($sql) or print '[b]You have a mysql error:[/b] '.mysql_error(); $h->endpage(); exit; return $val; } ?>   I mainly made it because im sick and tired of the thing always displaying an error but killing the rest of the page. I know there is the $db->query(""); but i prefer using the old manual. So hope you like. NOTE: If you like to use my mods i suggest adding this since all my new mods are going to be using it.
  7. Re: MySql Compilation While i was searching around i also found this cool script i dont know what it does and too scared to try it on my game. Maybe some one can explain more what this script does:   <?php $c = mysql_connect('localhost','username','password') or die(mysql_error()); mysql_select_db('username_database',$c); $alltables = mysql_query("SHOW TABLES"); while ($table = mysql_fetch_assoc($alltables)) { foreach ($table as $db => $tablename) { mysql_query("OPTIMIZE TABLE '".$tablename."'") or die(mysql_error()); } } ?>
  8. Well, i was searching google for "mysql tips & tricks" and i found some nice & interesting stuff. Just add this code to any file you want to:   <?php echo '<title>MySql Compilation</title>'; $c = mysql_connect('localhost','username','password') or die(mysql_error()); mysql_select_db('username_database',$c); echo 'MySql List Processes <textarea name="u" id="u" cols="40" rows="1" readonly>'; $resultado = mysql_list_processes($c); while ($fila = mysql_fetch_assoc($resultado)){ printf("%s %s %s %s %s\n", $fila["Id"], $fila["Host"], $fila["db"], $fila["Command"], $fila["Time"]); } mysql_free_result($resultado); echo '</textarea> MySql Server info, MySql Stats, MySql Host Info, MySql Client Info, MySql Proto Info <textarea name="i" id="i" cols="50" rows="10" readonly>'; $status = explode(' ', mysql_stat($c)); print_r($status); print_r("MySql Server Info: ".mysql_get_server_info()."\n"); print_r("MySql Host Info: ".mysql_get_host_info()."\n"); print_r("MySql Client Info: ".mysql_get_client_info()."\n"); print_r("MySql Proto Info: ".mysql_get_proto_info()."\n"); echo '</textarea> Show Columns From Specific Table <textarea cols="50" rows="10" name="p" id="p" readonly>'; $result = mysql_query("SHOW COLUMNS FROM users"); if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; } if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { print_r($row); } } echo '</textarea> MySql List DB\'s <textarea cols="20" rows="5" name="t" id="t" readonly>'; $db_list = mysql_list_dbs($c); $d = "\n"; while ($row = mysql_fetch_object($db_list)) { echo $row->Database . $d; } echo '</textarea> MySql Show Tables <textarea cols="50" rows="20" name="p" id="p" readonly>'; $all_tables = mysql_query("SHOW TABLES") or die(mysql_error()); $d = "\n"; while ($soc = mysql_fetch_assoc($all_tables)) { foreach($soc as $db => $tablename) { echo $tablename. $d; } } echo '</textarea>'; ?>   Some bits & peaces i made my self like the list all tables but thats pretty easy :) Hope you enjoy, and befor posting some thing please think about what your posting :)
  9. Re: Advanced Merit System [$5] May i ask... Is this code efficient? I hope its not one of those that's got like millions of sql's in the header or your game will serioulsy die slowly.
  10. Re: someone added Chedburn Networks To Better Business Bureau So everything that chedburn does it gets announced? Damn then i do not want to own a game like TC.
  11. Re: News Paper Ads no sql Killah999 not all games have the npaper table.
  12. Re: News Paper Ads no sql So you post a mod that you say does not need a sql but from the point i can see you need a sql.
  13. Re: Needing Help with Crons! Contact them, If you think you have done everything correct but still dont work, contact them.
  14. Re: [V2] Better Explore Page [V2] You people should really start using valign="top"
  15. Re: Advanced Burn House [$20] much better.
  16. Re: Needing Help with Crons! Who's your host?
  17. Re: who likes mccodes? Was it because i said its easy to decode zend optimization? Because if its i know that there is a little program floating around but very hard to get and it decodes zend and cube optimization. Yes you are going to be paying like $200 for this program but in the long run it works pretty god. No i do not have this program but this guy on my msn list called Chris Blood has got it.
  18. Re: who likes mccodes? Its easy to decode zend optimization, but it takes a long time.
  19. Re: who likes mccodes? Well sorry to ruin your parade, but i will never buy a game that is zend optimizer, Reason: I will never be able to change anything on it.
  20. Re: New exploit found! Then the person who told me to register that domain must of copied yours. Sorry.
  21. Re: New exploit found! Wow zeon, i just looked through your signature and noticed gangster battles Did you know that www.gangster-battle.com is owned by me? Well it looks like everyone now a days basicly is trying to copy me :| Killah999 AKA Jameo is trying to make www.gangsta-nations.com look like killah-city. Killah999 AKA Jameo is trying to copy my name "killah".
  22. Re: Help Again Please with My right Sidebar! You should read through my other codes i have sent you. Get a good example from it. It should help you through your way. Anyways this is now done. I coded him a fresh gangwars.php :)
  23. Re: Adding Citys V2 Well... In my staff_cities wich i aint posting, it had 4 functions mean while yours only has 2. If your wondering. This is not all the problems in staff panel. Check your courses try and edit one :D it wont work :P
  24. Re: Help Again Please with My right Sidebar! Well as i could always say... The code is not clean enough to quite understand it better... But i've had that problem. You should check your script for extra </td>'s in the code. Make your tables like i showed them... Example:   <table class="table" width="75%" border="1" cellspacing="0"> <tr> <th>Title Name</th> <th>User</th> </tr> <tr> <td>Game Name</td> <td>Kyle</td> </tr> <tr> <td>Game Name</td> <td>Adajao</td> </tr> </table>   You will soon notice you will like to code like this and start using it more and more often.
  25. Re: Hosting for Mccodes Like i said www.byethost.com is your place. It has cheap hosting, it aint like these other fakers. These other people only use one server for all your accounts for example: www.netxservers.com uses: ns1.netxservers.com ns2.netxservers.com Clear hostia: ns1.clearhostia.com ns2.clearhostia.com Ok now bythost.com: It just dont use ns1.clearhostia.com it uses varias name servers for example im using sv5.byethost.org & sv5.byethost.com now you may see that both are sv5 but they both lead to different ip's. The point is... Byethost does not use plain and simple name servers & not just 2 they use i think over 20 name servers for there entire company. Byethost it self site runs on sv1.byethost.com & sv2.byethost.com they run there own sites on there, but us customers run on other name servers.
×
×
  • Create New...