IsaacP Posted December 17, 2011 Share Posted December 17, 2011 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? Quote Link to comment Share on other sites More sharing options...
Ben Nash Posted December 17, 2011 Share Posted December 17, 2011 I will start you off... if ($ir['level'] < certainlevel) { echo"you need to be a certain level to create a house!"; } Quote Link to comment Share on other sites More sharing options...
Newbie123 Posted December 17, 2011 Share Posted December 17, 2011 @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. 1 Quote Link to comment Share on other sites More sharing options...
Curt Posted December 17, 2011 Share Posted December 17, 2011 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 :) Quote Link to comment Share on other sites More sharing options...
Damagedcity.com Posted December 17, 2011 Share Posted December 17, 2011 First add a new field in the houses table ... then in estate.php add code somewhat wat bennash posted and in staff( create house) add a new text field and the text posted goes in db houses blah blah ..Thats it i guess :P Quote Link to comment Share on other sites More sharing options...
Maniak Posted December 17, 2011 Share Posted December 17, 2011 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. :) Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted December 19, 2011 Share Posted December 19, 2011 (edited) nevermind... Edited December 19, 2011 by lucky3809 Quote Link to comment Share on other sites More sharing options...
Newbie123 Posted December 19, 2011 Share Posted December 19, 2011 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. 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.