Jump to content
MakeWebGames

Colonel

Members
  • Posts

    71
  • Joined

  • Last visited

    Never

Colonel's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Re: [mccode v2] User Search   It does not work with Internet Explorer, Try Firefox.
  2. Re: [mccode v2] User Search Excellent Blue!! +1 It looks and works very nice on my game!!
  3. Re: [mccodes V1-V2]Selling MYOP - Players can make their Own Donor Packs ($75) Cool idea but way to rich for my blood. Good Luck!
  4. Re: [mccode v2] Drugs Corner http://criminalexistence.com/ceforums/i ... ic=18785.0
  5. Re: mccodes V2] Upgrade IPFINDER original Script by Magicaltallguy When you update the status I get this error...   Notice: Undefined index: HTTP_X_FORWARDED_FOR in /home/********/public_html/global_func.php on line 414   Here is the line it is referring to...   $IP = ($_SERVER['HTTP_X_FORWARDED_FOR'])
  6. Re: attacking help That may work but if his game is like mine, my mods are able to play so it would be unfair for them to not be able to be attacked. The code i posted only covers the user id 1.
  7. Re: attacking help Your very welcome. :wink:
  8. Re: attacking help In attack.php Find print "This player is in hospital. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; }   Add under else if ($odata['userid'] == 1) { print "Staff cannot be attacked!"; $h->endpage(); exit; }   That will keep anyone from attacking you as long as your user id is 1, If it isn't 1 then change the number to whatever your ID number is.
  9. Re: [mccode v2] User Shops [$35.00] As much as I enjoy your mods and the service that comes with them, I must agree that this a little steep of a price for me. Good luck with your sales Zero!!
  10. Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS This is a pretty cool script, I know illusions has spent a long time on it and it works very well!
  11. Re: [mccode v2] cars_mod staff_cars Since I can't edit my post... I found a few more errors with the help of Illusions, here is the updated staff_cars.php file   <?php include "sglobals.php"; if($ir['user_level'] > 3) { die("sorry nope go away"); } switch($_GET['action']) { case 'givecar': give_car_form(); break; case 'givecarsub': give_car_submit(); break; case 'addcar': addcar(); break; case 'editcar': editcar(); break; case 'delcar': delcar(); break; case 'garagebeg': garage_user_begin(); break; case 'garageuser': garage_user_view(); break; case 'delusercar': user_car_delete(); break; default: print "Error: This script requires an action."; break; } function addcar() { global $db, $ir, $c, $h, $userid; $name=$_POST['name']; $desc=$_POST['desc']; if($desc and $name) { $q=$db->query("SELECT * FROM cars_types WHERE carname='{$name}'"); if($db->num_rows($q)) { print "Sorry, you cannot have two car`s with the same name."; $h->endpage(); exit; } $db->query("INSERT INTO cars_types VALUES('NULL','$name','$desc', '{$_POST['carCOST']}','{$_POST['carACC']}','{$_POST['carHAN']}','{$_POST['carSPD']}','{$_POST['carSHD']}','{$_POST['carBUYABLE']}')"); print " {$name} added to the game."; stafflog_add("Created Car $name"); } else { print "<h3>Add car</h3><hr /> <form action='staff_cars.php?action=addcar' method='post'> car`s Name: <input type='text' name='name' /> car`s Description: <input type='text' name='desc' /> car`s cost: <input type='text' name='carCOST' /> car`s Acceleration: <input type='text' name='carACC' /> car`s Handling: <input type='text' name='carHAN' /> car`s Speed: <input type='text' name='carsPD' /> car`s Shield: <input type='text' name='carsHD' /> car`s carBUYABLE if 1=yes and 0=no: <input type='text' name='carBUYABLE' /> <input type='submit' value='Add car' /></form>"; } } function editcar() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $name=$_POST['name']; $desc=$_POST['desc']; $q=$db->query("SELECT * FROM cars_types WHERE carname='{$name}' AND carid!={$_POST['id']}"); if($db->num_rows($q)) { print "Sorry, you cannot have two cars with the same name."; $h->endpage(); exit; } $name=$_POST['name']; $q=$db->query("SELECT * FROM cars_types WHERE carid={$_POST['id']}"); $old=$db->fetch_row($q); $db->query("UPDATE cars_types SET carname='$name', carDESC='$desc',carCOST='{$_POST['carCOST']}',carACC='{$_POST['carACC']}',carHAN='{$_POST['carHAN']}',carSPD='{$_POST['carSPD']}',carSHD='{$_POST['carSHD']}',carBUYABLE='{$_POST['carBUYABLE']}' WHERE carid={$_POST['id']}"); print "Car $name was edited successfully."; stafflog_add("Edited Car $name"); break; case "1": $q=$db->query("SELECT * FROM cars_types WHERE carid={$_POST['car']}"); $old=$db->fetch_row($q); print "<h3>Editing a car</h3><hr /> <form action='staff_cars.php?action=editcar' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='id' value='{$_POST['car']}' /> car`s Name: <input type='text' name='name' value='{$old['carNAME']}'/> car`s Description: <input type='text' name='desc' value='{$old['carDESC']}'/> car`s cost: <input type='text' name='carCOST' value='{$old['carCOST']}'/> car`s Acceleration: <input type='text' name='carACC' value='{$old['carACC']}'/> car`s Handling: <input type='text' name='carHAN' value='{$old['carHAN']}'/> car`s Speed: <input type='text' name='carSPD' value='{$old['carSPD']}'/> car`s Shield: <input type='text' name='carSHD' value='{$old['carSHD']}'/> car`s carBUYABLE if 1=yes and 0=no: <input type='text' name='carBUYABLE' value='{$old['carBUYABLE']}'/> <input type='submit' value='Edit Car' /></form>"; break; default: print "<h3>Editing a cars</h3><hr /> <form action='staff_cars.php?action=editcar' method='post'> <input type='hidden' name='step' value='1' /> Item: ".car_dropdown($c,'car')." <input type='submit' value='Edit car' /></form>"; break; } } function delcar() { global $db,$ir,$c,$h,$userid; if($_POST['car']) { $q=$db->query("SELECT * FROM cars_types WHERE carID={$_POST['car']}"); $old=$db->fetch_row($q); if($old['id']==1) { die("This car cannot be deleted."); } $db->query("DELETE FROM cars_types WHERE carID={$old['carID']}"); print "Car {$old['carname']} deleted."; stafflog_add("Deleted the car {$old['carname']}"); } else { print "<h3>Delete car</h3><hr /> Deleting a ar is permanent Be sure of removing Cars <form action='staff_cars.php?action=delcar' method='post'> Car: ".car_dropdown($c, "car")." <input type='submit' value='Delete car' /></form>"; } } function report_clear() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $_GET['ID'] = abs((int) $_GET['ID']); stafflog_add("Cleared player report ID {$_GET['ID']}"); $db->query("DELETE FROM preports WHERE prID={$_GET['ID']}"); print "Report cleared and deleted! [url='staff_users.php?action=reportsview']> Back[/url]"; } function garage_user_begin() { print "<h3>Viewing User garage</h3> You may browse this user's garage. <form action='staff_cars.php?action=garageuser' method='post'> User: ".user_dropdown($c,'user')." <input type='submit' value='View garage' /></form>"; } function garage_user_view() { if(!$_GET['st'] ) { $_GET['st']=0; } $start=abs((int) $_GET['st']); $cpp=20; global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $d=$db->query("SELECT username FROM users WHERE userid='{$_POST['user']}'"); $un=$db->fetch_single($d); $q=$db->query("SELECT cpcPLAYER FROM cars_playercars WHERE cpcPLAYER='{$_POST['user']}'", $c); $cars=mysql_num_rows($q); $pages=ceil($cars/$cpp); print "Pages: "; for($i=1; $i<=$pages; $i++) { $st=($i-1)*$cpp; if($st == $start) { print "[b]$i[/b] "; } else { print "[url='garage.php?st=$st']$i[/url] "; } } print " <table width=100% border=6> <tr style='background:#cc9966'><th>Car</th><th>Acceleration</th> <th>Handling</th><th>Speed</th><th>Shield</th><th>In Challenge?</th><th>delete</th></tr>"; $q=mysql_query("SELECT cp.*, ct.* FROM cars_playercars cp LEFT JOIN cars_types ct ON cp.cpcCAR=ct.carID WHERE cp.cpcPLAYER='{$_POST['user']}' LIMIT $start, $cpp", $c); $count=0; $cars=array(); while($r=$db->fetch_row($q)) { $count++; $acc=$r['cpcACCLV']*$r['carACC']; $han=$r['cpcHANLV']*$r['carHAN']; $spd=$r['cpcSPDLV']*$r['carSPD']; $shd=$r['cpcSHDLV']*$r['carSHD']; $q2=mysql_query("SELECT * FROM challenges WHERE chCHRCAR={$r['cpcID']} AND chSTATUS='open'", $c); if($db->num_rows($q2) == 1) { $challenge="<font color='red'>Yes</font>"; } else { $challenge="<font color='green'>No</font>"; } print "<tr><td>{$r['carNAME']} </td> <td>Lv{$r['cpcACCLV']} ($acc)</td> <td>Lv{$r['cpcHANLV']} ($han)</td> <td>Lv{$r['cpcSPDLV']} ($spd)</td> <td>Lv{$r['cpcSHDLV']} ($shd)</td><td>$challenge</td> <td><a href='#'>Delete</td> </tr>"; $cars[$r['cpcID']]="{$r['carNAME']} - {$r['cpcACCLV']}/{$r['cpcHANLV']}/{$r['cpcSPDLV']}/{$r['cpcSHDLV']}"; } if($count == 0) { print "<tr><th colspan=6>No Cars In this players Garage</th></tr>"; } print "</td></tr></table>"; } function give_car_form() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } print "<h3>Giving cars To User</h3> <form action='staff_cars.php?action=givecarsub' method='post'> User: ".user_dropdown($c,'user')." Cars: ".car_dropdown($c,'car')." <input type='submit' value='car Given ' /></form>"; } function give_car_submit() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } $db->query("INSERT INTO cars_playercars VALUES('',{$_POST['user']},{$_POST['car']},1,1,1,1);",$c) or die(mysql_error()); print "You gave {$_POST['qty']} of car ID {$_POST['car']} to user ID {$_POST['user']}"; stafflog_add("Gave {$_POST['qty']} of car ID {$_POST['car']} to user ID {$_POST['user']}"); } $h->endpage(); ?>
  12. Re: [V2] cars_mod staff_cars Here is the updated version with illusions edit fix, my give car fix, and text changed so everything reads as cars instead of ships and plains.   <?php include "sglobals.php"; if($ir['user_level'] > 3) { die("sorry nope go away"); } switch($_GET['action']) { case 'givecar': give_car_form(); break; case 'givecarsub': give_car_submit(); break; case 'addcar': addcar(); break; case 'editcar': editcar(); break; case 'delcar': delcar(); break; case 'garagebeg': garage_user_begin(); break; case 'garageuser': garage_user_view(); break; case 'delusercar': user_car_delete(); break; default: print "Error: This script requires an action."; break; } function addcar() { global $db, $ir, $c, $h, $userid; $name=$_POST['name']; $desc=$_POST['desc']; if($desc and $name) { $q=$db->query("SELECT * FROM cars_types WHERE carname='{$name}'"); if($db->num_rows($q)) { print "Sorry, you cannot have two car`s with the same name."; $h->endpage(); exit; } $db->query("INSERT INTO cars_types VALUES('NULL','$name','$desc', '{$_POST['carCOST']}','{$_POST['carACC']}','{$_POST['carHAN']}','{$_POST['carsPD']}','{$_POST['carsHD']}','{$_POST['carBUYABLE']}')"); print " {$name} added to the game."; stafflog_add("Created Car $name"); } else { print "<h3>Add car</h3><hr /> <form action='staff_cars.php?action=addcar' method='post'> car`s Name: <input type='text' name='name' /> car`s Description: <input type='text' name='desc' /> car`s cost: <input type='text' name='carCOST' /> car`s Acceleration: <input type='text' name='carACC' /> car`s Handling: <input type='text' name='carHAN' /> car`s Speed: <input type='text' name='carsPD' /> car`s Shield: <input type='text' name='carsHD' /> car`s carBUYABLE if 1=yes and 0=no: <input type='text' name='carBUYABLE' /> <input type='submit' value='Add car' /></form>"; } } function editcar() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $name=$_POST['name']; $desc=$_POST['desc']; $q=$db->query("SELECT * FROM cars_types WHERE carname='{$name}' AND carid!={$_POST['id']}"); if($db->num_rows($q)) { print "Sorry, you cannot have two cars with the same name."; $h->endpage(); exit; } $name=$_POST['name']; $q=$db->query("SELECT * FROM cars_types WHERE carid={$_POST['id']}"); $old=$db->fetch_row($q); $db->query("UPDATE cars_types SET carname='$name', carDESC='$desc',carCOST='{$_POST['carCOST']}',carACC='{$_POST['carACC']}',carHAN='{$_POST['carHAN']}',carsPD='{$_POST['carsPD']}',carsHD='{$_POST['carsHD']}',carBUYABLE='{$_POST['carBUYABLE']}' WHERE carid={$_POST['id']}"); print "Car $name was edited successfully."; stafflog_add("Edited Car $name"); break; case "1": $q=$db->query("SELECT * FROM cars_types WHERE carid={$_POST['car']}"); $old=$db->fetch_row($q); print "<h3>Editing a car</h3><hr /> <form action='staff_cars.php?action=editcar' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='id' value='{$_POST['car']}' /> car`s Name: <input type='text' name='name' value='{$old['carNAME']}'/> car`s Description: <input type='text' name='desc' value='{$old['carDESC']}'/> car`s cost: <input type='text' name='carCOST' value='{$old['carCOST']}'/> car`s Acceleration: <input type='text' name='carACC' value='{$old['carACC']}'/> car`s Handling: <input type='text' name='carHAN' value='{$old['carHAN']}'/> car`s Speed: <input type='text' name='carsPD' value='{$old['carsPD']}'/> car`s Shield: <input type='text' name='carsHD' value='{$old['carsHD']}'/> car`s carBUYABLE if 1=yes and 0=no: <input type='text' name='carBUYABLE' value='{$old['carBUYABLE']}'/> <input type='submit' value='Edit Car' /></form>"; break; default: print "<h3>Editing a cars</h3><hr /> <form action='staff_cars.php?action=editcar' method='post'> <input type='hidden' name='step' value='1' /> Item: ".car_dropdown($c,'car')." <input type='submit' value='Edit car' /></form>"; break; } } function delcar() { global $db,$ir,$c,$h,$userid; if($_POST['car']) { $q=$db->query("SELECT * FROM cars_types WHERE carID={$_POST['car']}"); $old=$db->fetch_row($q); if($old['id']==1) { die("This car cannot be deleted."); } $db->query("DELETE FROM cars_types WHERE carID={$old['carID']}"); print "Car {$old['carname']} deleted."; stafflog_add("Deleted the car {$old['carname']}"); } else { print "<h3>Delete car</h3><hr /> Deleting a ar is permanent Be sure of removing Cars <form action='staff_cars.php?action=delcar' method='post'> Car: ".car_dropdown($c, "car")." <input type='submit' value='Delete car' /></form>"; } } function report_clear() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $_GET['ID'] = abs((int) $_GET['ID']); stafflog_add("Cleared player report ID {$_GET['ID']}"); $db->query("DELETE FROM preports WHERE prID={$_GET['ID']}"); print "Report cleared and deleted! [url='staff_users.php?action=reportsview']> Back[/url]"; } function garage_user_begin() { print "<h3>Viewing User garage</h3> You may browse this user's garage. <form action='staff_cars.php?action=garageuser' method='post'> User: ".user_dropdown($c,'user')." <input type='submit' value='View garage' /></form>"; } function garage_user_view() { if(!$_GET['st'] ) { $_GET['st']=0; } $start=abs((int) $_GET['st']); $cpp=20; global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $d=$db->query("SELECT username FROM users WHERE userid='{$_POST['user']}'"); $un=$db->fetch_single($d); $q=$db->query("SELECT cpcPLAYER FROM cars_playercars WHERE cpcPLAYER='{$_POST['user']}'", $c); $cars=mysql_num_rows($q); $pages=ceil($cars/$cpp); print "Pages: "; for($i=1; $i<=$pages; $i++) { $st=($i-1)*$cpp; if($st == $start) { print "[b]$i[/b] "; } else { print "[url='garage.php?st=$st']$i[/url] "; } } print " <table width=100% border=6> <tr style='background:#cc9966'><th>Car</th><th>Acceleration</th> <th>Handling</th><th>Speed</th><th>Shield</th><th>In Challenge?</th><th>delete</th></tr>"; $q=mysql_query("SELECT cp.*, ct.* FROM cars_playercars cp LEFT JOIN cars_types ct ON cp.cpcCAR=ct.carID WHERE cp.cpcPLAYER='{$_POST['user']}' LIMIT $start, $cpp", $c); $count=0; $cars=array(); while($r=$db->fetch_row($q)) { $count++; $acc=$r['cpcACCLV']*$r['carACC']; $han=$r['cpcHANLV']*$r['carHAN']; $spd=$r['cpcSPDLV']*$r['carSPD']; $shd=$r['cpcSHDLV']*$r['carSHD']; $q2=mysql_query("SELECT * FROM challenges WHERE chCHRCAR={$r['cpcID']} AND chSTATUS='open'", $c); if($db->num_rows($q2) == 1) { $challenge="<font color='red'>Yes</font>"; } else { $challenge="<font color='green'>No</font>"; } print "<tr><td>{$r['carNAME']} </td> <td>Lv{$r['cpcACCLV']} ($acc)</td> <td>Lv{$r['cpcHANLV']} ($han)</td> <td>Lv{$r['cpcSPDLV']} ($spd)</td> <td>Lv{$r['cpcSHDLV']} ($shd)</td><td>$challenge</td> <td><a href='#'>Delete</td> </tr>"; $cars[$r['cpcID']]="{$r['carNAME']} - {$r['cpcACCLV']}/{$r['cpcHANLV']}/{$r['cpcSPDLV']}/{$r['cpcSHDLV']}"; } if($count == 0) { print "<tr><th colspan=6>No Cars In this players Garage</th></tr>"; } print "</td></tr></table>"; } function give_car_form() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } print "<h3>Giving cars To User</h3> <form action='staff_cars.php?action=givecarsub' method='post'> User: ".user_dropdown($c,'user')." Cars: ".car_dropdown($c,'car')." <input type='submit' value='car Given ' /></form>"; } function give_car_submit() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } $db->query("INSERT INTO cars_playercars VALUES('',{$_POST['user']},{$_POST['car']},1,1,1,1);",$c) or die(mysql_error()); print "You gave {$_POST['qty']} of car ID {$_POST['car']} to user ID {$_POST['user']}"; stafflog_add("Gave {$_POST['qty']} of car ID {$_POST['car']} to user ID {$_POST['user']}"); } $h->endpage(); ?>
  13. Re: [V2] cars_mod staff_cars Figured it out, To anyone who is still having problems with this here is the working file... staff_cars.php   <?php include "sglobals.php"; if($ir['user_level'] > 3) { die("sorry nope go away"); } switch($_GET['action']) { case 'givecar': give_car_form(); break; case 'givecarsub': give_car_submit(); break; case 'addcar': addcar(); break; case 'editcar': editcar(); break; case 'delcar': delcar(); break; case 'garagebeg': garage_user_begin(); break; case 'garageuser': garage_user_view(); break; case 'delusercar': user_car_delete(); break; default: print "Error: This script requires an action."; break; } function addcar() { global $db, $ir, $c, $h, $userid; $name=$_POST['name']; $desc=$_POST['desc']; if($desc and $name) { $q=$db->query("SELECT * FROM cars_types WHERE carname='{$name}'"); if($db->num_rows($q)) { print "Sorry, you cannot have two car`s with the same name."; $h->endpage(); exit; } $db->query("INSERT INTO cars_types VALUES('NULL','$name','$desc', '{$_POST['carCOST']}','{$_POST['carACC']}','{$_POST['carHAN']}','{$_POST['carsPD']}','{$_POST['carsHD']}','{$_POST['carBUYABLE']}')"); print "Ship {$name} added to the game."; stafflog_add("Created Ship $name"); } else { print "<h3>Add car</h3><hr /> <form action='staff_cars.php?action=addcar' method='post'> car`s Name: <input type='text' name='name' /> car`s Description: <input type='text' name='desc' /> car`s cost: <input type='text' name='carCOST' /> car`s Acceleration: <input type='text' name='carACC' /> car`s Handling: <input type='text' name='carHAN' /> car`s Speed: <input type='text' name='carsPD' /> car`s Shield: <input type='text' name='carsHD' /> car`s carBUYABLE if 1=yes and 0=no: <input type='text' name='carBUYABLE' /> <input type='submit' value='Add car' /></form>"; } } function editcar() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $name=$_POST['name']; $desc=$_POST['desc']; $q=$db->query("SELECT * FROM cars_types WHERE carname='{$name}' AND carid!={$_POST['id']}"); if($db->num_rows($q)) { print "Sorry, you cannot have two cities with the same name."; $h->endpage(); exit; } $name=$_POST['name']; $q=$db->query("SELECT * FROM cars_types WHERE carid={$_POST['id']}"); $old=$db->fetch_row($q); $db->query("UPDATE cars_types SET carname='{$_POST['name']}', carDESC='{$_POST['desc']}',carCOST='{$_POST['carCOST']}',carACC='{$_POST['carACC']}',carHAN='{$_POST['carHAN']}',carsPD='{$_POST['carsPD']}',carsHD='{$_POST['carsHD']}',carBUYABLE='{$_POST['carBUYABLE']}'"); print "Ship $name was edited successfully."; stafflog_add("Edited Ship $name"); break; case "1": $q=$db->query("SELECT * FROM cars_types WHERE carid={$_POST['car']}"); $old=$db->fetch_row($q); print "<h3>Editing a car</h3><hr /> <form action='staff_cars.php?action=editcar' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='id' value='{$_POST['car']}' /> car`s Name: <input type='text' name='name' value='{$old['carNAME']}'/> car`s Description: <input type='text' name='desc' value='{$old['carDESC']}'/> car`s cost: <input type='text' name='carCOST' value='{$old['carCOST']}'/> car`s Acceleration: <input type='text' name='carACC' value='{$old['carACC']}'/> car`s Handling: <input type='text' name='carHAN' value='{$old['carHAN']}'/> car`s Speed: <input type='text' name='carsPD' value='{$old['carsPD']}'/> car`s Shield: <input type='text' name='carsHD' value='{$old['carsHD']}'/> car`s carBUYABLE if 1=yes and 0=no: <input type='text' name='carBUYABLE' value='{$old['carBUYABLE']}'/> <input type='submit' value='Edit Planet' /></form>"; break; default: print "<h3>Editing a cars</h3><hr /> <form action='staff_cars.php?action=editcar' method='post'> <input type='hidden' name='step' value='1' /> Item: ".car_dropdown($c,'car')." <input type='submit' value='Edit car' /></form>"; break; } } function delcar() { global $db,$ir,$c,$h,$userid; if($_POST['car']) { $q=$db->query("SELECT * FROM cars_types WHERE carID={$_POST['car']}"); $old=$db->fetch_row($q); if($old['id']==1) { die("This car cannot be deleted."); } $db->query("DELETE FROM cars_types WHERE carID={$old['carID']}"); print "Ship {$old['carname']} deleted."; stafflog_add("Deleted the car {$old['carname']}"); } else { print "<h3>Delete car</h3><hr /> Deleting a Ship is permanent Be sure of removing Ships <form action='staff_cars.php?action=delcar' method='post'> Planet: ".car_dropdown($c, "car")." <input type='submit' value='Delete car' /></form>"; } } function report_clear() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $_GET['ID'] = abs((int) $_GET['ID']); stafflog_add("Cleared player report ID {$_GET['ID']}"); $db->query("DELETE FROM preports WHERE prID={$_GET['ID']}"); print "Report cleared and deleted! [url='staff_users.php?action=reportsview']> Back[/url]"; } function garage_user_begin() { print "<h3>Viewing User garage</h3> You may browse this user's garage. <form action='staff_cars.php?action=garageuser' method='post'> User: ".user_dropdown($c,'user')." <input type='submit' value='View garage' /></form>"; } function garage_user_view() { if(!$_GET['st'] ) { $_GET['st']=0; } $start=abs((int) $_GET['st']); $cpp=20; global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $d=$db->query("SELECT username FROM users WHERE userid='{$_POST['user']}'"); $un=$db->fetch_single($d); $q=$db->query("SELECT cpcPLAYER FROM cars_playercars WHERE cpcPLAYER='{$_POST['user']}'", $c); $cars=mysql_num_rows($q); $pages=ceil($cars/$cpp); print "Pages: "; for($i=1; $i<=$pages; $i++) { $st=($i-1)*$cpp; if($st == $start) { print "[b]$i[/b] "; } else { print "[url='garage.php?st=$st']$i[/url] "; } } print " <table width=100% border=6> <tr style='background:#cc9966'><th>Car</th><th>Acceleration</th> <th>Handling</th><th>Speed</th><th>Shield</th><th>In Challenge?</th><th>delete</th></tr>"; $q=mysql_query("SELECT cp.*, ct.* FROM cars_playercars cp LEFT JOIN cars_types ct ON cp.cpcCAR=ct.carID WHERE cp.cpcPLAYER='{$_POST['user']}' LIMIT $start, $cpp", $c); $count=0; $cars=array(); while($r=$db->fetch_row($q)) { $count++; $acc=$r['cpcACCLV']*$r['carACC']; $han=$r['cpcHANLV']*$r['carHAN']; $spd=$r['cpcSPDLV']*$r['carSPD']; $shd=$r['cpcSHDLV']*$r['carSHD']; $q2=mysql_query("SELECT * FROM challenges WHERE chCHRCAR={$r['cpcID']} AND chSTATUS='open'", $c); if($db->num_rows($q2) == 1) { $challenge="<font color='red'>Yes</font>"; } else { $challenge="<font color='green'>No</font>"; } print "<tr><td>{$r['carNAME']} </td> <td>Lv{$r['cpcACCLV']} ($acc)</td> <td>Lv{$r['cpcHANLV']} ($han)</td> <td>Lv{$r['cpcSPDLV']} ($spd)</td> <td>Lv{$r['cpcSHDLV']} ($shd)</td><td>$challenge</td> <td><a href='#'>Delete</td> </tr>"; $cars[$r['cpcID']]="{$r['carNAME']} - {$r['cpcACCLV']}/{$r['cpcHANLV']}/{$r['cpcSPDLV']}/{$r['cpcSHDLV']}"; } if($count == 0) { print "<tr><th colspan=6>No Cars In this players Garage</th></tr>"; } print "</td></tr></table>"; } function give_car_form() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } print "<h3>Giving cars To User</h3> <form action='staff_cars.php?action=givecarsub' method='post'> User: ".user_dropdown($c,'user')." Cars: ".car_dropdown($c,'car')." <input type='submit' value='car Given ' /></form>"; } function give_car_submit() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } $db->query("INSERT INTO cars_playercars VALUES('',{$_POST['user']},{$_POST['car']},1,1,1,1);",$c) or die(mysql_error()); print "You gave {$_POST['qty']} of car ID {$_POST['car']} to user ID {$_POST['user']}"; stafflog_add("Gave {$_POST['qty']} of car ID {$_POST['car']} to user ID {$_POST['user']}"); } $h->endpage(); ?>
  14. Re: [V2] cars_mod staff_cars I have been using this mod and I can't for the life of me figure out the give user car part. I get the same error as the above people have. Fatal error: Call to undefined function: give_car_submit() in /home/---------/public_html/staff_cars.php on line 10   Anyone have any insight on this??
  15. Re: [mccodes V2] Bounty Hunter Game Seems to be working great now, Thanks man!!
×
×
  • Create New...