TMan
Members-
Posts
59 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by TMan
-
Re: [V2] User List Question thanks guys this worked for me :-) I believe the $ord and the $by are set by the user clicking on Level | Ascending...
-
This is the query for the user list page. $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON u.gang=g.gangID ORDER BY $by $ord LIMIT $st,50"); What im wondering is how to make it so it only shows the users in the same location as the user viewing the list. I have no idea where to go I've tried this a few different ways. $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON u.gang=g.gangID ORDER BY $by $ord WHERE u.location={$ir['location']} LIMIT $st,50"); which prints out the error QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE u.location=2 LIMIT 0,50' at line 1 Query was SELECT u.*,g.* FROM users u LEFT JOIN gangs g ON u.gang=g.gangID ORDER BY userid ASC WHERE u.location=2 LIMIT 0,50 I'm not very good with sql yet. Any ideas?
-
Re: [v2] Commiting Crimes (Exp Help) open you phpmyadmin. find you accounts name. find on the users table where it says EXP. do a crime or 2. Check your stats on the users table. Did the exp go up at all? if it only goes up a tiny amount it may be because you have a high level. Or you have set the CrimeXP too low.(low XP crimes for Low levels, so higher levels have to either do alot more crimes or ones worth more XP
-
Re: [v2] Commiting Crimes (Exp Help) I thought crime Exp gain was set in the staff panel? docrime.php UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']}, cexp={$ir['cexp']},crimexp=crimexp+{$r['crimeXP']} WHERE userid=$userid",$c) I believe this says exp is updated to the crime EXP you set in the staff panel.
-
newspaper.php <?php include "globals.php"; $q=$db->query("SELECT * FROM papercontent LIMIT 1"); $content=$db->fetch_single($q); $q=$db->query("SELECT content1 FROM papercontent LIMIT 1"); $content1=$db->fetch_single($q); $q=$db->query("SELECT content2 FROM papercontent LIMIT 1"); $content2=$db->fetch_single($q); $q=$db->query("SELECT content3 FROM papercontent LIMIT 1"); $content3=$db->fetch_single($q); $q=$db->query("SELECT content4 FROM papercontent LIMIT 1"); $content4=$db->fetch_single($q); $q=$db->query("SELECT content5 FROM papercontent LIMIT 1"); $content5=$db->fetch_single($q); $q=$db->query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); if($r['user_level'] != 1) { if($_GET['action'] == "all") { if($r['user_level'] != 1) { $db->query("TRUNCATE TABLE npaper"); print "Newspaper Ads All Cleared! <META HTTP-EQUIV=Refresh CONTENT='1;url=newspaper.php'>"; } } else if($_GET['action'] == "npID") { if($r['user_level'] != 1) { $db->query("DELETE FROM npaper WHERE npID={$_GET['npID']}"); print "News Paper Ad ID {$_GET['npID']} deleted! <META HTTP-EQUIV=Refresh CONTENT='1;url=newspaper.php'>"; } } } if($_GET['action'] == "add") { print "<h3>Add Advertisement ($25,000)</h3> <form action='newspaper.php?action=added' method='post'> Ad Title: <input type='text' name='npTITLE' class='textbox'> Ad Body: <textarea rows=5 cols=18 name='npBODY' class='textbox'></textarea> <input class='textbox' type='submit' value='Place Ad ($25,000)' /> </form> <font color=red>[b]WARNING:[/b] Only plain text will work Do not advertise other games No swearing Follow the Game Rules or you will be put in Federal Jail</font> "; } if($_GET['action'] == "added") { if($ir['money']>24999) { print "Congratulations, you bought a an ad for \$25,000! "; $db->query("UPDATE users SET money=money-2000 WHERE userid=$userid"); $title=str_replace(array("\n"),array(" "),strip_tags($_POST['npTITLE'])); $body=str_replace(array("\n"),array(" "),strip_tags($_POST['npBODY'])); $q=$db->query("INSERT INTO `npaper` VALUES (NULL, '$userid', '$title', '$body', unix_timestamp())"); print "Ad Added! <META HTTP-EQUIV=Refresh CONTENT='5;url=newspaper.php'>"; } else { print "You do not have enough money to add an ad. [url='explore.php']Back to town...[/url]"; } } print" <table width=100% border='2'> <tr height='50'> <td td colspan='4' width=100% height=20px><center><h1><u><font color='red'>The Corrupted Times</font></u></h1></center></td></tr> <tr><td td rowspan=2>$content</td><td td colspan=3>$content1</td> </tr><tr><td td colspan=2>$content2</td><td td >$content3</td> <tr><td td>$content4</td><td td> <u><center><font color='red'>Player Advertisements</font></u> [url='newspaper.php?action=add']<font color='red'>Buy An Advertisement</font> (<font color='yellow'>$25,000</font>)[/url]<hr> "; if($r['user_level'] == 2) { print " <a href=newspaper.php?action=all>[b]DELETE ALL[/b]</a>"; } $anpdata=$db->query("SELECT * FROM npaper"); $q=$db->query("SELECT user_level FROM users WHERE userid=$userid"); $r=$db->fetch_row($q); print "<marquee direction=up onmouseover='this.stop()' onmouseout='this.start()' class='textbox'>"; while($npdata=$db->fetch_row($anpdata)) { $us=$db->query("SELECT username FROM users WHERE userid={$npdata['npADDER']}"); $us=$db->fetch_single($us); $time=date('F j',$npdata['npTIME']); print " <hr> [b]Ad By: [url='viewuser.php?u={$npdata[']<font color=red>{$us}</font> [{$npdata['npADDER']}][/url] | Added On: {$time}[/b]"; if($r['user_level'] != 2) { print " | <a href=newspaper.php?action=npID&npID={$npdata['npID']}>[b]DELETE[/b]</a>"; } print " [i]<u>{$npdata['npTITLE']}[/i]</u> [i]{$npdata['npBODY']}[/i] "; } print "<hr /></marquee> </td> <td td colspan='2'><center> [url='halloffame.php']<font color=blue>HALL OF FAME</font>[/url]<hr> [url='gangcentral.php']<font color=blue>LOCAL GANGS</font>[/url]<hr> [url='updates.php']<font color=blue>LATEST UPDATES</font>[/url]<hr> [url='userlist.php']<font color=blue>RESIDENTS</font>[/url]<hr> [url='stats.php']<font color=blue>GAME STATS</font>[/url]<hr> [url='usersonline.php']<font color=blue>PEOPLE ONLINE</font>[/url]<hr> [url='gangwars.php']<font color=blue>CURRENT WARS</font>[/url]<hr> [url='unlocked.php']<font color=blue>LEVEL UNLOCKS</font>[/url] </center> </td></tr> <tr><td td rowspan='2'>"; ?> <html> <body> <object width="200" height="200"><param name="movie" value="http://www.youtube.com/v/3t3dHh2HWiw&hl=en&fs=1&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/3t3dHh2HWiw&hl=en&fs=1&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="200" height="200"></embed></object> </body> </html> <?php print "</td> <td td colspan='2' width=50% height=100px>$content5</td><td>Add More Content</td></tr> </table>"; //$h->endpage(); ?> SQL's ALTER TABLE `papercontent` ADD `content1` LONGTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ; ALTER TABLE `papercontent` ADD `content2` LONGTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ; ALTER TABLE `papercontent` ADD `content3` LONGTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ; ALTER TABLE `papercontent` ADD `content4` LONGTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ; ALTER TABLE `papercontent` ADD `content5` LONGTEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ; This just gives a simple tabled layout for the newspaper.php. I have user ads in the paper, if you dont have that mod I suggest you remove it or figure out the sql for it. (I didn't make the ads mod so im not going to) I have tested this but I'm not sure if i have it all here. any problems let me know i may have missed something in this post.
-
This Mod Does the following: Soldier/Commander Mod Lets the users buy multiple of the same house. (only) Increases the house price. (set in staff panel) Increases soldier cap with each house. (set in staff panel) Increases Soldiers(hp). (set in staff panel) Stops health updates. (soldhire.php to refill) Stops will updates. (soldfeed.php to refill) This will NOT work with the Marriage mod because this effects how will is gained. Criminal Mod Gives a second level. (for players to use time trying to gain) Gains exp from crimes. Stats for criminal. (makes players train stats to succeed in crimes.(train with crimschool.php)) Crime success based on criminal stats. Included Files: Soldhire.php Soldfeed.php Estate.php Staff_houses.php Crimschool.php Docrime.php Attack.php Attackwon.php All SQL's needed. All File Edit Instructions.(I will help if needed) Bug and Error Help for 6 months. I have made this mod in an attempt to leave the original mccodes game. This mod changes the game-play a lot with the way will/hp/exp/levels gained and some other small modifications this pack works well on my game. I have a working version of this mod at http://www.corruptedcity.net I am still new to this so PM me here on CE for information on purchasing. Please allow me a few days to respond to requests.
-
Re: Have any mod ideas post here! 1 How about a Mod where when you view the userlist.php: 1 - it only prints the names of the users in that location(city) 2 - it only prints out 25-50 per page 2 A new attack that calculates everything into 1 hit: 1 - One click success/fail 2 - hp effected by attack (not the all or nothing method) - lose % of hp from the attack || or make an equation - this way the users can attack anyone with large amounts of money multiple times with out having to wait for their health to update (if they are online they deposit right after getting out of hosp or before health updates(which limits amount that can be stolen))
-
Re: [v2] Shops.php What I did was mod the housing table in the sql and added like 4 more locations. Then I just modded staff panel to add the shop to your choice of 1 or 5 cities. I only did this because I want to have around 30 cities so players can hide from eachother. And having 5 cities exactly the same for the same levels wont bother players as they can unlock more shops and cities.... with higher levels.
-
Re: New estate mod [V2] This is a very bugged version of the estate/soldiers mod. I have one working on my game if you want to test it. http://www.corruptedcity.net There is a lot to this mod if anyone is interested they can try to figure it all out themselves (but what i posted here isn't even 1/6th the work) Or i could sell it i guess.. It completely changes the entire game Lots and Lots of work :(
-
Re: [V2] Help Needed yea i figured it out. i had to put the variable within the {} of the while statement. So you were right it was printing 0 because there was no variable. Thanks
-
My estate table will not print my variable. $hprice=$ir['house_qty']*($r['hPRICE']*$r['hcINC'])+$r['hPRICE']; if($ir['willmax'] > 101) { print "[url='estate1.php?sellhouse']Sell Your Property[/url] "; print "<table border=5 width=300px><tr><td width=85px>House Name</td><td width=85px>House Price</td><td width=85px>Incremental Price</td><td width=85px>Platinum Cost</td><td width=65px>Base Soldiers</td><td width=65px>Soldier Increase</td></tr></table>"; $hq=mysql_query("SELECT * FROM houses WHERE hWILL = {$ir['willmax']} ORDER BY hWILL ASC",$c); while($r=mysql_fetch_array($hq)) { print "<table border=5 width=300px><tr><td width=85px> [url='estate1.php?property={$r[']{$r['hNAME']}[/url]</td><td width=85px> \$$hprice </td><td width=85px> {$r['hcINC']} </td><td width=85px> {$r['platcost']} </td><td width=65px> {$r['hWILL']}</td><td width=65px>{$r['hINC']}</td></tr></table>"; } } $hprice=$ir['house_qty']*($r['hPRICE']*$r['hcINC'])+$r['hPRICE']; -- prints $0 i have tried using the equation in the <td> but it just printed out the equation $(14*(50000*0.25)+50000) or it prints $0.
-
Re: New estate mod [V2] there is a bug with that estate that doesn't print the "current" house price when buying multiple of them. (you can modify the new estate.php, and staff_houses.php back to will from 'HP' if that suites your game better) if your going with the soldier idea here is a soldier hire station create soldhire.php <?php include "globals.php"; $soldcost=300;//edit soldier price $maxsold1=($ir['maxhp']-$ir['hp']); $maxsold2=$soldcost*$maxsold1; if(!$_GET['spend']) { print "Welcome to the Soldier Depo! You have [b]\${$ir['money']}[/b] money. How many soldiers would you like to buy? Per Soldier - \$".number_format($soldcost)."<form action='soldhire.php?spend=hp2' method='post'><input type='text' name='money' /> <input type='submit' value='Hire' /></form> [url='soldhire.php?spend=maxsoldiers']Max Soldiers - \$".number_format($maxsold2)."[/url] "; } else { if($_GET['spend'] == 'maxsoldiers') { if($ir['money'] < $maxsold2) { print "You don't have enough money!"; } else if($ir['hp'] == $ir['maxhp']) { print "Your Troops are already maxed."; } else { $db->query("UPDATE users SET hp=maxhp,money=money-$maxsold2 WHERE userid=$userid"); print "You paid \$$maxsold2 to refill your Soldiers."; } } else if($_GET['spend'] == 'hp') { print "Type in the amount of soldiers you want to hire. You have [b]{$ir['money']}[/b] money. One Soldier = {$soldcost}.<form action='soldhire.php?spend=hp2' method='post'><input type='text' name='money' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'hp2') { $_POST['money']=(int) $_POST['money']; if($_POST['money'] <= 0 || $_POST['money'] > $ir['money']) { print "Error, you either do not have enough money or did not fill out the form. [url='soldhire.php?spend=hp']Back[/url]"; } else if($ir['hp'] == $ir['maxhp']) { print "Your Troops are already maxed."; } else { $hpmoney=$_POST['money']*$soldcost; $db->query("UPDATE users SET money=money-$hpmoney WHERE userid=$userid"); $db->query("UPDATE users SET hp=hp+{$_POST['money']} WHERE userid=$userid"); print "You hired {$_POST['money']} Soldiers for \$$hpmoney."; } } } $h->endpage(); ?> then in city.php or explore.php enter a link to the page. Soldier Depo. this will let your users rehire their HP(soldiers) for a set price, which you can modify. i have tested this but not installed it to a game should work fine though :)
-
This Estate Mod Does the following: -lets the users buy multiple of the same house(only) -increases the house price by amount set in staff panel -forces users to sell house before buying a new one -increases HP by the amount set in Staff Panel -does NOT give money back when they sell the house Estate.php <?php session_start(); require "globals.php"; $mpq=mysql_query("SELECT * FROM houses WHERE hWILL={$ir['willmax']}",$c); $mp=mysql_fetch_array($mpq); $_GET['property']=abs((int) $_GET['property']); if($_GET['property']) { $npq=mysql_query("SELECT * FROM houses WHERE hID={$_GET['property']}",$c); $np=mysql_fetch_array($npq); if ($ir['house_qty'] == 1) { if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { print "You do not have enough money to buy the {$np['hrNAME']}."; } mysql_query("UPDATE users SET money=money-{$np['hPRICE']},maxhp={$np['hWILL']},willmax={$np['hWILL']},house_qty=house_qty+1 WHERE userid=$userid",$c); print "Congrats, you bought the {$np['hNAME']} for \${$np['hPRICE']}!"; } $hprice=$ir['house_qty']*($np['hPRICE']*.20)+$np['hPRICE']; if ($hprice > $ir['money']) { print "You do not have enough money to buy the {$np['hrNAME']}."; } else if ($ir['house_qty'] > 1) { mysql_query("UPDATE users SET money=money-$hprice,maxhp=maxhp+{$np['hINC']},house_qty=house_qty+1 WHERE userid=$userid",$c); print "Congrats, you bought the {$np['hNAME']} for \$$hprice!"; } } else if (isset($_GET['sellhouse'])) { $npq=mysql_query("SELECT * FROM houses WHERE hWILL={$ir['willmax']}",$c); $np=mysql_fetch_array($npq); if($ir['willmax'] == 100) { print "You already live in the lowest property!"; } else { mysql_query("UPDATE users SET maxhp=100,hp=100,willmax=100,house_qty=1 WHERE userid=$userid",$c); print "You sold your {$np['hNAME']} and went back to your CardBoard Box."; } } else { print "<center>Your current property: <font color=blue>[b]{$mp['hNAME']}[/b]</font> The houses you can buy are listed below. Click a house to buy it. "; if ($ir['willmax'] == 100) { print "<table border=5 width=300px><tr><td width=85px>House Name</td><td width=85px>House Price</td><td width=65px>Base Soldiers</td><td width=65px>Soldier Increase</td></tr></table>"; $hq=mysql_query("SELECT * FROM houses WHERE hWILL > {$ir['willmax']} ORDER BY hWILL ASC",$c); while($r=mysql_fetch_array($hq)) { $hprice=$ir['house_qty']*($np['hPRICE']*.20)+$np['hPRICE']; print "<table border=5 width=300px><tr><td width=85px> [url='estate.php?property={$r[']{$r['hNAME']}[/url]</td><td width=85px> \${$r['hPRICE']} </td><td width=65px> {$r['hWILL']}</td><td width=65px>{$r['hINC']}</td></tr></table>"; } } if($ir['willmax'] > 101) { print "[url='estate.php?sellhouse']Sell Your Property[/url] "; $hq=mysql_query("SELECT * FROM houses WHERE hWILL = {$ir['willmax']} ORDER BY hWILL ASC",$c); while($r=mysql_fetch_array($hq)) { $hprice=$ir['house_qty']*($np['hPRICE']*.20)+$np['hPRICE']; print "<table border=5 width=300px><tr><td width=85px> [url='estate.php?property={$r[']{$r['hNAME']}[/url]</td><td width=85px> \$$hprice </td><td width=65px> {$r['hWILL']}</td><td width=65px>{$r['hINC']}</td></tr></table>"; } } } $h->endpage(); ?> SQL's ALTER TABLE `users` ADD `house_qty` INT( 11 ) NOT NULL DEFAULT '0' ALTER TABLE `houses` ADD `hINC` INT( 11 ) NOT NULL DEFAULT '0' register.php find: $db->query("INSERT INTO users (username, login_name, userpass, level at the end of both the users and VALUES add: house_qty to users 1 to VALUES staff.php <?php include "sglobals.php"; if($ir['user_level'] > 2) { die("403"); } //This contains shop stuffs switch($_GET['action']) { case "addhouse": addhouse(); break; case "edithouse": edithouse(); break; case "delhouse": delhouse(); break; default: print "Error: This script requires an action."; break; } 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 Soldiers."; $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' /> Sold Inc: <input type='text' name='inc' /> <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']); $inc=abs((int) $_POST['inc']); $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 Soldiers."; $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 Soldier bar cannot be edited."); } $db->query("UPDATE houses SET hWILL=$will, hPRICE=$price, hINC=$inc, hNAME='$name' WHERE hID={$_POST['id']}"); $db->query("UPDATE users SET maxhp=$will WHERE maxhp={$old['hWILL']}"); $db->query("UPDATE users SET hp=maxhp WHERE hp > maxhp"); 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']}' /> Sold Inc: <input type='text' name='inc' value='{$old['hINC']}' /> <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; } } function delhouse() { global $db,$ir,$c,$h,$userid; if($_POST['house']) { $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['house']}"); $old=$db->fetch_row($q); if($old['hWILL']==100) { die("This house cannot be deleted."); } $q2=$db->query("SELECT * FROM users WHERE maxhp={$old['hWILL']}"); $ids=array(); while($r=$db->fetch_row($q2)) { $ids[]=$r['userid']; } if(count($ids)) { $db->query("UPDATE users SET maxhp=100 WHERE userid IN(".implode(', ', $ids).")"); } $db->query("UPDATE users SET hp=maxhp WHERE hp > maxhp"); $db->query("DELETE FROM houses WHERE hID={$old['hID']}"); print "House {$old['hNAME']} deleted."; stafflog_add("Deleted house {$old['hNAME']}"); } else { print "<h3>Delete House</h3><hr /> Deleting a house is permanent - be sure. Any users that are currently on the house you delete will be returned to the first house, and their money will be refunded.<form action='staff_houses.php?action=delhouse' method='post'> House: ".house_dropdown($c, "house")." <input type='submit' value='Delete House' /></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]"; } $h->endpage(); ?> I believe if you install this to an active game you will need to have everyone Sell their current house(to set their house_qty = 1) After that they will be fine(Except they will not get their money back if you don't edit the mod to give it back) If you edit register then your new users should be fine. You Will not want to set an incremental soldiers for your lowest house if the price is free as this will be a huge exploit. I have tested most of this but have not installed it to a game yet. This is the first mod I've posted..( I will have more to add to the soldier's end of the mod soon)
-
Re: [V2] Quick Question - Crimes go to docrime.php find: if($r['crimeSUCCESSITEM']) { item_add($userid, $r['crimeSUCCESSITEM'], 1); } i believe this is where item is added to the user for success of the crime. maybe you could do random item ID or Item type (you may want item type for crimes) im not going to make the mod for you as i do not need a mod like this.
-
How often are these games customized?
TMan replied to EineyEntertainment's topic in General Discussion
Re: How often are these games customized? honestly with all the games ive seen here and before i came to CE all the Mccode games you can tell are the same... they all have the same gameplay energy will exp lvl crimes.... and just different mods to find random items crystals money.... its quite pathetic really, but i guess some ppl can make some money doin it then fine(just wish i knew how i'd just put 20 of these suckers online with different templates lmao) seriously though its not terribly hard to make the mods or change the code, its just up to the creator to adjust gameplay to make it more playable for their users. -
Re: [V2]need help with Custom Mod for housing I Just fixed this mod its working great :-D
-
Re: [V2]need help with Custom Mod for housing Im not sure if i wasnt specific enough so lets try it again. if($ir['willmax'] > 100) { print "[url='estate.php?sellhouse']Sell Your Property[/url] "; } $hq=mysql_query("SELECT * FROM houses WHERE hWILL = {$ir['willmax']} ORDER BY hWILL ASC",$c); while($r=mysql_fetch_array($hq)) { $hprice=$ir['house_qty']*($np['hPRICE']*.20)+$np['hPRICE']; print "<table border=5 width=300px><tr><td width=85px> [url='estate.php?property={$r[']{$r['hNAME']}[/url]</td><td width=85px> \$$hprice </td><td width=65px> {$r['hWILL']}</td><td width=65px>{$r['hINC']}</td></tr></table>"; } else if ($ir['willmax'] == 100) { print "<table border=5 width=300px><tr><td width=85px>House Name</td><td width=85px>House Price</td><td width=65px>Base Soldiers</td><td width=65px>Soldier Increase</td></tr></table>"; } $hq=mysql_query("SELECT * FROM houses WHERE hWILL > {$ir['willmax']} ORDER BY hWILL ASC",$c); while($r=mysql_fetch_array($hq)) { $hprice=$ir['house_qty']*($np['hPRICE']*.20)+$np['hPRICE']; print "<table border=5 width=300px><tr><td width=85px> [url='estate.php?property={$r[']{$r['hNAME']}[/url]</td><td width=85px> \${$r['hPRICE']} </td><td width=65px> {$r['hWILL']}</td><td width=65px>{$r['hINC']}</td></tr></table>"; } This is echoing/printing the table for houses for both willmax==100 and willmax >100 What I want: -i want the table to be displayed if willmax==100 (in lowest house) -i want only their current housing displayed if willmax>100 (not the table listing all the houses) not sure if im using if,else,else if wrong or which one to use in this part. can anyone help or am i still being too vague?
-
Re: Changing the SQL on items well if you admin of the game can't you go to the staff panel and edit your items? if so your effects drop down should have an effect for agility(aim) then just finish the % or value ... and save it
-
Re: Help needed have you updated the user stats or users tables on your phpmyadmin? i did this and had to update my register.php according to my new stats. what mods are you adding or how many are you trying to add?
-
i am currently trying to make it so my players can buy more than 1 of the same house... this will increase their will(or w/e) by a set amount. the price will increase aswell. i am still new to coding and im getting some problems... <?php session_start(); require "globals.php"; $mpq=mysql_query("SELECT * FROM houses WHERE hWILL={$ir['willmax']}",$c); $mp=mysql_fetch_array($mpq); $_GET['property']=abs((int) $_GET['property']); if($_GET['property']) { $npq=mysql_query("SELECT * FROM houses WHERE hID={$_GET['property']}",$c); $np=mysql_fetch_array($npq); if ($ir['house_qty'] == 1) { if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { print "You do not have enough money to buy the {$np['hrNAME']}."; } mysql_query("UPDATE users SET money=money-{$np['hPRICE']},maxwill={$np['hWILL']},willmax={$np['hWILL']},house_qty=house_qty+1 WHERE userid=$userid",$c); print "Congrats, you bought the {$np['hNAME']} for \${$np['hPRICE']}!"; } $hprice=$ir['house_qty']*($np['hPRICE']*.20)+$np['hPRICE']; if ($hprice > $ir['money']) { print "You do not have enough money to buy the {$np['hrNAME']}."; } else if ($ir['house_qty'] > 1) { mysql_query("UPDATE users SET money=money-$hprice,maxwill=maxwill+{$np['hINC']},house_qty=house_qty+1 WHERE userid=$userid",$c); print "Congrats, you bought the {$np['hNAME']} for \$$hprice!"; } } else if (isset($_GET['sellhouse'])) { $npq=mysql_query("SELECT * FROM houses WHERE hWILL={$ir['willmax']}",$c); $np=mysql_fetch_array($npq); if($ir['willmax'] == 100) { print "You already live in the lowest property!"; } else { mysql_query("UPDATE users SET maxwill=100,willmax=100,house_qty=1 WHERE userid=$userid",$c); print "You sold your {$np['hNAME']} and went back to your CardBoard Box."; } } else { print "<center>Your current property: <font color=blue>[b]{$mp['hNAME']}[/b]</font> The houses you can buy are listed below. Click a house to buy it. "; if($ir['willmax'] > 100) { print "[url='estate.php?sellhouse']Sell Your Property[/url] "; } $hq=mysql_query("SELECT * FROM houses WHERE hWILL = {$ir['willmax']} ORDER BY hWILL ASC",$c); while($r=mysql_fetch_array($hq)) { $hprice=$ir['house_qty']*($np['hPRICE']*.20)+$np['hPRICE']; print "<table border=5 width=300px><tr><td width=85px> [url='estate.php?property={$r[']{$r['hNAME']}[/url]</td><td width=85px> \$$hprice </td><td width=65px> {$r['hWILL']}</td><td width=65px>{$r['hINC']}</td></tr></table>"; } } if ($ir['willmax'] == 100) { print "<table border=5 width=300px><tr><td width=85px>House Name</td><td width=85px>House Price</td><td width=65px>Base Soldiers</td><td width=65px>Soldier Increase</td></tr></table>"; } $hq=mysql_query("SELECT * FROM houses WHERE hWILL > {$ir['willmax']} ORDER BY hWILL ASC",$c); while($r=mysql_fetch_array($hq)) { $hprice=$ir['house_qty']*($np['hPRICE']*.20)+$np['hPRICE']; print "<table border=5 width=300px><tr><td width=85px> [url='estate.php?property={$r[']{$r['hNAME']}[/url]</td><td width=85px> \${$r['hPRICE']} </td><td width=65px> {$r['hWILL']}</td><td width=65px>{$r['hINC']}</td></tr></table>"; } $h->endpage(); ?> what this currently does: -lets them buy multiple of the same house. -Increases the amount of the housing cost. -and increases will by a set amount. but...my problem i want it to show only Sell House and the current house when they view estate, if they are over 100 for maxwill. this is printing the full housing table every time, and it prints both purchase complete sections. its very buggy and needs work if anyone is willing to help i would appreciate it.
-
Re: Register Review???? for right now i have an IP blocker on the register page which stops them from registering with the same IP. i found it in the Mccode mods section here on CE.
-
Re: Crime Formula yes i did. any particular reason for asking? i have changed alot from what he had it to. Im making some of my own mods and adding them. right now im working on making a housing mod that will increase soldier cap and increase house cost with each purchase..(buy multiple of the same house) but the Crime Success Formula i modded myself to work with the new Criminal Stats.
-
Re: Crime Formula i have just made this mod for my game its functional if you want check it out. http://www.corruptedcity.net i have it set so the criminal's stats effect Crime Success
-
Re: [V2]Racer Exp doesnt increase yea i want it so they only gain for betted and High stakes racing i added rlevel for Racer level i dont think it is calling their level or something because 1/1=1 should still gain exp right now i have it set to $rexp1=1/3 and its working but i want it to be rlevel/rlevel i dont want to post the whole code cause idk if its a mod that was paid for i bought the game from somebody and it was on the site already
-
Re: [V2]Racer Exp doesnt increase well i have been trying this is why i posted it here lol. im not sure if my variable's math is labeled wrong or if im not inserting it right... because the races_won and race income all update to myphpadmin and i have fixed it to where no errors pop up but its not updating rexp $ir should be me right $r should be you in this file it seems both are labeled $r['chCHD'] and $r['chCHR'] for challenged and challenger would i need to update my Rexp according to the users $r['chCHD'] and $r['chCHR'] and how would i do this