Own house system Help. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Own house system Help. (
/showthread.php?tid=260816)
Own house system Help. -
ricardo178 - 10.06.2011
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.
Re: Own house system Help. -
randomkid88 - 11.06.2011
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:
Just make sure you add one to Houses at the end of /createhouse to avoid overwriting an existing house.