22.09.2009, 20:54
(
Последний раз редактировалось Kalcor; 22.07.2010 в 10:58.
)
This house system uses dini and sscanf so make sure you include those files.
Houses
Creating a house is very simple and easy. All you do is stand at the position that you want to create a house and type /createhouse [House Price] [House level]. It will set the house to sellable and create a house icon on that postion.
To destroy a house is just as easy. Simply type in /destroyhouse [houseid] and you can retrieve the house id by going to the house icon and typing /houseinfo
All these commands can be done in game and will save the information to an ini file in the scriptfiles folder.
Other important infoCreating a house is very simple and easy. All you do is stand at the position that you want to create a house and type /createhouse [House Price] [House level]. It will set the house to sellable and create a house icon on that postion.
To destroy a house is just as easy. Simply type in /destroyhouse [houseid] and you can retrieve the house id by going to the house icon and typing /houseinfo
All these commands can be done in game and will save the information to an ini file in the scriptfiles folder.
In order to use all the commands you will need add this coding into your gamemode and save the players houseid to there files so you can detect if they are tenants.
These houses are set up a bit more complex than others you have seen before buts its a good thing. Every time you create a new house the virtual Id will increase by one for the next created house. So even if you go into the same house interior but at different locations you wont needs to worry about bumping into other people.
/evict
/tenants
/(un)renthouse
Can only be used if you integrate my system with your gamemode because it requires players ini file settings to be saves there.
Owner House Commands:
/(un)sellhouse, /(un)lockhouse, /rentprice, /tenants, /evict, /house (upgrade/downgrade)
Player House Command:
/houseinfo, /buyhouse, /(un)renthouse, /enter, /exit