Hey ive made this mod, my first :-)
please rate it out of 10, and some of you people might be thinking 'oh he changed another mod,' Jelously?
I DIDNT JUST CHANGE ANOTHER MOD, I WAS GOING TO SELL THIS BUT IM GIVING IT AWAY FOR FREE
for those who have helped me, thanks alot!
V2 ONLY SORRY V1 GUYS.
First made a file called: passport.php
<?php
//coded by spydre452
//created in 2008
//msn: [email]
[email protected][/email]
include "globals.php";
print "
<table width=70% background='http://www.rogerwendell.com/images/travel/passport_pages.jpg'>
<th height=10%>Personal Image</th><th height=10%>Personal Information</th><th></th>
<tr>
<td>
<center><font size=6><font color=black>Passport</font></font>
<font size=2><font color=black>[i]DOC Mode City[/i]<font></font>
</center>
[img={$ir[]
</td>
<td>
[b]<font color=black>Name:[/b] [i]{$ir['username']}[/i]
<hr>
[b]Identification:[/b] [i][{$ir['userid']}][/i]
<hr>
[b]Current Age:[/b] [i]{$ir['daysold']}[/i]
<hr></font>
</td>
<td>
<font color=black>[b]Gender:[/b] [i]Male/Female[/i]
</font></table>";
$h->endpage();
?>
Then enject this sql:
ALTER TABLE users ADD passport INT(11) defualt 0;
Create a file called:passportbuy.php
<?php
//coded by spydre452
//created in 2008
//msn: [email]
[email protected][/email]
include "globals.php";
if(!$_GET['spend'])
{
print "<h2>Welcome The 'Buyah-Passport'</h2>
You Need To Buy A Passport In Order To Travel
";
print "
<center><table width=70%>
<td>[url='passportbuy.php?spend=buy']Buy A Passport[/url]</td><tr>
<td>[url='passport.php?spend=view']View Your Passport[/url]</td></table></center>";
}
else
{
if($_GET['spend'] == 'buy')
{
if($ir['money'] <1000)
{
print "You don't have enough money to buy a passport you need $1,000!";
}
else
{
if($ir['money'] >1000)
{
print "Congratulations, you bought a passport for $1,000!
[url='monorail.php']Start Traveling[/url]";
$db->query("UPDATE users SET money=money-1000,passport=1 WHERE userid=$userid",$c);
}
else
{
if($ir['passport'] == 1)
{
print "You already have a passport...[[url='monorail.php']Travel[/url]]";
}
}
}
}
}
$h->endpage();
?>
Then Edit monorail.php or travel.php which ever one youve used.
<?php
//coded by spydre452
//created in 2008
//msn: [email]
[email protected][/email]
//file edited for mod
include "globals.php";
$_GET['to'] = abs((int) $_GET['to']);
if(!$_GET['to'])
{
if($ir['passport'] < 1)
{
die ("You haven't got a passport, other locations will class you as an illegal immigrant,[url='passportbuy.php']go and buy one.[/url]");
}
print "Welcome to the Monorail Station. It costs \$1000 for a ticket.
Where would you like to travel today?
";
$q=$db->query("SELECT * FROM cities WHERE cityid != {$ir['location']} AND cityminlevel <= {$ir['level']}");
print "<table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Name</th><th>Description</th><th>Min Level</th><th> </th></tr>";
while($r=$db->fetch_row($q))
{
print "<tr><td>{$r['cityname']}</td><td>{$r['citydesc']}</td><td>{$r['cityminlevel']}</td><td>[url='monorail.php?to={$r[']Go[/url]</td></tr>";
}
print "</table>";
}
else
{
if($ir['money'] < 1000)
{
print "You don't have enough money.";
}
else if( ((int) $_GET['to']) != $_GET['to'])
{
print "Invalid city ID";
}
else
{
$q=$db->query("SELECT * FROM cities WHERE cityid = {$_GET['to']} AND cityminlevel <= {$ir['level']}");
if(!$db->num_rows($q))
{
print "Error, this city either does not exist or you cannot go there.";
}
else
{
if($ir['passport'] == 0)
{
print "You currently don't have a passport, [url='passportbuy.php']click here to buy one[/url]";
}
else
{
$db->query("UPDATE users SET money=money-1000,location={$_GET['to']} WHERE userid=$userid");
$r=$db->fetch_row($q);
print "Congratulations, you paid \$1000 and travelled to {$r['cityname']} on the monorail!";
}
}
}
}
$h->endpage();
?>
Can be seen working at www.tech-wars.com
Then your done remember to comment and rate out of 10