
HITMAN 17
Members-
Posts
1,145 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by HITMAN 17
-
Re: Tutorial: v2 - v1 Conversion cheers guy this just helped me convert a v2 header
-
Re: [mccode v1] Mccodes V1 Jail here it is secured <?php require "mysql.php"; require "../../../../global_func.php"; global $c; if ($IP != $_SERVER['SERVER_ADDR']) { die('Error'); } mysql_query("UPDATE users set jail=jail-1 WHERE jail>0",$c); ?>
-
Re: Add Jail Time to Crimes! it isnt for v1
-
Re: Add Jail Time to Crimes! can you post this then please
-
Re: right hand side main menu also this does not show at the top right hand corner is shows near the bottom whats the code to make it up the top
-
Re: right hand side main menu how do i remvove the left hand side panel
-
Re: Secure Your Crons. ahh now my crons are secure
-
Re: [mccode v1] Mccodes V1 Jail how do i secure those crons
-
Re: [mccode v1] Mccodes V1 Jail why would you make this into v2 when v2 have this installed
-
Re: Why? do you mean this and if so what do change it to $q=$db->query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}");
-
Re: Why? can you give me an example plz
-
Re: Money or Hobby? i like both as i like the money but i do it as a hobby as well
-
Re: New MSN Virus yer i actually got that the other day some guy sent me it and logged off
-
Re: [mccode v1] Mccodes V1 Jail ok here is the edituser part open up admin.php find: Hospital reason: <input type='text' name='hospreason' value='{$itemi['hospreason']}' /> replace with: Hospital reason: <input type='text' name='hospreason' value='{$itemi['hospreason']}' /> Jail time: <input type='text' name='jail' value='{$itemi['jail']}' /> Now find: mysql_query("UPDATE users SET username='{$_POST['username']}', level={$_POST['level']}, money={$_POST['money']}, crystals={$_POST['crystals']}, energy=$energy, brave=$nerve, maxbrave=$nerve, maxenergy=$energy, hp=$hp, maxhp=$hp, hospital={$_POST['hospital']}, duties='{$_POST['duties']}', staffnotes='{$_POST['staffnotes']}', mailban={$_POST['mailban']}, mb_reason='{$_POST['mb_reason']}', hospreason='{$_POST['hospreason']}', login_name='{$_POST['login_name']}' WHERE userid={$_POST['userid']}", $c); mysql_query("UPDATE userstats SET strength={$_POST['strength']}, agility={$_POST['agility']}, guard={$_POST['guard']}, labour={$_POST['labour']}, IQ={$_POST['IQ']} WHERE userid={$_POST['userid']}", $c); replace with: mysql_query("UPDATE users SET username='{$_POST['username']}', level={$_POST['level']}, money={$_POST['money']}, crystals={$_POST['crystals']}, energy=$energy, brave=$nerve, maxbrave=$nerve, maxenergy=$energy, hp=$hp, maxhp=$hp, hospital={$_POST['hospital']}, jail={$_POST['jail']}, duties='{$_POST['duties']}', staffnotes='{$_POST['staffnotes']}', mailban={$_POST['mailban']}, mb_reason='{$_POST['mb_reason']}', hospreason='{$_POST['hospreason']}', login_name='{$_POST['login_name']}' WHERE userid={$_POST['userid']}", $c); mysql_query("UPDATE userstats SET strength={$_POST['strength']}, agility={$_POST['agility']}, guard={$_POST['guard']}, labour={$_POST['labour']}, IQ={$_POST['IQ']} WHERE userid={$_POST['userid']}", $c); This has been tested and works but please dont forget this is only jail time i have not done jail reason yet
-
why is view user for v2 always slow the standard version is there anyway you can make it faster
-
Re: [mccode v1] Punch Mod i wouldnt say its pointless it may come ion use to someone
-
How Do I Edit A Users House in the database And can someone add a code for admin.php for this
-
Re: Chavster! thats why im recoding my own one
-
Re: [showcase] Faction Wars i would say its a backup of fusionwars
-
Re: [mccode v1] Punch Mod o right ok cheers ino where you are if i need you for backup +1 mate
-
Re: Mccodes V1 Jail No probs Mate Heres the viewuser.php code if($r['jail']) { print " [b]<font color=red>In jail for {$r['jail']} minutes. {$r['jail_reason']}</font>[/b]"; }
-
Tested and You Dont Need Sql as it should be already in the database <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- Made By $Bull$$ EYE$(Uk Assassins) -- Jail.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(); print "<h3>Jail</h3> <table width='75%' border='2'><tr bgcolor=gray><th>ID</th><th>Name</th <th>Level</th> <th>Time</th><th>Reason</th></tr>"; $q=mysql_query("SELECT u.*,c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.jail > 0 ORDER BY u.jail DESC",$c); while($r=mysql_fetch_array($q)) { print "\n<tr><td>{$r['userid']}</td><td>{$r['gangPREFIX']} [url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td><td> {$r['level']}</td><td>{$r['jail']} minutes</td><td>{$r['jailreason']}</td></tr>"; } print "</table>"; $h->endpage(); ?> This Has Been Tested And Automatically Updates Add this code In Mainmenu.php Somewhere Now Make A File In crons/are/not/4u/jail.php <?php require "mysql.php"; require "../../../../global_func.php"; global $c; mysql_query("UPDATE users set jail=jail-1 WHERE jail>0",$c); ?> Now Add this To Crons curl http://yourgame.com/crons/are/not/4u/jail.php I will be adding more when i made it so when you fail a crime you go to jail
-
Re: [mccode v1] Punch Mod please Stop moaning it a great mod and its free and thnx westy for backing me up btw westy do you have v1 game
-
Re: V1 Punch Mod cheers
-
I was little bored so i did this punch.config.php <?php /* Not to be sold! */ $db_config = array ( 'prohibited' => array(), //Add player IDs to this array who you want to be protected from Punched. 'nopunchnpc' => TRUE, //Set this to true to block NPC's from being punched. 'bravecost' => 10, //Set this to the amount of brave you want for punching a user. 'minexp' => 1, //Set this to the minimum EXP (figure, not %age) that you want a user to gain from a successful Punch. 'maxexp' => 2000, //Set this to the maximum EXP (figure, not %age) that you want a user to gain from a punch 'chance' => 30, //Set this to the % chance of a successful punch. Must be a positive integer >= 1. ); ?> punch.php <?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']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); include "punch.config.php"; global $db_config; $in = abs((int) $_GET['ID']); if(!$in) { print "Error - no valid player ID to Punched."; $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 Punched."; $h->endpage(); exit; } if($r['user_level'] == 0 && $db_config['nopunchnpc']) { print "Error - NPCs Cannot Be Punched."; $h->endpage(); exit; } if($in == $userid) { print "Error - You Cannot Punch Yourself!"; $h->endpage(); exit; } if($r['fedjail']) { print "Error - People In Fedjail cannot be Punched"; $h->endpage(); exit; } if($ir['brave'] < $db_config['bravecost']) { print "Error - you need {$db_config['bravecost']} Brave to Punch Someone."; $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] Punched You And Grabbed \$$stole! Click [url='punch.php?ID={$userid}']here[/url] to try to take your revenge!", $c); print "You Succesfully Punched {$r['username']} and Grabbed \$$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] Tryed To Punch The Shit Into You", $c); print "Unfortunately, {$r['username']}'s Resisted Against The Punch."; } $h->endpage(); ?> *Not tested*