Jump to content
MakeWebGames

Passport Mod (just a simple mod)


benlakaz

Recommended Posts

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.

Link to comment
Share on other sites

Guest Sniko`

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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);

Link to comment
Share on other sites

Guest Sniko`

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...