-CrAzY- Posted August 14, 2007 Posted August 14, 2007 Ive Added It, But How Do I Specify Which Users I Want To Do It To I Tryed This: www.MyGameURL!.com/hackpc.php?u=1 But It Didnt Work, Anybody Know?? Thanks! Quote
YoungGold Posted August 14, 2007 Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod post the code here Quote
-CrAzY- Posted August 14, 2007 Author Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod <?php /* ----------------------------------------------------------------------- -- Hack User's Computer -- (C) 2006 Dabomstew ----------------------------------------------------------------------- -- This script is distributed in the hope that -- it will be useful, but WITHOUT A WARRANTY -- OF ANY KIND. ----------------------------------------------------------------------- -- Dabomstew, Criminalexistence.com, and -- everyone else involved with this script do not -- take any liability for damage done to your game -- by the use of this script. ----------------------------------------------------------------------- */ 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']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); print "[img=images/pccrime.png] "; include "hackpc.config.php"; global $db_config; $in = abs((int) $_GET['ID']); if(!$in) { print "Error - no valid player ID to hack specified."; $h->endpage(); exit; } $q = mysql_query("SELECT * FROM `users` WHERE userid = {$in}", $c); if(!mysql_num_rows($q)) { print "Error - player ID specified does not exist."; $h->endpage(); exit; } $r = mysql_fetch_array($q); if(in_array($in, $db_config['prohibited'])) { print "Error - this player cannot be hacked."; $h->endpage(); exit; } if($r['user_level'] == 0 && $db_config['nohacknpc']) { print "Error - NPCs cannot be hacked."; $h->endpage(); exit; } if($in == $userid) { print "Error - you cannot hack yourself!"; $h->endpage(); exit; } if($r['fedjail']) { print "Error - people in fedjail cannot be hacked"; $h->endpage(); exit; } if($ir['brave'] < $db_config['bravecost']) { print "Error - you need {$db_config['bravecost']} Brave to hack someone's PC."; $h->endpage(); exit; } $rsf = rand(1,100); $exga = rand($db_config['minexp'],$db_config['maxexp']); if($rsf <= $db_config['chance']) { mysql_query("UPDATE users SET exp=exp+{$exga}, brave=brave-{$db_config['bravecost']} WHERE userid={$userid}", $c); $stole=(int) (rand($r['money']/500,$r['money']/200)); if ($stole<0) {$stole=0;} if ($stole>0) { mysql_query("UPDATE users SET money=money+{$stole} WHERE userid={$userid}", $c); mysql_query("UPDATE users SET money=money-{$stole} WHERE userid={$in}", $c); } event_add($in, "[url='viewuser.php?u=$userid']{$ir['username']}[/url] hacked your computer and stole \$$stole! Click [url='hackpc.php?ID={$userid}']here[/url] to try to take your revenge!", $c); print "You succesfully hacked {$r['username']} and stole \$$stole."; } else { mysql_query("UPDATE users SET brave=brave-{$db_config['bravecost']} WHERE userid={$userid}", $c); event_add($in, "[url='viewuser.php?u=$userid']{$ir['username']}[/url] attempted to hack your computer but was stopped by your firewall.", $c); print "Unfortunately, {$r['username']}'s firewall was too good for you to hack past."; } $h->endpage(); ?> and i would appreciate it if u cud make it so only ppl who have bought a eltronic item can do it, but im more bothered about the id thing Quote
YoungGold Posted August 14, 2007 Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod try this: <?php /* ----------------------------------------------------------------------- -- Hack User's Computer -- (C) 2006 Dabomstew ----------------------------------------------------------------------- -- This script is distributed in the hope that -- it will be useful, but WITHOUT A WARRANTY -- OF ANY KIND. ----------------------------------------------------------------------- -- Dabomstew, Criminalexistence.com, and -- everyone else involved with this script do not -- take any liability for damage done to your game -- by the use of this script. ----------------------------------------------------------------------- */ 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']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); include "hackpc.config.php"; global $db_config; $in = abs((int) $_GET['ID']); if(!$in) { print "Error - no valid player ID to hack specified."; $h->endpage(); exit; } $q = mysql_query("SELECT * FROM `users` WHERE userid = {$in}", $c); if(!mysql_num_rows($q)) { print "Error - player ID specified does not exist."; $h->endpage(); exit; } $r = mysql_fetch_array($q); if(in_array($in, $db_config['prohibited'])) { print "Error - this player cannot be hacked."; $h->endpage(); exit; } if($r['user_level'] == 0 && $db_config['nohacknpc']) { print "Error - NPCs cannot be hacked."; $h->endpage(); exit; } if($in == $userid) { print "Error - you cannot hack yourself!"; $h->endpage(); exit; } if($r['fedjail']) { print "Error - people in fedjail cannot be hacked"; $h->endpage(); exit; } if($ir['brave'] < $db_config['bravecost']) { print "Error - you need {$db_config['bravecost']} Brave to hack someone's PC."; $h->endpage(); exit; } if($r['user_level'] == 2){ print "{$r['username']} tracked you down and beat hell outta you for attempting to hack his pc"; exit; } $rsf = rand(1,100); $exga = rand($db_config['minexp'],$db_config['maxexp']); if($rsf <= $db_config['chance']) { mysql_query("UPDATE users SET exp=exp+{$exga}, brave=brave-{$db_config['bravecost']} WHERE userid={$userid}", $c); $stole=(int) (rand($r['money']/500,$r['money']/200)); if ($stole<0) {$stole=0;} if ($stole>0) { mysql_query("UPDATE users SET money=money+{$stole} WHERE userid={$userid}", $c); mysql_query("UPDATE users SET money=money-{$stole} WHERE userid={$in}", $c); } event_add($in, "[url='viewuser.php?u=$userid']{$ir['username']}[/url] hacked your computer and stole \$$stole! Click [url='hackpc.php?ID={$userid}']here[/url] to try to take your revenge!", $c); print "You succesfully hacked {$r['username']} and stole \$$stole."; } else { mysql_query("UPDATE users SET brave=brave-{$db_config['bravecost']} WHERE userid={$userid}", $c); event_add($in, "[url='viewuser.php?u=$userid']{$ir['username']}[/url] attempted to hack your computer but was stopped by your firewall.", $c); print "Unfortunately, {$r['username']}'s firewall was too good for you to hack past."; } $h->endpage(); ?> it works for me and if it doesnt for you then its probably because your using lite Quote
-CrAzY- Posted August 14, 2007 Author Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod no i mean what url i have got to enter to specify the user i want to hack like: www.MyGameURL.com/attack.php?u=1 i tryed www.MyGameURL.com/hackpc.php?u=1 but it didnt work Thanks!! Quote
YoungGold Posted August 14, 2007 Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod omg you just have it normall like www.yourgamename.com/hackpc.php and then when the user selects its target it will automatically come up with ?u=1 at the end of it. Quote
-CrAzY- Posted August 14, 2007 Author Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod i do and it just says: Error - no valid player ID to hack specified. Quote
YoungGold Posted August 14, 2007 Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod whats the url when it says that Quote
-CrAzY- Posted August 14, 2007 Author Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod http://www.mygame.com/hackpc.php Quote
Decepti0n Posted August 14, 2007 Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod hackpc.php?ID=whatever Quote
-CrAzY- Posted August 14, 2007 Author Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod thanks, i tryed that but i didnt do it in capitals, rofl!!, thanks m8 ;), Quote
-CrAzY- Posted August 14, 2007 Author Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod you got any clue how to make it so you can only hack people with an electrical item and can only hack if you have an electrical item, if you dont its fine, Quote
SaMz Posted August 14, 2007 Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod Ive Added It, But How Do I Specify Which Users I Want To Do It To I Tryed This: www.MyGameURL!.com/hackpc.php?u=1 But It Didnt Work, Anybody Know?? Thanks! This Guy Needs To Stop Coding And Start Learning No Joke Quote
YoungGold Posted August 14, 2007 Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod Ive Added It, But How Do I Specify Which Users I Want To Do It To I Tryed This: www.MyGameURL!.com/hackpc.php?u=1 But It Didnt Work, Anybody Know?? Thanks! This Guy Needs To Stop Coding And Start Learning No Joke i agree Quote
Matty Posted August 14, 2007 Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod Ive Added It, But How Do I Specify Which Users I Want To Do It To I Tryed This: www.MyGameURL!.com/hackpc.php?u=1 But It Didnt Work, Anybody Know?? Thanks! This Guy Needs To Stop Coding And Start Learning No Joke i agree You cant say much really - omg you just have it normall like www.yourgamename.com/hackpc.php and then when the user selects its target it will automatically come up with ?u=1 at the end of it. Which was wrong... If you look at the start of the code : /// Get the ID from the URL make it $in $in = abs((int) $_GET['ID']); (Should really be $_REQUEST['ID']) /// If $in is empty then display this error... If not then carry on. if(!$in) { print "Error - no valid player ID to hack specified."; $h->endpage(); exit; } Quote
-CrAzY- Posted August 14, 2007 Author Posted August 14, 2007 Re: Need A Lil Bit Of Help On hackpc.php Mod Sorted Now - Lock Please - Thanks Matty EDIT - Locked - Matty Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.