benlakaz Posted July 20, 2009 Share Posted July 20, 2009 This is just a simple mod that will allow user to travel only if they have passport in their inventory. Better to use phpmyadmin in creating items to assign 800 as itemID of passport 1.)Create Itemtype name it MISC 2.)Create Item in phpmyadmin then make the itemID "800" and itemTypeID equal to the number of ID of MISC.. 3.)Put your description. "For travelling".. 4.)Edit monorail.php At the top page look for: <?php include "globals.php"; Then add below: $q2=mysql_query("SELECT * FROM inventory WHERE inv_itemid='800'",$c); if(mysql_num_rows($q2)) { Look at bottom page for: $h->endpage(); ?> Before that add: } else {die ("Get Passport First Before you can Travel");} 5.)Now its up to you how will the user get a passport. Quote Link to comment Share on other sites More sharing options...
Strats Posted July 20, 2009 Share Posted July 20, 2009 Re: Passport Mod (just a simple mod) Been done a few times. Quote Link to comment Share on other sites More sharing options...
EpicFuse Posted July 20, 2009 Share Posted July 20, 2009 Re: Passport Mod (just a simple mod) Tbh i really like this mod nice and simple for a learner btw how would i add something so you have to be a certainb level to by the passport? btw +1 :-D Quote Link to comment Share on other sites More sharing options...
Guest Sniko` Posted July 21, 2009 Share Posted July 21, 2009 Re: Passport Mod (just a simple mod) Spydre452 did a different version where you buy one and it makes your passport field in the database to be 1, then you have a passport But anyway +1 Quote Link to comment Share on other sites More sharing options...
Eruondo Posted July 21, 2009 Share Posted July 21, 2009 Re: Passport Mod (just a simple mod) Tbh i really like this mod nice and simple for a learner btw how would i add something so you have to be a certainb level to by the passport? btw +1 :-D save this as buy_passport.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And then you just put up a link somewhere, (Like i like to out different shady charachters around my game, and make storylines with them.) Anyhows, just link to You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. or, you could replace in monorail.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. with You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Tell me if it works! Quote Link to comment Share on other sites More sharing options...
benlakaz Posted July 22, 2009 Author Share Posted July 22, 2009 Re: Passport Mod (just a simple mod) Just a few edit on this line $q2=mysql_query("SELECT * FROM inventory WHERE inv_itemid='800'",$c); this has a problem because if only 1 user has passport all users can travel without needing a passport so.. replace it with $q2=mysql_query("SELECT * FROM inventory WHERE inv_itemid='800' AND inv_userid=$userid",$c); Quote Link to comment Share on other sites More sharing options...
Eruondo Posted July 22, 2009 Share Posted July 22, 2009 Re: Passport Mod (just a simple mod) Ah, yes ofcourse. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
EpicFuse Posted July 22, 2009 Share Posted July 22, 2009 Re: Passport Mod (just a simple mod) Parse error: syntax error, unexpected T_IF in /home/cityfuse/public_html/monorail.php on line 29 Quote Link to comment Share on other sites More sharing options...
Guest Sniko` Posted July 22, 2009 Share Posted July 22, 2009 Re: Passport Mod (just a simple mod) Parse error: syntax error, unexpected T_IF in /home/cityfuse/public_html/monorail.php on line 29 Post the file here, from lines 20 - 35 Quote Link to comment Share on other sites More sharing options...
EpicFuse Posted July 22, 2009 Share Posted July 22, 2009 Re: Passport Mod (just a simple mod) Parse error: syntax error, unexpected T_IF in /home/cityfuse/public_html/monorail.php on line 29 Post the file here, from lines 20 - 35 From line 20-35 :-) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Eruondo Posted July 23, 2009 Share Posted July 23, 2009 Re: Passport Mod (just a simple mod) Sorry, like this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Eruondo Posted July 23, 2009 Share Posted July 23, 2009 Re: Passport Mod (just a simple mod) Sorry, like this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.