
shaved92bravada
Members-
Posts
234 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by shaved92bravada
-
[v1]Request For Failing Crime Results to jail
shaved92bravada replied to HITMAN 17's topic in General Discussion
Re: [v1]Request For Failing Crime Results to jail If you use this one that I edited for you yesterday then it will send you to jail when you fail.......... sometimes........ its random, sometimes you just fail, sometimes you get thrown in jail. But if I remember correctly on my V1 it didn't come with jail.php so I had to make my own, and it also doesn't come with jail_reason in the user database which you will have to add that in there yourself. Other than that I tested it on my test site and it worked like a charm everytime. the sql is ALTER TABLE `crimes` ADD `crimeJTEXT` TEXT NOT NULL AFTER `crimeFTEXT` , ADD `crimeJAILTIME` INT NOT NULL DEFAULT '0' AFTER `crimeJTEXT` , ADD `crimeJREASON` VARCHAR( 255 ) NOT NULL AFTER `crimeJAILTIME` ; ALTER TABLE `users` ADD `jail_reason` VARCHAR( 255 ) NOT NULL AFTER `hospreason` ; <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- docrime.php edited by Shaved92Bravada -----------------------------------------------------*/ 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(); $_GET['c']=abs((int) $_GET['c']); if(!$_GET['c']) { print "Invalid crime"; } else { $q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=mysql_fetch_array($q); if($ir['brave'] < $r['crimeBRAVE']) { print "You do not have enough Brave to perform this crime."; } else { $ec="\$sucrate=".str_replace(array("LEVEL","EXP","WILL","IQ"), array($ir['level'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";"; eval($ec); print $r['crimeITEXT']; $ir['brave']-=$r['crimeBRAVE']; mysql_query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c); if(rand(1,100) <= $sucrate) { print str_replace("{money}",$r['crimeSUCCESSMUNY'],$r['crimeSTEXT']); $ir['money']+=$r['crimeSUCCESSMUNY']; $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8); mysql_query("UPDATE users SET money={$ir['money']},exp={$ir['exp']} WHERE userid=$userid",$c); } else { if(rand(1, 2) == 1) { print $r['crimeFTEXT']; } else { print $r['crimeJTEXT']; mysql_query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'",$c); } } print " [url='docrime.php?c={$_GET[']Try Again[/url] [url='criminal.php']Crimes[/url]"; } } $h->endpage(); ?> -
Re: [mccode] Advanced Properties if you use this <?php /* MCCodes Lite criminal.php Rev 1.0.0 Copyright (C) 2006 Dabomstew This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 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 "<font face='Arial' size='4'>Properties</font><hr width='90%'>"; switch ($_GET['step']) { case 'move': move_in(); break; case 'info': house_info(); break; case 'estate': estate_agent(); break; case 'sell': sell_house(); break; case 'rent': rent_house(); break; case 'give': give_house(); break; case 'market': rental_market(); break; case 'remove': market_remove(); break; default: user_houses(); break; } function user_houses() { global $ir,$c,$userid,$h; $sql = sprintf("SELECT * FROM `userhouses` uh LEFT JOIN `houses` h ON (h.hID = uh.uhHOUSE) LEFT JOIN `users` u ON (u.userid = uh.uhUSER) WHERE uh.uhRENT = 0 AND u.house != uh.uhID AND (uh.uhUSER = %u)", $ir['userid']); $sql = mysql_query($sql); print "<table width='90%'><tr><td width='50%' align='center'> > [url='properties.php?step=estate']Estate Agent[/url]</td> <td width='50%' align='center'> > [url='properties.php?step=market']Rental Market[/url]</td></tr> </table><hr width='90%'>"; print "<table width='75%' cellspacing='1'>"; while($r = mysql_fetch_array($sql)) { print "<tr><td>[img={$r[]</td> <td> [b]Property: [/b]{$r['hNAME']} [b]Owner: [/b][url='viewuser.php?u={$r[']{$r['username']}[/url] [b]Upkeep: [/b]".money_formatter($r['hUPKEEP'])." per day [b]Will: [/b]".number_format($r['uhWILL'])." [[url='properties.php?step=move&XID={$r[']Move in[/url]] [[url='properties.php?step=info&XID={$r[']Info[/url]] [[url='properties.php?step=sell&XID={$r[']Sell[/url]] [[url='properties.php?step=rent&XID={$r[']Lease[/url]] [[url='properties.php?step=give&XID={$r[']Give[/url]] [[url='properties.php?step=upgrade&XID={$r[']Upgrade[/url]] </td></tr>"; } if ($ir['house'] || $ir['maxwill'] == 100) { print "<tr><td>[img=images/houses/house_1.png]</td> <td> [b]Property: [/b]Shack [b]Owner: [/b][url='viewuser.php?u={$ir[']{$ir['username']}[/url] [b]Will: [/b]100 "; if ($ir['maxwill'] != 100) { print "[[url='properties.php?step=move&XID=0']Move in[/url]] "; } print "</td></tr>"; } print "</table><hr width='90%'>"; $rent = sprintf("SELECT * FROM `userhouses` uh LEFT JOIN `houses` h ON (h.hID = uh.uhHOUSE) LEFT JOIN `users` u ON (u.userid = uh.uhUSER) WHERE {$ir['house']} != uh.uhID AND (uh.uhRENTER = %u)", $ir['userid']); $rent = mysql_query($rent); print "[b]Rented Houses:[/b] <table width='75%' cellspacing='1'>"; while($rn = mysql_fetch_array($rent)) { print "<tr><td>[img={$rn[]</td> <td> [b]Property: [/b]{$rn['hNAME']} [b]Owner: [/b][url='viewuser.php?u={$rn[']{$rn['username']}[/url] [b]Upkeep: [/b]".money_formatter($rn['hUPKEEP'])." per day [b]Will: [/b]".number_format($rn['uhWILL'])." [[url='properties.php?step=move&XID={$rn[']Move in[/url]] [[url='properties.php?step=info&XID={$rn[']Info[/url]] </td></tr>"; } print "</table><hr width='90%'>"; } function move_in() { global $ir,$c,$userid,$h; $_GET['XID'] = abs((int) $_GET['XID']); $sql = sprintf("SELECT * FROM `userhouses` uh LEFT JOIN `houses` h ON (h.hID = uh.uhHOUSE) LEFT JOIN `users` u ON (u.userid = uh.uhUSER) WHERE (uh.uhUSER = %d OR uh.uhRENTER = %d) AND (uh.uhID = %u)", $ir['userid'], $ir['userid'], $_GET['XID']); $sql = mysql_query($sql); $r = mysql_fetch_array($sql); if ($_GET['XID'] == '0') { $move = sprintf("UPDATE `users` SET house = %d, maxwill = %d WHERE (`userid` = %u)", 0, 100, $ir['userid']); mysql_query($move); print " You moved into the [b]Shack[/b]. You now have a maximum will of [b]100[/b]. <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else if(!mysql_num_rows($sql)) { print " You cannot move into a non-existant house! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else { $move = sprintf("UPDATE `users` SET house = %d, maxwill = %d WHERE (`userid` = %u)", $_GET['XID'], $r['uhWILL'], $ir['userid']); mysql_query($move); print " You moved into the [b]{$r['hNAME']}[/b]. You now have a maximum will of [b]".number_format($r['uhWILL'])."[/b]. <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } } function house_info() { global $ir,$c,$userid,$h; $_GET['XID'] = abs((int) $_GET['XID']); $sql = sprintf("SELECT * FROM `userhouses` uh LEFT JOIN `houses` h ON (h.hID = uh.uhHOUSE) LEFT JOIN `users` u ON (u.userid = uh.uhUSER) WHERE uh.uhUSER = %d AND (uh.uhID = %u)", $ir['userid'], $_GET['XID']); $sql = mysql_query($sql); $r = mysql_fetch_array($sql); if(!mysql_num_rows($sql)) { print " This house does not belong to you! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else { print " [b]Property: [/b]{$r['hNAME']} [b]Owner: [/b][url='viewuser.php?u={$r[']{$r['username']}[/url] [b]Market Price: [/b]".money_formatter($r['hPRICE'])." [b]Upkeep: [/b]".money_formatter($r['hUPKEEP'])." per day [b]Will: [/b]".number_format($r['uhWILL'])." <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } } function sell_house() { global $ir,$c,$userid,$h; $_GET['XID'] = abs((int) $_GET['XID']); $sql = sprintf("SELECT * FROM `userhouses` uh LEFT JOIN `houses` h ON (h.hID = uh.uhHOUSE) LEFT JOIN `users` u ON (u.userid = uh.uhUSER) WHERE uh.uhUSER = %d AND (uh.uhID = %u)", $ir['userid'], $_GET['XID']); $sql = mysql_query($sql); $r = mysql_fetch_array($sql); if(!mysql_num_rows($sql)) { print " This house does not belong to you! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else if ($r['uhRENTER'] > 0) { print " This house is being rented at this time! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else { $sell = sprintf("UPDATE `users` SET money = money + %d WHERE (`userid` = %u)", $r['hPRICE'], $ir['userid']); $del = sprintf("DELETE FROM `userhouses` WHERE (`uhID` = %u)", $_GET['XID']); mysql_query($sell); mysql_query($del); print " You sold the [b]{$r['hNAME']}[/b] for [b]".money_formatter($r['hPRICE'])."[/b]! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } } function estate_agent() { global $ir,$c,$userid,$h; $_GET['XID'] = abs((int) $_GET['XID']); if ($_GET['XID']) { $sql = sprintf("SELECT * FROM `houses` WHERE (hID = %u)", $_GET['XID']); $sql = mysql_query($sql); $r = mysql_fetch_array($sql); if(!mysql_num_rows($sql)) { print " This house does not exist! <hr width='90%'>> [url='properties.php?step=estate']Estate Agent[/url]<hr width='90%'>"; } else if($ir['money'] < $r['hPRICE']) { print " You cannot afford to buy this house! <hr width='90%'>> [url='properties.php?step=estate']Estate Agent[/url]<hr width='90%'>"; } else if($_GET['XID'] == '1') { print " You cannot buy another Shack! <hr width='90%'>> [url='properties.php?step=estate']Estate Agent[/url]<hr width='90%'>"; } else { $buy = sprintf("UPDATE `users` SET money = money - %d WHERE (`userid` = %u)", $r['hPRICE'], $ir['userid']); $ins = sprintf("INSERT INTO `userhouses` (`uhID`, `uhUSER`, `uhHOUSE`, `uhWILL`) VALUES ('NULL','%d', '%d', '%d')", $ir['userid'], $r['hID'], $r['hWILL']); mysql_query($buy); mysql_query($ins); print " You bought the [b]{$r['hNAME']}[/b] for [b]".money_formatter($r['hPRICE'])."[/b]! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } } else { $sql = sprintf("SELECT * FROM houses WHERE hID > 1 ORDER BY hWILL ASC"); $sql = mysql_query($sql); print "<table width='90%' cellspacing='1'> <tr bgcolor='#AAAAAA'><th>Name</th><th>Will</th><th>Price</th></tr>"; while($r = mysql_fetch_array($sql)) { print "<tr><td>[url='properties.php?step=estate&XID={$r[']{$r['hNAME']}[/url]</td><td>".number_format($r['hWILL'])."</td><td>".money_formatter($r['hPRICE'])."</td></tr>"; } print "</table><hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } } function rental_market() { global $ir,$c,$userid,$h; $_GET['XID'] = abs((int) $_GET['XID']); if ($_GET['XID']) { $sql = sprintf("SELECT * FROM `userhouses` uh LEFT JOIN `houses` h ON (h.hID = uh.uhHOUSE) LEFT JOIN `users` u ON (u.userid = uh.uhUSER) WHERE (uh.uhID = %u)", $_GET['XID']); $sql = mysql_query($sql); $r = mysql_fetch_array($sql); if(!mysql_num_rows($sql)) { print " This house does not exist! <hr width='90%'>> [url='properties.php?step=market']Market[/url]<hr width='90%'>"; } else if($r['uhUSER'] == $ir['userid']) { print " This house already belongs to you! <hr width='90%'>> [url='properties.php?step=market']Market[/url]<hr width='90%'>"; } else if($ir['money'] < $r['uhRENT']) { print " You cannot afford to rent this house! <hr width='90%'>> [url='properties.php?step=market']Market[/url]<hr width='90%'>"; } else { $sel = sprintf("UPDATE `users` SET money = money - %d WHERE (`userid` = %u)", $r['uhRENT'], $ir['userid']); $rent = sprintf("UPDATE `userhouses` SET uhRENTER = %d WHERE (`uhID` = %u)", $ir['userid'], $_GET['XID']); mysql_query($sel); mysql_query($rent); print " You are now renting the [b]{$r['hNAME']}[/b] for [b]".money_formatter($r['uhRENT'])."[/b] per day! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } } else { $sql = sprintf("SELECT * FROM `userhouses` uh LEFT JOIN `houses` h ON (h.hID = uh.uhHOUSE) LEFT JOIN `users` u ON (u.userid = uh.uhUSER) WHERE uh.uhRENTER = 0 AND uh.uhRENT > 0"); $sql = mysql_query($sql); print "<table width='90%' cellspacing='1'> <tr bgcolor='#AAAAAA'><th>Property</th><th>Owner</th><th>Will</th><th>Cost</th><th>Daily Cost</th><th>Rental Period</th><th>Rent</th></tr>"; while($r = mysql_fetch_array($sql)) { print "<tr><td>{$r['hNAME']}</td><td>[url='viewuser.php?u={$r[']{$r['username']}[/url]</td><td>".number_format($r['uhWILL'])."</td><td>".money_formatter($r['uhRENT']*$r['uhRDAYS'])."</td><td>".money_formatter($r['uhRENT'])."</td><td>".number_format($r['uhRDAYS'])." days</td><td>[url='properties.php?step=market&XID={$r[']Rent[/url]"; if ($r['uhUSER'] == $ir['userid']) { print " | [url='properties.php?step=remove&XID={$r[']Remove[/url]"; } print "</td></tr>"; } print "</table><hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } } function rent_house() { global $ir,$c,$userid,$h; $_GET['XID'] = abs((int) $_GET['XID']); $sql = sprintf("SELECT * FROM `userhouses` uh LEFT JOIN `houses` h ON (h.hID = uh.uhHOUSE) LEFT JOIN `users` u ON (u.userid = uh.uhUSER) WHERE uh.uhUSER = %d AND (uh.uhID = %u)", $ir['userid'], $_GET['XID']); $sql = mysql_query($sql); $r = mysql_fetch_array($sql); if (!$_GET['XID']) { print " You must select a house to add to the rental market! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else if ($r['uhUSER'] != $ir['userid']) { print " This house does not belong to you! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else if ($r['uhRENT'] > 0) { print " This house is already on the market! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else if ($_POST['cost'] AND $_POST['amount']) { $_POST['house'] = abs((int) $_POST['house']); $_POST['cost'] = abs((int) $_POST['cost']); $_POST['amount'] = abs((int) $_POST['amount']); $sub = sprintf("UPDATE `userhouses` SET uhRDAYS = %d, uhRENT = %d WHERE (uhID = %u)", $_POST['amount'], $_POST['cost'], $_POST['house']); mysql_query($sub); print " The [b]{$r['hNAME']}[/b] was added to the rental market! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else { print " <form action='properties.php?step=rent&XID={$_GET['XID']}' method='post'> <input type='hidden' name='house' value='{$_GET['XID']}' /> <table width='50% cellspacing='1'> <tr><td width='50%'>Daily Cost:</td><td width='50%'><input type='text' name='cost' maxlength='10' /></td></tr> <tr><td width='50%'>Rental Period:</td><td width='50%'><input type='text' name='amount' maxlength='3' /></td></tr> <tr><td colspan='2'><input type='submit' value='Submit' /></td></tr></table></form> <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } } function market_remove() { global $ir,$c,$userid,$h; $_GET['XID'] = abs((int) $_GET['XID']); if ($_GET['XID']) { $sql = sprintf("SELECT * FROM `userhouses` uh LEFT JOIN `houses` h ON (h.hID = uh.uhHOUSE) LEFT JOIN `users` u ON (u.userid = uh.uhUSER) WHERE (uh.uhID = %u)", $_GET['XID']); $sql = mysql_query($sql); $r = mysql_fetch_array($sql); if(!mysql_num_rows($sql)) { print " This house does not exist! <hr width='90%'>> [url='properties.php?step=market']Market[/url]<hr width='90%'>"; } else if($r['uhUSER'] != $ir['userid']) { print " This house does not belong to you! <hr width='90%'>> [url='properties.php?step=market']Market[/url]<hr width='90%'>"; } else if(!$r['uhRENT']) { print " This house is not on the rental market! <hr width='90%'>> [url='properties.php?step=market']Market[/url]<hr width='90%'>"; } else { $rem = sprintf("UPDATE `userhouses` SET uhRENT = %d, uhRDAYS = %d WHERE (`uhID` = %u)", 0, 0, $_GET['XID']); mysql_query($rem); print " You removed the [b]{$r['hNAME']}[/b] from the rental market! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } } else { print " You did not select a house to remove. <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } } function give_house() { global $ir,$c,$userid,$h; $_GET['XID'] = abs((int) $_GET['XID']); $sql = sprintf("SELECT * FROM `userhouses` uh LEFT JOIN `houses` h ON (h.hID = uh.uhHOUSE) LEFT JOIN `users` u ON (u.userid = uh.uhUSER) WHERE uh.uhUSER = %d AND (uh.uhID = %u)", $ir['userid'], $_GET['XID']); $sql = mysql_query($sql); $r = mysql_fetch_array($sql); if (!$_GET['XID']) { print " You must select a house to give away! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else if ($r['uhUSER'] != $ir['userid']) { print " This house does not belong to you! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else if ($r['uhRENTER'] > 0) { print " This house is being rented at this time! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else if ($_POST['user'] AND $_GET['XID']) { $_POST['house'] = abs((int) $_POST['house']); $_POST['user'] = abs((int) $_POST['user']); $sub = sprintf("UPDATE `userhouses` SET uhUSER = %d WHERE (uhID = %u)", $_POST['user'], $_POST['house']); mysql_query($sub); print " You have given the [b]{$r['hNAME']}[/b] to {$r['username']}! <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } else { print " <form action='properties.php?step=give&XID={$_GET['XID']}' method='post'> <input type='hidden' name='house' value='{$_GET['XID']}' /> <table width='50% cellspacing='1'> <tr><td width='50%'>User's ID:</td><td width='50%'><input type='text' name='user' maxlength='5' /></td></tr> <tr><td colspan='2'><input type='submit' value='Submit' /></td></tr></table></form> <hr width='90%'>> [url='properties.php']Properties[/url]<hr width='90%'>"; } } $h->endpage(); ?> then you shouldn't get that error. And another thing he isn't the one working on this to improve it more, I am. I would just be happy that he is posting free mods rather than making people pay for them ya know. I for one am very thankful that he is doing this for the CE community as I am not as good at this as he is. The way I look at it is if people request something on a free mod then they should be willing to wait as long as it takes to get it done. But thats just my two cents worth.
-
Re: [mccode] Advanced Properties ok I have fixed it lol. Yes just now after my last post the big ole bright light bulb came on in my head and I tried something and it worked. all ya gotta do is change this mysql_query("UPDATE users SET maxwill = 100, house = 0, new_events=new_events+1 WHERE house = {$r['uhID']}",$c); to this mysql_query("UPDATE users SET maxwill = 100, house = 0, new_events=new_events+1 WHERE userid = {$r['uhRENTER']}",$c); tested it by running the cron manually and it worked great, updated the new events, the maxwill, etc. I also have it to where it updates their will=0 so that way they don't have more will than their max and makes the will bar huge. Now off to edit the rest of it to where it shows the house in rented even after they move in and also where it shows the person who owns the house what ones they have rented. Any help on that would be greatly appreciated. And thanks again for a great mod Richard. edit* Also have now made it where it sends the person who owns the house an event that the house is now vacant and may be placed on the rental market again. I will continue to add more things to it and post them when I am positive they all work, as long as its cool with Richard.
-
Re: [mccode] Advanced Properties yeah I am using the second cron posted, everything works fine, it gives them the event that their rental time is over, etc. but it doesn't reset their will etc this is the query that should be doing it. mysql_query("UPDATE users SET maxwill = 100, house = 0, new_events=new_events+1 WHERE house = {$r['uhID']}",$c); I added in the new events since I am using V2, thats the main reason I knew it wasn't working lol because the event was there it just didn't update the new_events. No rush on this as I know you didn't make it for V2, but I will continue to check it out and see if i can figure out what the problem is. Thanks for all your help so far and especially thanks for the great mod.
-
Re: [mccode] Advanced Properties ok everything seems to be working. Only thing I am having a problem with now is the cron isn't updating the users maxwill etc once the rental period is over. I noticed that the rented houses only shows on the person that has rented it as long as they don't move in, once they move in it disappears. Thanks for the input on this even though its made for lite lol. Most people would just say do it yourself. which is what I am trying to do lol. wondering how hard it would be to show which houses you have rented to who. Also was thinkin of a way to add in there where it won't take the renter into negative money but like say after 3 days they don't pay you can evict them. Something like it sends you an event that they haven't paid in 3 days then it gives you the option to evict. Just an idea to make it more realistic.
-
Re: [mccode] Advanced Properties I am actually working with this hoping to make it work correctly in V2. lol It shows your owned properties, and you can put em on the market and the other person can move in, etc etc. but it doesn't show your rented properties after they rent it. lol damn nice mod though richard and if I get this to working correctly I will let ya know.
-
Re: [mccode] Screenshots not a problem , very good job with what time you had to work with. If ya need some help lemme know and I will try and help in any way I can.
-
Re: [mccode] Screenshots Yeah I use lightbox as well. It makes it look all kinds of nice and purty
-
Re: [V2 maybe V1] Screenshots I can say that if you save it as a bmp file that it will be a whole lot larger file than it would as a jpg or a png. It will decrease your loading time if you save it as a jpg if you are using paint or png if you are using photoshop. Just thought I would throw that in there.
-
[mccode] Fixed Advertisements for mccode v1.1
shaved92bravada replied to a topic in Free Modifications
Re: [mccode] Fixed Advertisements for mccode v1.1 lol it was more of an ID10T error on my part. I got it fixed and going but thanks for offering to help oxi -
[mccode] Fixed Advertisements for mccode v1.1
shaved92bravada replied to a topic in Free Modifications
Re: [mccode] Fixed Advertisements for mccode v1.1 lol I know this is an old post but has anyone got this to work on V2?? I have been trying but keep hitting some damn snags and its starting to piss me off lol. So if someone could be so kind to help me out it would be greatly appreciated. Thanks -
Re: [mccodes V2] Bounty Hunter Game Damn War_Hero haven't checked this one out yet but sounds like another kick ass mod.
-
[mccode] Buy A House With Level Requirements !
shaved92bravada replied to ColdK's topic in General Discussion
Re: [mccode] Buy A House With Level Requirements ! I will go ahead and post it anyway in here so its all together. This is the staff_houses edit that was needed replace this function addhouse() { global $db, $ir, $c, $h, $userid; $price=abs((int) $_POST['price']); $will=abs((int) $_POST['will']); $name=$_POST['name']; if($price and $will and $name) { $q=$db->query("SELECT * FROM houses WHERE hWILL={$will}"); if($db->num_rows($q)) { print "Sorry, you cannot have two houses with the same maximum will."; $h->endpage(); exit; } $db->query("INSERT INTO houses VALUES(NULL, '$name', '$price', '$will')"); print "House {$name} added to the game."; stafflog_add("Created House $name"); } else { print "<h3>Add House</h3><hr /> <form action='staff_houses.php?action=addhouse' method='post'> Name: <input type='text' name='name' /> Price: <input type='text' name='price' /> Max Will: <input type='text' name='will' /> <input type='submit' value='Add House' /></form>"; } } function edithouse() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $price=abs((int) $_POST['price']); $will=abs((int) $_POST['will']); $q=$db->query("SELECT * FROM houses WHERE hWILL={$will} AND hID!={$_POST['id']}"); if($db->num_rows($q)) { print "Sorry, you cannot have two houses with the same maximum will."; $h->endpage(); exit; } $name=$_POST['name']; $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['id']}"); $old=$db->fetch_row($q); if($old['hWILL'] == 100 && $old['hWILL'] != $will) { die("Sorry, this house's will bar cannot be edited."); } $db->query("UPDATE houses SET hWILL=$will, hPRICE=$price, hNAME='$name' WHERE hID={$_POST['id']}"); $db->query("UPDATE users SET maxwill=$will WHERE maxwill={$old['hWILL']}"); $db->query("UPDATE users SET will=maxwill WHERE will > maxwill"); print "House $name was edited successfully."; stafflog_add("Edited house $name"); break; case "1": $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['house']}"); $old=$db->fetch_row($q); print "<h3>Editing a House</h3><hr /> <form action='staff_houses.php?action=edithouse' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='id' value='{$_POST['house']}' /> Name: <input type='text' name='name' value='{$old['hNAME']}' /> Price: <input type='text' name='price' value='{$old['hPRICE']}' /> Max Will: <input type='text' name='will' value='{$old['hWILL']}' /> <input type='submit' value='Edit House' /></form>"; break; default: print "<h3>Editing a House</h3><hr /> <form action='staff_houses.php?action=edithouse' method='post'> <input type='hidden' name='step' value='1' /> House: ".house_dropdown($c, "house")." <input type='submit' value='Edit House' /></form>"; break; } } with this function addhouse() { global $db, $ir, $c, $h, $userid; $price=abs((int) $_POST['price']); $will=abs((int) $_POST['will']); $level=abs((int) $_POST['level']); $name=$_POST['name']; if($price and $will and $name) { $q=$db->query("SELECT * FROM houses WHERE hWILL={$will}"); if($db->num_rows($q)) { print "Sorry, you cannot have two houses with the same maximum will."; $h->endpage(); exit; } $db->query("INSERT INTO houses VALUES(NULL, '$name', '$price', '$will', '$level' )"); print "House {$name} added to the game."; stafflog_add("Created House $name"); } else { print "<h3>Add House</h3><hr /> <form action='staff_houses.php?action=addhouse' method='post'> Name: <input type='text' name='name' /> Price: <input type='text' name='price' /> Max Will: <input type='text' name='will' /> Required Level: <input type='text' name='level' /> <input type='submit' value='Add House' /></form>"; } } function edithouse() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $price=abs((int) $_POST['price']); $will=abs((int) $_POST['will']); $level=abs((int) $_POST['level']); $q=$db->query("SELECT * FROM houses WHERE hWILL={$will} AND hID!={$_POST['id']}"); if($db->num_rows($q)) { print "Sorry, you cannot have two houses with the same maximum will."; $h->endpage(); exit; } $name=$_POST['name']; $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['id']}"); $old=$db->fetch_row($q); if($old['hWILL'] == 100 && $old['hWILL'] != $will) { die("Sorry, this house's will bar cannot be edited."); } $db->query("UPDATE houses SET hLEVEL=$level, hWILL=$will, hPRICE=$price, hNAME='$name' WHERE hID={$_POST['id']}"); $db->query("UPDATE users SET maxwill=$will WHERE maxwill={$old['hWILL']}"); $db->query("UPDATE users SET will=maxwill WHERE will > maxwill"); print "House $name was edited successfully."; stafflog_add("Edited house $name"); break; case "1": $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['house']}"); $old=$db->fetch_row($q); print "<h3>Editing a House</h3><hr /> <form action='staff_houses.php?action=edithouse' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='id' value='{$_POST['house']}' /> Name: <input type='text' name='name' value='{$old['hNAME']}' /> Price: <input type='text' name='price' value='{$old['hPRICE']}' /> Max Will: <input type='text' name='will' value='{$old['hWILL']}' /> Required Level: <input type='text' name='level' value='{$old['hLEVEL']}' /> <input type='submit' value='Edit House' /></form>"; break; default: print "<h3>Editing a House</h3><hr /> <form action='staff_houses.php?action=edithouse' method='post'> <input type='hidden' name='step' value='1' /> House: ".house_dropdown($c, "house")." <input type='submit' value='Edit House' /></form>"; break; } } -
[mccode v2] house level for staff_houses
shaved92bravada replied to ColdK's topic in Free Modifications
Re: [mccode v2] house level for staff_houses that looks like it should work. I just got done doing the same exact thing lol. I was gonna post it for you in your other post. But it looks like it will work. -
Re: [mccode v2] Games Centre Here are the two screenshots I took. If you want to see more then just try out the code. Its great. http://i3.photobucket.com/albums/y63/re ... enter1.jpg http://i3.photobucket.com/albums/y63/re ... center.jpg
-
Re: [mccode v2] Games Centre and yet another awesome mod. Excellent thinkin War_Hero. Already added it and checked it out, works great. I got some screenshots if anyone is interested. lemme know and I will post em.
-
Re: [V2]Ranks Mod!!!![V2] I use this to make it show in the users profile. Works great just got done testing it. if($r['level']<99) { $rank="Private [img=rank1.png]"; } else if($r['level']<125 AND $r['level']>=99) { $rank="Corporal [img=rank2.png]"; } else if($r['level']<150 AND $r['level']>=125) { $rank="Sergeant [img=rank3.png]"; } else if($r['level']<175 AND $r['level']>=150) { $rank="Sergeant Major [img=rank4.png]"; } else if($r['level']<200 AND $r['level']>=175) { $rank="Second Lieutenant [img=rank5.png]"; } else if($r['level']<225 AND $r['level']>=200) { $rank="First Lieutenant [img=rank6.png]"; } else if($r['level']<250 AND $r['level']>=225) { $rank="Captain [img=rank7.png]"; } else if($r['level']<275 AND $r['level']>=250) { $rank="Major [img=rank8.png]"; } else if($r['level']<300 AND $r['level']>=275) { $rank="Lieutenant Colonel [img=rank9.png]"; } else if($r['level']<325 AND $r['level']>=300) { $rank="Colonel [img=rank10.png]"; } else if($r['level']<350 AND $r['level']>=325) { $rank="Brigadier General [img=rank11.png]"; } else if($r['level']<375 AND $r['level']>=350) { $rank="Major General [img=rank12.png]"; } else if($r['level']<400 AND $r['level']>=375) { $rank="Lieutenant General [img=rank13.png]"; } else if($r['level']<500 AND $r['level']>=400) { $rank="General [img=rank14.png]"; } else if($r['level']<750 AND $r['level']>=500) { $rank="General of the Army [img=rank15.png]"; } else if($r['level']<1000 AND $r['level']>=750) { $rank="General of the Armies [img=rank16.png]"; } else if($r['level']>999) { $rank="General Of Wars [img=rank17.png]"; } put that below print "<h3>Profile for {$r['username']}</h3>"; then put [b]<u>Rank:[/b]</u> $rank above this Level: {$r['level']} Health: {$r['hp']}/{$r['maxhp']} it works great for me, don't flame me for posting in an old post of you like it use it if not then don't.
-
Re: Login [Free] Wouldn't it have been easier just to say nice login page thanks for posting it for FREE rather than saying OMG YOU DIDN'T MAKE THOSE IMAGES!!!. I mean come on it was posted free even if he didn't make the images he did put everything together very nicely and isn't making a thing off of it. Oh and very nice login zero I just might use that.
-
[mccode] NEW USERS IMAGE GALLERY FREE!!!!!
shaved92bravada replied to canibalstew's topic in Free Modifications
Re: NEW USERS IMAGE GALLERY FREE!!!!! lol yeah I did notice that. When I changed that is when it came up with the error. I think it is something with my game, not sure though like I said it does the exact same thing with the ajax usersonline script. Even after I change everything they tell me to it does it, and I am afraid to ask for help because everyone always flames people that ask for help. So I usually try everything I can think of before I resort to that. Not sure what exactly is causing it to do it though. Thanks for the quick reply though I will see if I can figure it out one way or another. P.s. here are some screenies of what the exact errors are. Yes I have the did the sql, and uploaded pictures, changed the url, etc. Damn I wish I could figure out what is causing this on the other mods as well. -
[mccode] NEW USERS IMAGE GALLERY FREE!!!!!
shaved92bravada replied to canibalstew's topic in Free Modifications
Re: NEW USERS IMAGE GALLERY FREE!!!!! ok i must be retarded or something but I cannot figure out why this is doing what it is. I am running V2 didn't change anything except what you said, including upload dir, etc. and now I get this as well as the same error on the upload.php I am sure it is something with my site, not sure exactly what but I sure wish I could figure it out because it does the same thing to me on the ajax usersonline mod. I checked my link resources and everything is there. Any help would be greatly appreciated on this. Thanks -
Re: [Free] TownView Parse error: syntax error, unexpected ';' in /home/brave10/public_html/bnv2/townview.php on line 10 $p = mysql_num_row($query); $pages = abs(@intval(( ($p / 10) + 1 )); if ($p % 10 == 0) { $pages--; } lines 9-11 not sure what to do with it just wanted to let you know.
-
[mccode v2] New improved mailbox.
shaved92bravada replied to Haunted Dawg's topic in Free Modifications
Re: New improved mailbox. awesome free mod, looks great, you wanna throw in the images of the smileys in compose?? lol I can do it just being lazy. Also gonna add some new smileys in eventually -
Re: [Free Mod]Rent A Spy[v2] actually, I have hirespy.php so I compared it with this one and though they are similar they aren't the same. It looks as though the idea came from hirespy but it is not the same thing, alot of the coding is different and actually less efficient that in hirespy. So I would have to say this is legit, but what do I know. I will prolly get flamed too.
-
Re: Lottery [v1 and v2] /****************************** >CREATED BY oxidation >NOT FOR RE SALE FREE MOD ONLY >COPYRIGHT 2008 ******************************/ /*----------------------------------------------------- >CREATEED BY JIMMYTUBBS >FREE MOD NOT FOR RE SALE >V1 AND V2 >COPYRIGHT 2008 -----------------------------------------------------*/ yep looks pretty similar to me. I think I have the other lottery some where I will have to compare them.
-
Re: Emerngency Surgery for V2 thought I would repost that so it was in the code format