gurpreet Posted October 29, 2011 Share Posted October 29, 2011 Hi again guys, I'm currently making a house tax mod from scratch and I'm going to make it quite complex (well I think it is). The house tax is 0.5 percent of the house buy price. So far I got the day cron for it, and if they can't pay it off, (checks money in hand, and all banks in case they try to be clever and hide it) the tax amount gets inserted into a field called 'taxowed' in the users table. If their taxowed is greater than 1 then they can go to a page called paytax.php, which I've made and works perfectly. However I'm not sure what the most efficient way of going about the next step is. What I want to do is that once thier taxowed reaches the value of their house, their house will get repossessed (inserted into a new table?). And if they can pay this back, they get the house back. If not, then certain gameplay features will get taken away (games centre, attacking etc) and maybe later certain item types. So what I'm basically asking is what would be the best way to do the repossession feature? Would I make a new table and do a check in the daily cron, and if their tax hits the value of their house they lose their house? Thanks for your time Quote Link to comment Share on other sites More sharing options...
Dominion Posted October 29, 2011 Share Posted October 29, 2011 Blocking game features could annoy users. My suggestion would be only take the house when their debt is at 75% of the homes value; the 25% left goes back into the players bank. If they wish to keep their home, and maybe take out a loan in game they need to place items as payment (so they have a reason to want to pay it off). How often do you plan on calling the debt value up? If the amount owed is going to be called on every page load (so like a players money is in order to show it) the users table would be fine, otherwise if it's only called when they plan to pay it or in the cron it's own table would be a better call. You can also use it for any future tax records if you plan on adding more taxes (e.g. gun tax). Quote Link to comment Share on other sites More sharing options...
gurpreet Posted October 29, 2011 Author Share Posted October 29, 2011 Alright, I'll use the system you have explained. That is much better than what I thought of lol. I call the debt value on the index page (an if statement to check if they do owe anything) and on the page where they pay off their tax. Also I will be adding more taxes later on, for more expensive items and maybe even much more complicated systems later on. Would you suggest creating a new table as it's only called on 2 pages (and the loggedin page)? Quote Link to comment Share on other sites More sharing options...
Dominion Posted October 29, 2011 Share Posted October 29, 2011 Would you suggest creating a new table as it's only called on 2 pages (and the loggedin page)? Yes, otherwise the amount owed is called on every page. That aside adding a "Tax" table would allow you to add the house tax, and any other tax you want to add later on without adding massive amounts of data to an already large user table. You say a tax for more expensive items so something like VAT? That would just come off when they buy it or do you plan on storing things like that for a later payment? 1 Quote Link to comment Share on other sites More sharing options...
gurpreet Posted October 29, 2011 Author Share Posted October 29, 2011 (edited) Alright thanks, I'm going to leave the house tax in the houses table because I don't have many columns in there, and changing that would be a lot of work and put the repossession in another table. I mean like an upkeep, for example when you have an employee you pay them wages, but in a different sense. Not sure how I would apply the concept, but the concept behind it would probably be you have to pay the upkeep to make sure that your weapon doesn't get damaged (but it's daily so they don't do anything). The more expensive items they have, the more upkeep they will have. This will help to keep the number of items down, and inflation down a lot. Perhaps I might include certain donator items so they don't pay upkeep for a few days, and donator items have no upkeep. EDIT: Not sure what would be the best way to link the tables and such together. Would this be good or is there an easier way?: Creating a table called 'tax' with taxID (auto_increment), taxowed and userid. This table would be only for reposessions. In the day cron add an if statement so that if their tax amounts to 75% of their house, it will get put into the 'tax' table and the user will lose their house. Once they have paid off their tax completely, they will regain their house. EDIT 2: Got it all working properly, thanks to Dominion for all his help. Edited October 30, 2011 by gurpreet 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.