Jump to content
MakeWebGames

Recommended Posts

Posted

So, the guards 'mod' just adds will to your house?

If so, why does it need 3 files and 6 SQL's? I'm pretty sure if you maybe added a switch() in estate.php you could do it? For example

 


switch($_GET['page'])
{
case "HouseGuards" : HouseGuards(); break;
default : index(); break;
}
function index() {
// Estate stuff
}
function HouseGuards() {
if((isset($_POST['Guard'])) && ctype_digit($_POST['Guard'])) 
{
$Price = 100 * $_POST['Guard'];
echo 'You bought '.number_format($_POST['Guard']).' for $'.number_format($Price).'';
}
echo 'Here you may buy guards for your house, enter an amount to buy below';

echo ' 
Amount: 


';
}
?>

 

Unless I'm completely miss-understood, however that is an idea.

Good job :) But a little more explanation should help :thumbsup:

Posted

well in the estate.php i have only edited the bits where it adds will on, cos say if you buy 10 guards then buy a new house it would of set your will, to the houses will, taking the will from the guards you bought off, so i changed that and i suppose the 3 files could be put in one however i would say the sequals are neccesary but i may be wrong, anyway it all works so i dont think it matters how many files the mods split into unless you have limited space or something. Plus it does a bit more than just add will on ,this could be a quite fun addon to a game and good building blocks for a great mod

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...