Jump to content
MakeWebGames

Recommended Posts

Posted

can someone make a mod for creating houses with a minimum level?

like say I have a trailor and it has a will of 150 and I want the minimum level to buy it at 15, can someone help with this?

Posted

@Ben Nash; That's not really 'starting him off' - Plus it's wrong.

I'm pretty sure there is a modification that does this around somewhere anyway although it won't be hard to make at all.

  • Like 1
Posted

First you would need to add a new field to the houses table to keep track of the level needed to buy each house.

Then you would use a small snippet of code very similar to what Ben Nash posted above..replacing "certainlevel" with the new field you added to the house table. This code would be placed in the estate.php script.

You will also need to edit the staff side or else you will get an error if you try to create a new house.

This one is pretty easy and anyone with a very basic understanding of PHP could accomplish this with ease.

Best of luck :)

Posted

IsaacP: If you have a go at doing this small modification (with the help above), and still don't succeed; post the coding you have here and we'll help you with it. :)

Posted
Ben is correct but has less than!!! under the buy function add

if ($ir['level'] > 15) {

echo"you need to be a certain level to create a house!";

}

There is NO need to add another field you guys make something simple complicated! :-D

If he is setting a level for each housing, he can just add... && then the house id field and the id number to the if statement.

What you're doing is overcomplicating things... If he has to add new code to the file every time he makes a new house, now that's over complicating things.

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