Own house system Help.
#1

Hey guys.
I am going to make my house system, but first, i need to know the following things:

1є- How to make the cmd /createhouse save the house Id's?
2є- How will that command know that the house id 1 is already created, so he needs to create the houseid 2?
3є- How will the house system knows who own a house?

Thank you. I want you to answer like this:

For the number 1, you need to use this, this and this....
Only the name of the things... Dini, arrays, these things.
Thank you in advance.
Reply
#2

The way I do it in mine is like this:

In my House Array, I have "Set" as one of the variables. It is either 1 or 0. In my loading function, if Set == 1, a global variable "Houses" is increased ( Houses++; ). Then in in /createhouse, you use Houses as the ID. For example:
pawn Код:
HouseInfo[Houses][Owner]
Just make sure you add one to Houses at the end of /createhouse to avoid overwriting an existing house.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)