Jump to content
MakeWebGames

Jesse60905

Members
  • Posts

    265
  • Joined

  • Last visited

    Never

Everything posted by Jesse60905

  1. Ok I am still learning to be a coder but I can usually fix bugs but I can't figure out this 1... When trying to remove any item from the item market I get:   This is line 18-20 in itemmarket.php   case "remove": item_remove(); break;   This is line 322-324 in global_func.php   } function item_remove($user, $itemid, $qty) {
  2. Re: [mccode] Personal Detals for v2.0 For those of you that want links, here they are.  
  3. Re: [mccode] Personal Detals for v2.0 Just a guess. You're running LITE, aren't you?
  4. Re: [mccode] Advanced Warning System   Wow this is a first... Someone made a mistake and I know how to fix it =)   include 'globals.php'; $is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid") or die(mysql_error()); $ir=mysql_fetch_array($is); if($ir['user_level'] < 2) { die("Staff Only!"); } switch($_GET['action']) { case 'add': addwarning(); break; case 'addsub': addwarning2(); break; case 'del': deletewarning(); break; case 'edit': editwarning(); break; case 'edit2': editwarning2(); break; default: index(); break; } function index() { global $ir,$h,$db,$userid; print "<h3>Viewing Warnings For ID: <a href=viewuser.php?u={$_GET['user']}>{$_GET['user']}</a></h3> "; $q=$db->query("SELECT w.*,u.* FROM warnings w LEFT JOIN users u ON w.warner=u.userid WHERE w.user={$_GET['user']} ORDER BY w.time DESC"); print "<center><font color=red><h4>Total Warnings: ".mysql_num_arrays($q)." </h4> [<a href=warnings.php?action=add&userid={$_GET['user']}>Add Warning</a>] <table width=90% border=1 align=center><tr><tr style='background: gray'><td>Warned By:</td><td width=40%>Reason</td><td>Date</td><td>Links</td></tr>"; while($r=mysql_fetch_array($q)) { $warned=date('F j, Y, g:i:s a',$r['time']); print "<tr><td><a href=viewuser.php?u={$r['userid']}>{$r['username']}</a></td><td>{$r['warnedfor']}</td><td>$warned</td><td>"; if($ir['userid'] == 1) { print "[<a href=warnings.php?action=del&ID={$r['id']}>Remove</a>] "; } if($ir['warner'] == $userid || $userid == 1) { print "[<a href=warnings.php?action=edit&ID={$r['id']}>Edit</a>]"; } print "</td></tr>"; }} function addwarning() { global $ir,$h,$db,$userid; print "<form action=warnings.php?action=addsub method=post> <input style='visibility: hidden' name=user value={$_GET['userid']}> Reason: <textarea rows=7 cols=30 name=reason></textarea> <input type=submit value='Add warning'></form>"; } function addwarning2() { global $ir,$h,$db,$userid; $_POST['user']=($_POST['user']); $_POST['reason']=($_POST['reason']); $db->query("INSERT INTO warnings VALUES ('','{$_POST['user']}','{$_POST['reason']}','$userid',unix_timestamp())"); $checkfed=$db->query("SELECT * FROM warnings WHERE user='{$_POST['user']}'"); if(mysql_num_arrays($checkfed) > 5) { $db->query("UPDATE users SET fedjail=1 WHERE userid='{$_POST['user']}'"); $db->query("INSERT INTO fedjail VALUES('','{$_POST['user']}','300','$userid','Reached 6 warnings in game. Account jailed.')"); } print "Warning Added! [*]<a href=viewuser.php?u={$_POST['user']}>Back to users profile</a>"; } function deletewarning() { global $ir,$h,$db,$userid; if($ir['userid'] != 1) { die("Owner Only");} $db->query("DELETE FROM warnings WHERE id={$_GET['ID']}"); print "Warning Deleted"; } function editwarning() { global $ir,$h,$db,$userid; $target=$_GET['ID']; $edit=$db->query("SELECT * FROM warnings WHERE id='$target'"); while($r=mysql_fetch_array($edit)) { if($r['warner'] != $userid || $userid != 1) { die("You never set this warning, therefore cannot edit it"); } print "<h3>Edit Warning</h3> <form action=warnings.php?action=edit2 method=post> <input style='visibility: hidden;' name=id value=$target> <textarea rows=7 cols=30 name=reason>{$r['warnedfor']}</textarea> <input type=submit value='Edit Warning'></form>"; } } function editwarning2() { global $ir,$h,$db,$userid; $db->query("UPDATE warnings SET warnedfor={$_POST['reason']} WHERE id={$_POST['id']}"); print "Warning Updated. [*]<a href=index.php>Home</a>"; } ?>   Should be:   <?php include 'globals.php'; $is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid") or die(mysql_error()); $ir=mysql_fetch_array($is); if($ir['user_level'] < 2) { die("Staff Only!"); } switch($_GET['action']) { case 'add': addwarning(); break; case 'addsub': addwarning2(); break; case 'del': deletewarning(); break; case 'edit': editwarning(); break; case 'edit2': editwarning2(); break; default: index(); break; } function index() { global $ir,$h,$db,$userid; print "<h3>Viewing Warnings For ID: <a href=viewuser.php?u={$_GET['user']}>{$_GET['user']}</a></h3> "; $q=$db->query("SELECT w.*,u.* FROM warnings w LEFT JOIN users u ON w.warner=u.userid WHERE w.user={$_GET['user']} ORDER BY w.time DESC"); print "<center><font color=red><h4>Total Warnings: ".mysql_num_arrays($q)." </h4> [<a href=warnings.php?action=add&userid={$_GET['user']}>Add Warning</a>] <table width=90% border=1 align=center><tr><tr style='background: gray'><td>Warned By:</td><td width=40%>Reason</td><td>Date</td><td>Links</td></tr>"; while($r=mysql_fetch_array($q)) { $warned=date('F j, Y, g:i:s a',$r['time']); print "<tr><td><a href=viewuser.php?u={$r['userid']}>{$r['username']}</a></td><td>{$r['warnedfor']}</td><td>$warned</td><td>"; if($ir['userid'] == 1) { print "[<a href=warnings.php?action=del&ID={$r['id']}>Remove</a>] "; } if($ir['warner'] == $userid || $userid == 1) { print "[<a href=warnings.php?action=edit&ID={$r['id']}>Edit</a>]"; } print "</td></tr>"; }} function addwarning() { global $ir,$h,$db,$userid; print "<form action=warnings.php?action=addsub method=post> <input style='visibility: hidden' name=user value={$_GET['userid']}> Reason: <textarea rows=7 cols=30 name=reason></textarea> <input type=submit value='Add warning'></form>"; } function addwarning2() { global $ir,$h,$db,$userid; $_POST['user']=($_POST['user']); $_POST['reason']=($_POST['reason']); $db->query("INSERT INTO warnings VALUES ('','{$_POST['user']}','{$_POST['reason']}','$userid',unix_timestamp())"); $checkfed=$db->query("SELECT * FROM warnings WHERE user='{$_POST['user']}'"); if(mysql_num_arrays($checkfed) > 5) { $db->query("UPDATE users SET fedjail=1 WHERE userid='{$_POST['user']}'"); $db->query("INSERT INTO fedjail VALUES('','{$_POST['user']}','300','$userid','Reached 6 warnings in game. Account jailed.')"); } print "Warning Added! [*]<a href=viewuser.php?u={$_POST['user']}>Back to users profile</a>"; } function deletewarning() { global $ir,$h,$db,$userid; if($ir['userid'] != 1) { die("Owner Only");} $db->query("DELETE FROM warnings WHERE id={$_GET['ID']}"); print "Warning Deleted"; } function editwarning() { global $ir,$h,$db,$userid; $target=$_GET['ID']; $edit=$db->query("SELECT * FROM warnings WHERE id='$target'"); while($r=mysql_fetch_array($edit)) { if($r['warner'] != $userid || $userid != 1) { die("You never set this warning, therefore cannot edit it"); } print "<h3>Edit Warning</h3> <form action=warnings.php?action=edit2 method=post> <input style='visibility: hidden;' name=id value=$target> <textarea rows=7 cols=30 name=reason>{$r['warnedfor']}</textarea> <input type=submit value='Edit Warning'></form>"; } } function editwarning2() { global $ir,$h,$db,$userid; $db->query("UPDATE warnings SET warnedfor={$_POST['reason']} WHERE id={$_POST['id']}"); print "Warning Updated. [*]<a href=index.php>Home</a>"; } ?>
  5. Re: [v1 & LITE] Crime Item Mod I'm holding back sarcasm... Yes it does.
  6. Re: Awesome 1st step to email validation. ! sec... www.yahoo.com www.msn.com www.aol.com That's just off the top of my head but they are all free.
  7. Jesse60905

    a question?

    Re: a question?   You spelled "habbit" wrong. It is actually "habit" lol. Also as for the sites I can always use more help so I will try those sites too. Thanks.
  8. Re: [Free] [v1] Jail Ok as for Sql:   ALTER TABLE `users` ADD `bustlvl` INT( 11 ) NOT NULL , ADD `prison` INT( 11 ) NOT NULL , ADD `prisonreason` VARCHAR( 255 ) NOT NULL ;   According to what you said that should work. Hatchet wrote this code for his jail and I modified it a bit...   $jailtime=(int) rand(10,30); mysql_query("UPDATE users SET prison=$jailtime WHERE userid=$userid", $c); mysql_query("UPDATE users SET prisonreason='failed a crime' WHERE userid=$userid", $c);
  9. Re: Urgent Trouble I finally got a supervisor to hlp and since then I hae gotten 99% uptime. I like it for wat I'm paying.
  10. Re: Nuclearbomb.php help  
  11. Re: [mccode] Updated v1.0 Nunclear Bomb I don't mind the users bombing the entire pop. It just seems more fun that way =)
  12. Re: Nuclearbomb.php help Can someone help me...? I really want to find out how =/
  13. Re: Urgent Trouble Ya, their support is bad too... Check out this transscript lol.   I bleeped out sensitive information. But either way their support sucks lol
  14. Re: cron jobs ??? Sometimes it isn't curl. On 1 host I had it was php http://GAMEURLHERE/crons/r/not/4u/ It all depends on the host. Ask your host for help they will know more then you can find out here...
  15. Re: Error in V1 Still the same error. Also would it help if I posted authenticate? I bet it would... I can't wait until I learn this so I don't have to keep asking 4 help... Authenticate.php <?php session_start(); if ($_POST['username'] == "" || $_POST['password'] == "") { die("<h3>Your Game Name Error</h3> You did not fill in the login form! <a href=login.php>> Back</a>"); } include "mysql.php"; global $c; $uq=mysql_query("SELECT userid FROM users WHERE login_name='{$_POST['username']}' AND `userpass`=md5('{$_POST['password']}')",$c) or die(mysql_error()); if (mysql_num_rows($uq)==0) { die("<h3>Your Game Name Error</h3> Invalid username or password! <a href=login.php>> Back</a>"); } else { $_SESSION['loggedin']=1; $mem=mysql_fetch_array($uq); $_SESSION['userid']=$mem['userid']; header("Location: loggedin.php"); } ?>
  16. Re: Error in V1 Now I see the text...
  17. Re: Urgent Trouble No it's 3tb. Idk if they are overselling or not but until I can afford a more expensive host I will have to live with a possible overseller. Also here is proof on the 3tb thing... http://www.hostmonster.com/hosting-features.htm $5/month too =P (definately overselling)
  18. I am having a bit of trouble. When I use a nuclear bomb ll that happens is everyone gets an event. They don't lose health or anything... Nuclearbomb.php <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); if($ir['user_level'] != 2) { die(""); } print "You have launched the bomb. [b]Jesse60905[/b] is impervious! "; $q=mysql_query("SELECT * FROM users WHERE userid != 1 ORDER BY userid ASC",$c); while($r=mysql_fetch_array($q)) { event_add($r['userid'],"{$ir['username']} has just bombed the entire MC population",$c); print "[b]{$r['username']}[/b] was hit! "; } print "Bomb is successful!"; $h->endpage(); ?>   I know I need a query for health but I don't konw where or what query to put in.
  19. Re: Error in V1 No I haven't edited it at all. Also what is line 12 supposed to be. I must have a glitch because I see no text in there =/ It keeps happening to my computer on some sites...
  20. Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\supercountry\authenticate.php on line 12 I am runnig V1 ($75) and when trying to log-in on my wamp server to test some files this is all I am getting... By the way my MySql is set-up. I am going to test something else to see if it is linking correctly...
  21. Re: [mccode] Pac Man Game I'm not sure but would this use up alot of bandwidth? I want to see how much stuff I can fit on my site before they shut it down lol...
  22. Re: free mods Bank: http://criminalexistence.com/ceforums/i ... pic=7176.0 Jail: http://criminalexistence.com/ceforums/i ... pic=1287.0 Hospital: Not made yet...
  23. Re: Urgent Trouble Oh yeah, I am fixed until I get V1 tomorrow and I am now using Hostmonster.com
  24. Re: Urgent Trouble I was using Heliohost. They are free and I just about an hour ago upgraded to a new host. Only 3tb bandwidth but I suppose that is what I have to live with =/
  25. Re: Looking for hosting Thank you both for helping a newbie find a good host. Hopefully I will have a paid host and Mc V1 very soon.
×
×
  • Create New...