17.03.2018, 14:33
"How to create a house system" in a nutshell:
- Create an enum with the data per house
PHP код:enum MyHouseData
{
House_ID,
HouseOwner[25]
... //etc
}
- Create an array with the enum previously created
PHP код:#define MAX_HOUSES_ON_MY_SERVER 100
new MyHouses[MAX_HOUSES_ON_MY_SERVER][MyHouseData];
- Make a system for loading the houses
- Make a system for saving houses
- Make commands for changing the houses (i.e. /buythishouse /gotohouse etc)
- Test to see if everything is working as expected
- Enjoy