Jump to content
MakeWebGames

Nicholas

Members
  • Posts

    467
  • Joined

  • Last visited

Everything posted by Nicholas

  1. it help it if can post up your mainmenu.php to see if we can find the problem.
  2. which game? lol. if you mean criminal-madness, i have no idea. lol. i brought criminal-madness and it came with the layout.
  3. :thumbsup: took me between 1-5 hours to make it lol, without errors and layout being messed up on my game lol.
  4. i like the idea of this :) nice mod :)
  5. what do you mean by "i didnt think it through again" yes i know not everyone is rich in all games, but thats something to work towards... while training stats to stop the other gangs warring you and destorying your gang lol. on my game ive done it as X 20,000 for every gang in game.
  6. lol i dont get the tab spacings nither... i like it all together, right next to the margin line. i think it makes it easier to read if its all together. lol.
  7. sorry about the 3 posts lol but is there any chance you could move this to free modifications at all please?
  8. ahh figured it out... add this under include "globals.php"; $q=$db->query("SELECT gangID FROM gangs"); $gangs=$db->num_rows($q); $gangs = $gangs*50000;   then find... if($ir['money'] < ???????) { die("You don't have enough money. You need \$???????."); }   and replace it with this if($ir['money'] < $gangs) { echo "You don't have enough money. You need \$".number_format($gangs)."."; $h->endpage(); exit; }   then find... <input type='submit' value='Create Gang for \$???????' /></form>   and replace it with this <input type='submit' value='Create Gang for \$".number_format($gangs)."' /></form>   then find... $db->query("UPDATE users SET gang=$i,money=money-??????? where userid=$userid");   and replace it with this $db->query("UPDATE users SET gang=$i, money=money-$gangs where userid=$userid");
  9. hi i created this yesterday due to a player complaining about my old one (it was techically just basic mccodes v2 help tutorial but changed information) so i desided to create new one... lol. this is it... but remember to change some of the information... as its based around my game. ------------------- i would do a screenshot but the game i have it on (http://criminal-madness.co.uk/) would make it look different, due to well the css on that game is set up differently. if someone can do a screenshot of this for me, that be great ------------------- call it " help.php " <?php include 'globals.php'; print "<h2><p id='contents'><u>{$set['game_name']} Help Tutorial</u></p></h2> <table align='left' width=29%'> <td style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> <ul> [*][url='help.php#guide1']Introduction[/url] [*][url='help.php#guide2']Events[/url] [*][url='help.php#guide3']Energy, Brave and Will[/url] [*][url='help.php#guide4']Mailbox[/url] [*][url='help.php#guide5']Stats[/url] [*][url='help.php#guide6']Crimes[/url] [*][url='help.php#guide7']Searching[/url] [*][url='help.php#guide8']Courses[/url] [*][url='help.php#guide9']Friends List/Enemy List[/url] [*][url='help.php#guide10']Jail[/url] [*][url='help.php#guide11']Hospital[/url] [*][url='help.php#guide13']Hall of Fame[/url] [*][url='help.php#guide14']Gangs[/url] [*][url='help.php#guide15']Joining a Gang[/url] [*][url='help.php#guide16']Creating a Gang[/url] [*][url='help.php#guide17']Gang Reputation[/url] [*][url='help.php#guide18']Gang Wars[/url] [*][url='help.php#guide19']Your Profile[/url] [*][url='help.php#guide20']Editing Your Profile[/url] [*][url='help.php#guide21']Basic Game Terms[/url]"; print "[/list]</td></table> <table align='right' width='71%'><td border='1'> <p style='padding-left: 15px;' id='guide1'>Introduction</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> {$set['game_name']} is where to succeed you're required to train hard and do as many crimes as you can. You can either spend all day in the gym training to beat your enemies, or join a Gang and work as a team destroying others to be a part of the best around. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide2'>Events</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> The events section is where all current news that has happened to you will be displayed. This could include events such as being attacked, being sent money or being rescued from jail. Again, events are displayed in chronological order, and can be easily deleted by using the Delete link. The events section also has a Delete all events, which clear the list of all your events. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide3'>Energy, Brave and Mood</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> At the top of the Sidebar you can see some of your details, including your current Energy, Brave and Mood. <u>Energy</u>. You can use your energy for training 10 times, unless you are a donator, then you can then train 15 times. You get 5 energy every 5 minutes. You are able to use energy for training your battle stats, attend lessons at Courses or attacking players (50 energy). <u>Brave</u> is used to do crimes. Harder crimes will use up more of your bar, but gain you more cash as a result. You gain 1 brave every 5 minutes. <u>Mood</u>. The better your mood is, the more stat points you will gain per one set while training. The length of the mood bar depends on the property that you own for example if you own Lower Class Apartments you will have a higher mood bar than if you have The Projects. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide4'>Mailbox</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> The mailbox is where all your messages from other players and staff will be sent to. Check your mails on a regular basis, the link will bold when you have received a new message. Mails will be displayed in the order you have received them, but will only display the first 25. There are three ways to send a mail, depending on whether you have a previous mail from them. To send a mail for the first time, find the users profile page, and click on the Send Mail link. Type your message in the box provided and click the Send button. If you have contacted this person before, simply use the Reply link to send a message the same way. You will notice that the message history will be displayed at the bottom of the page. Deleting a message is very simple, click the Delete link in the list on the left. [b]<span style='color: red;'>{$set['game_name']} staff will never ask for your username or password, please report any messages sent to you of this nature and then delete.</span>[/b] <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide5'>Stats</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> Stats are used for attacking others, the different type of stats are as follows: Strength: Makes you inflict more damage on the opponent. Guard: Makes your opponent inflict less damage on you. Speed: The higher speed you have the higher your chance of dodging an opponents attack. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide6'>Crimes</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> There are currently 5 types of crimes: Searching, Mugging, Sell Copied Media, Robbery and Illegal Goods. The easiest using 1 brave; however this will gain you least experience and money. When you fail to complete a crime you could get put in jail for a certain amount time depending on the difficulty of the crime. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide7'>Searching</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> Searching is a vital part of the game. Initially you may only search the Streets, but as you progress in the game you will have other options opened up to you to have different outcomes. You choose your search area, and wait to see what your result is. You may find potions, weapons or armour! Of course, that's just the basic items you are able to gain; at higher levels, you will find that your searches will become more and more rewarding. You will get 25 free searches every day, and if that's not enough, you can always refill that 25 searches using 200 white crystals. Note that the searches will not carry over to the next day so you should finish them before the day is over. Take your chances of good and bad outcomes, and long term you will find yourself better off. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide8'>Courses</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> Courses give you the opportunity to train yourself with various skills to help improve you as a killer. You can only do 1 course at any one time, and attend the course once an hour. The maximum number a day for one course is 6 but this you can have extra 2 hours if you spend white crystals. These extra trains gained by using white crystals aren't permanent and must be used before {$set['game_name']} new day begins . Each time you attend, it costs 5 Energy, but the outcomes are worthwhile for the effort in the long term. If you have finished a course you can view what you got by going to Courses and on main page at bottom click View each to the course you want to see information about. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide9'>Friends List/Enemy List</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> The friends list is the best place to store your favourite mates on {$set['game_name']}, and is <u>only available to donators</u>. If you want to add a friend to your list, click on the Add Friend link at the top of the page and type in their user ID as well as an optional comment. If you don't know their user ID, find it by using the search feature with their name. Adding people to your friends list makes it easier to send cash as well as mailing them. To remove a friend, simply click the Remove link at the end of the row. The Enemy list works in a similar fashion, using the user ID to add them to the list. The enemy list however creates a shortcut to the attack page, making it easier to hit them. The lists also offer a quick way to see if your friends are online or not. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide10'>Jail</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> Jail is like the Hospital as you can't do much whilst in there either. To be sent to Jail you will either be caught doing crimes, being in wrong place in Searching or if you fail to rescue someone from Jail. Rescuing players out of Jail will cost you 10 Energy pass or fail. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide11'>Hospital</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> When in Hospital you will not be able to do anything until your Time Left in the hospital runs out. You can decrease your hospital time with Healing Potions. Which can be found by Searching, you can buy them from the Item Market from other players. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide13'>Hall of Fame</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> Hall of Fame consists of the best Players and Gangs on {$set['game_name']}, you will find the Top 20 for each category; Level, Gold, Gang Respect, White Crystals, Best House, Lottery Wins, Lottery Winnings, Rescues, Crimes and Courses Finished. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide14'>Gang</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> Gangs are a group of members formed by a leader and a co-leader. By joining one you agree to be loyal and honest with the fellow members of it. While in a gang you could be in war in which when you attack enemy gang's to gain you reputation. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide15'>Joining a gang</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> To join, go to the Gang's profile and at the bottom of the page click Apply. Make sure your application is well written and detailed. You will need to explain what you are good at and why you wish to join that gang. Some gang's may ask for your battle stats. Once the application is submitted, you will need to wait a while for the gang leader or co-leader to accept or decline it. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide16'>Creating a gang</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> This is pretty simple however may be extremely costly. To create one go to the explore in the Darkest Side part. You will have a choice of three options. By clicking 'Gangs' it will take you to a page with other gangs, once on the page up top you see a link called 'Create A Gang Here'. Click it. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide17'>Gang reputation</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> Reputation is the most important aspect of a gang. When a gangs reputation hits 0, it is dead. The members will then be without a gang however are free to join any others. A gang can only lose reputation during gang wars. When at war the members can attack the enemy gang members causing them to lose reputation, and the other gang to gain some. The amount of reputation gained or lost depends on the amount of chain that has gone on. Hospitalizing the enemy members will gain you more reputation and they will lose more. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide18'>Gang Wars</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> Gang wars are when the existing gang battle it out for the top spot and financial gain. All gangs start out with 100 reputation. When a gang 'zeros' it is no longer in existence. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide19'>Your profile</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> At the bottom left hand side of your profile you will see a preferences link. Once clicked it gives you a list of options. Firstly go to Profile Sig Change. Clicking this will just let you see a profile signiture box where you can put information in. You can add pictures, music and videos to your own profile signature, but as a general rule, no content must exceed a width of 500px. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide20'>Editing your profile</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> Your profile can be edited very easily. To start editing your profile and other information- click on the Preferences option in the Options section on the left hand side of the screen. The first link on your profile section, Name is simply where you can change your display name. Your ID and login name will still stay the same though, so other users can still find you. The Profile Signature section is where you can edit your signature or add information you would want others to see. When adding your signature please be aware that the max size for a signature is 500px wide and although there is no maximum height, 400px wide by 150px is a good size. When putting a signature on your profile it should have [img=profile picture here] You can do this by uploading your picture onto the following sites. The User Image section is where you can add your own picture that you want others to see the max size for it is 150 kb and the default size is 200 x 270. The last part of the settings allows you to change your password. Change Password this is where you click to change your password. It's good to change it monthly, however if you change it, make sure you remember it. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div> <p style='padding-left: 15px;' id='guide21'>Basic Game Terms</p> <div style='background-color: #000000; border: 1px #FFFFFF solid; padding: 8px;'> [b]Regeneration:[/b] Energy - 5 every 5 minutes Brave - 1 every 5 minutes Mood - 5 every 5 minutes [i]With Donator status: It alternates energy[/i] [b]Temporary increases:[/b] 150 energy. (31 days) [b]Permanent Increases:[/b] There isn't any. <div style='text-align: right; font-size: 9px; height: 6px; font-weight: bold;'> [[url='help.php#contents']back to top[/url]] [[url='explore.php']back to explore[/url]]</div></div></td></tr></table>"; ?>
  10. how about making it so say you want to create a gang it will cost... $250,000 for the first gang and then once there is a gang in the game the next gang will cost $250,000 + $50,000 (each gang in game). for example... say there is 6 gangs in the game, yes? that be $50,000 X 6 = $300,000, then you add that to the $250,000 which will cost $550,000. so techically the next person that wants to buy a gang it will cost them $550,000. if you need more information, please contact me. :) Thanks, Nicholas.
  11. Lithium helped on this mod :) to do this, you need to find... $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC");   change it to this $hq=$db->query("SELECT * FROM houses ORDER BY hWILL ASC");   then find...   if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; }   under it put else if($np['hWILL'] == $mp['hWILL']) { print "You already have that house!"; }   then find...   $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print "[url='estate.php?property={$r[']{$r['hNAME']}[/url]&nbsp - Cost: \${$r['hPRICE']}&nbsp - Will Bar: {$r['hWILL']} "; } }   change it to this... $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print " <center><table width=50% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr style='background:black'> <th>House</th> <th>House Price</th> <th>House Will</th> <th>Buy?</th></tr>"; $hq=$db->query("SELECT * FROM houses ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print "<tr> <td><center>{$r['hNAME']}</a></td> <td><center>\$$t".money_formatter($r['hPRICE'],'')."</td>"; $will = ($ir['maxwill'] >= $r['hWILL']) ? $r['hWILL'] : "???"; print "<td><center>$will</td> <td><center><a href='estate.php?property=".abs(intval($r['hID']))."'>Buy</tr>"; } print "</table>"; } } (this is a better layout than the normal system...) if you already have a table around it. find this... <td>\${$r['hPRICE']}</td>   add next to the </td> "; $will = ($ir['maxwill'] >= $r['hWILL']) ? $r['hWILL'] : "???"; print "<td><center>$will</td>   hopefully that should be clear to understand :/
  12. cheers :)   "; $will = ($ir['maxwill'] >= $r['hWILL']) ? $r['hWILL'] : "???"; print "<td><center>$will</td> it works now :)
  13. actually you can make all 127 files into like 10 lol index.php?action=jail index.php?action=hospital index.php?action=explore so on... just put all the information into a function lol.
  14. cant figure it out lol ive tried if($ir['maxwill'] == $mp['hWILL']) { $will = "{$mp['hWILL']}"; } else { $will = "???"; } <td>$will</td> but it just says 100 on all the slots then...
  15. wouldnt just adding include "bbcode_engine.php"; under include "globals.php"; make the newspaper bbcode enabled? also changing the code bit where the newspaper text appears when created one, for example, if it was... {$_POST['paperad']} change it into '.nl2br($bbc->bbcode_parse($_POST['paperad'])).' or ".nl2br($bbc->bbcode_parse($_POST['paperad']))."
  16. thanks lithium for that query edit, some reason im having loads trouble with selecting querys from the database lol, also i know how to show the house will for each house on the table, but im trying to make it so it doesnt show all of the house will at same time, you have to own the house before you can see how much will the house gives. if its understandable on what i mean lol.
  17. i think ive fixed it with drizzle's help! editing first post now.
  18. ok thanks for tip about the table and while bit, but also it didnt work :( still doing the same thing.
  19. thanks for the update :) im starting to learn how to do functions and etc, so i might be making alot of stupid mods lol. also would this new marriage system include shared housing? as im after a shared housing mod.
  20. hi everyone ive created a attack logs system, hope everyone likes it lol. call it "attacklogs.php" <?php /* Mod Made By Nicholas [url]http://criminal-madness.co.uk/[/url] */ include "globals.php"; $_GET['page'] = (isset($_GET['page']) && is_string($_GET['page'])) ? stripslashes(trim($_GET['page'])) : FALSE; switch($_GET['page']) { case 'myattacks': myattacks(); break; case 'viewattack': viewattack(); break; default: myattacks(); break; } function myattacks() { global $db,$ir,$c,$h,$userid; $atks=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn, attacklog, log_id FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE (u1.userid=$userid) AND result='won' ORDER BY time DESC LIMIT 100"); print " <h2>Last 50 attack logs</h2> <center><table width=75% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr style='background:black'> <th>Player</th> <th>Time</th> <th>Result</th> <th>View</th> </tr>"; while($r=$db->fetch_row($atks)) { $d=date('F j, Y, g:i:s a',$r['time']); print "<tr> <td><center>[url='viewuser.php?u=".abs(intval($r[']<center>".stripslashes(htmlentities($r['attackedn']))."[/url]</td> <td><center>$d</td><td><center>"; if($r['stole'] == 0) { print "Lost"; } else if ($r['stole'] == -1) { print "Hospitalized"; } else if ($r['stole'] == -2) { print "Left"; } else { print "Mugged"; } print "</td> <td><center>[url='attacklogs.php?page=viewattack&log_id={$r[']VIEW![/url]</td> </tr>"; } print "</table>"; } function viewattack() { global $db,$ir,$c,$h,$userid; $atks2=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn, attacklog, log_id FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE log_id={$_GET['log_id']}"); print "<center><table width=50% cellspacing=1 class='table' border='1' bordercolor='#636363'>"; while($r=$db->fetch_row($atks2)) { print "[b]".stripslashes(htmlentities($r['attackern']))." VS ".stripslashes(htmlentities($r['attackedn']))."[/b] <tr> {$r['attacklog']}</tr>"; } print "</table></center>"; } ?>   have any problems please contact me.
  21. scroll down to see how to do it. hi ive tho of a small modification on the estate.php file... i was thinking... how about we make it so it shows how much will the property gives but only if you own it... for example i tried this...   if($ir['maxwill'] == 100) { $will= "100"; } else { $will= "???"; } if($ir['maxwill'] == 150) { $will1= "150"; } else { $will1= "???"; } if($ir['maxwill'] == 200) { $will2= "200"; } else { $will2= "???"; }   so on... depending on your property setup with house will. the 150 and 200 be different... but anyways then down where the table appears i would of put... <td>$will$will1$will2</td> so on with the $will? bit (its put together so it doesnt do like a space, not sure if im doing it right tho) if the player hasnt brought say the property with the 200 will it come up like this House Name | House Price | House Will | Buy? blah | $1,000 | 100 | BUY! blah | $2,500 | 150 | BUY! blah | $5,500 | ??? | BUY! that ??? means that they havnt yet brought that property, so they cant find out how much will the property gives until they have... hopefully its understandable... if someone can create this mod or help with the functions bit. that be great :) ______________________________________________________________________ also if you can... can you tell me how to make it so the property line doesnt disappear once you have brought the property. (if you know what i mean? lol) ______________________________________________________________________ Thanks, Nicholas.
  22. thanks for the tip :)
  23. lmao... i knew the first post be something to do with something bad or un-needed...
  24. hi, ive convented the following files into 1 file... propose.php decision.php acceptpro.php declinepro.php so if you this mod on your game, you can use this file instead of them 4 files (save disk space) this file should be secured too. call it "marriage.php" <?php include "globals.php"; $m=$db->query("SELECT * FROM users WHERE userid=".abs(intval($_GET['pro'])).""); $r=$db->fetch_row($m); $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : false; switch($_GET['action']) { case "accept"; accept(); break; case "decline"; decline(); break; case "decision"; decision(); break; case "proposeform"; proposeform(); break; case "proposesubmit"; proposesubmit(); break; default: index(); break; } if (!in_array($_GET['action'], array('propose', 'proposesubmit', 'proposeform', 'decision', 'decline', 'accept'))) { print "Action Not Understood!"; $h->endpage(); exit; } function index() { global $db,$ir,$c,$h,$userid; if ($ir['married'] != 0) { die("You are already married"); } else { print"<h1>Proposal Center</h1> Do you want to propose to someone? <form action='marriage.php?action=proposeform' method='post'> <input type='submit' class='submit' value='Yes.'> </form> <form action='index.php' method='get'> <input type='submit' class='submit' value='No.'> </form>"; } } function proposeform() { global $db,$ir,$c,$h,$userid; if ($ir['married'] != 0) { die("You are already married"); } else { print"<h1>Proposal Center</h1> <form action='marriage.php?action=proposesubmit' method='post'> Please enter the user id of the user you want to propose to: User ID: <input type='text' name='propose' /> Message: <input type='text' name='message' /> <input type='submit' value='Propose' /></form>"; } } function proposesubmit() { global $db,$r,$ir,$c,$h,$userid; $m=$db->query("SELECT * FROM users WHERE userid=".abs(intval($_POST['propose'])).""); $r=$db->fetch_row($m); if ($r['married'] != 0) { die("This person is already married. Sorry. Try someone else."); } if ($ir['married'] != 0) { die("You are already married"); } if ($ir['userid'] == $_POST['propose']) { die("You cannot marry yourself"); } if ($_POST['propose'] <= 0) { die("Invalid user, Try someone else."); } else { $ch=$db->query("SELECT * FROM proposals WHERE proPROPOSED=".abs(intval($_POST['propose'])).""); if ($db->num_rows($ch)!=0) { die("This user already has a pending proposal, please try again later <a href=index.php>> Back</a>"); } else { $m=$db->query("SELECT * FROM users WHERE userid=".abs(intval($_POST['propose'])).""); $r=$db->fetch_row($m); $db->query("INSERT INTO proposals VALUES('', '{$ir['userid']}', '".abs(intval($_POST['propose']))."', '".mysql_real_escape_string($_POST['message'])."')"); event_add(abs(intval($_POST['propose'])),"[url='viewuser.php?u=$userid']".htmlentities($ir['username'])." [".abs(intval($ir['userid']))."][/url] proposed to you click [url='marriage.php?action=decision']<u>HERE</u>[/url] to make your mind up.</a> ",$c); print"<h3>Proposal Center</h3> You proposed to ".htmlentities($r['username'])." [".abs(intval($r['userid']))."], please wait for their decision "; } } } function decision() { global $ir,$db,$h,$userid; $m=$db->query("SELECT * FROM proposals WHERE proPROPOSED=".abs(intval($ir['userid'])).""); if ($db->num_rows($m)==0) { die("Nobody has proposed to you! <a href=index.php>> Back</a>"); } else { $pro=$db->fetch_row($m); $f=$db->query("SELECT * FROM users WHERE userid=".abs(intval($pro['proPROPOSER'])).""); $r=$db->fetch_row($f); print"<h3>Decision Center</h3> <center><table width=90% cellspacing=1 class=table border=1 bordercolor=#636363></center><tr><td> Proposer: [url='viewuser.php?u=".abs(intval($r[']".htmlentities($r['username'])."[/url] </td> <td>Message: {$pro['proMESSAGE']} </td> <td>Decision: [url='marriage.php?action=accept&pro=".abs(intval($pro[']<font color=green>Accept</font>[/url] or [url='marriage.php?action=decline&pro=".abs(intval($pro[']<font color=red>Decline</font>[/url]</td></tr></table>"; } } function accept() { global $ir,$userid,$db,$h; if ($r['married'] != 0) { die("This person is already married. Sorry. Try someone else."); } if($ir['married'] != 0) { print "You are already married"; $h->endpage(); exit(); } $m=$db->query("SELECT * FROM proposals WHERE (`proID` = ".abs(intval($_GET['pro'])).") AND (`proPROPOSED` = $userid)"); if(!mysql_num_rows($m)) { echo ('You\'ve clicked an invalid link, please report to an administrator.'); $h->endpage(); exit(); } else { $m=$db->query("SELECT * FROM proposals WHERE proID=".abs(intval($_GET['pro']))." AND proPROPOSED=$userid"); $pro=$db->fetch_row($m); $db->query("UPDATE `users` SET `married` =".abs(intval($pro['proPROPOSER']))." WHERE (`userid` = $userid)"); $db->query("UPDATE `users` SET `married` =".abs(intval($pro['proPROPOSED']))." WHERE (`userid` = ".abs(intval($pro['proPROPOSER'])).")"); $db->query("DELETE FROM proposals WHERE (proID=".abs(intval($pro['proID'])).")"); $mr=$db->query("SELECT * FROM `users` WHERE (`userid` =".abs(intval($pro['proPROPOSER'])).")"); $par=$db->fetch_row($mr); event_add($par['userid'],"Your proposal for [url='viewuser.php?u=".abs(intval($ir[']".htmlentities($ir['username'])."[/url] was accepted",$c); print "You married ".htmlentities($par['username'])." !!! "; } } function decline() { global $ir,$userid,$db,$h; $_GET['pro'] = isset($_GET['pro']) && is_numeric($_GET['pro']) ? abs(@intval($_GET['pro'])) : false; if(!$_GET['pro']) { die("Stop abusing our marriage system!"); } $m=$db->query("SELECT * FROM proposals WHERE proID=".abs(intval($_GET['pro']))." AND proPROPOSED=$userid"); if ($db->num_rows($m) == 0) { print "Invalid proposal or this is not your proposal"; } else { $pro=$db->fetch_row($m); $db->query("DELETE FROM proposals WHERE proID=".abs(intval($pro['proID'])).""); $mr=$db->query("SELECT * FROM users WHERE userid=".abs(intval($pro['proPROPOSER'])).""); $par=$db->fetch_row($mr); event_add($par['userid'],"".htmlentities($ir['username'])." [".abs(intval($ir['userid']))."] has declined your proposal",$c); print"You declined the proposal from ".htmlentities($par['username'])."! "; } } $h->endpage(); ?>   put this link on explore [url='marriage.php?action=index']Proposal Center[/url]   link should work perfectly. hope you like it. lol. NOTE: i modified it on my pc without testing it as i had to change some ".staffcolor($r['userid']." into ".htmlentities($r['username'])." and {$r['userid']} into ".abs(intval($r['userid']))." and so on... shouldnt of made it error, but if you do have any problems please contact me :)
  25. lmao... well thats highly upto you tho if you use it or not. its just a simple modification that someone might use in the future. lol.
×
×
  • Create New...