SA-MP Forums Archive
[FilterScript] jHouse - a MySQL based, user friendly housing system! - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] jHouse - a MySQL based, user friendly housing system! (/showthread.php?tid=229781)



jHouse - a MySQL based, user friendly housing system! - jameskmonger - 22.02.2011

I made a very basic housing system today, I felt the need to contribute to the community.

I don't have SAMP on this computer so it hasn't been tested, but it has been thoroughly checked and should work (Although tell me if you see any bugs!)

jHouse
Instructions
Open up the script and READ the comments at the top. Make sure you follow them if they have instructions.
Compile the script.
Put the script in your filterscripts folder.
Add it to server.cfg.
Run!

Add-ons
You will need:
zcmd (put it in pawno/includes)
G-sTyLeZzZ's MySQL Plugin (Instructions in the thread)

In-game commands
House creation: /createhouse, /setprice
Entering and exiting: /enterhouse, /exithouse
Miscellaneous: /lockhouse, /buyhouse
(I've probably missed some but these are the needed ones.)

Creating a house
Go to the spot you want the exterior (the place they type /enterhouse) to be.
Type /createhouse exterior
Go to the spot you want them to be teleported to after they enter (the interior).
Type /createhouse inteior
Type /createhouse finish

Bugs/requests
I will fix any bugs (or atleast attempt) and will take all requests/suggestions into consideration.

Download(s)
Pastebin
If you want to make a mirror, just post it on the thread and I'll update it.

Enjoy the script, that's what it's there for!
- jameskmonger



Re: jHouse - a MySQL based, user friendly housing system! - jameskmonger - 22.02.2011

Oh and I forgot to say, reply if you liked it or didn't like it so I can get an idea of how worthy of my time this was.


Re: jHouse - a MySQL based, user friendly housing system! - Josh_Lotus - 22.02.2011

Very nice!


Re: jHouse - a MySQL based, user friendly housing system! - Rocketeer - 22.02.2011

Anyone tested this?


Re: jHouse - a MySQL based, user friendly housing system! - SloProKiller - 22.02.2011

Quote:

Creating a house
Go to the spot you want the exterior (the place they type /enterhouse) to be.
Type /createhouse exterior
Go to the spot you want them to be teleported to after they enter (the interior).
Type /createhouse exterior
Type /createhouse finish

I think that's a small typo


Re: jHouse - a MySQL based, user friendly housing system! - Rocketeer - 22.02.2011

You should create Virtual worlds


Re: jHouse - a MySQL based, user friendly housing system! - Rocketeer - 22.02.2011

Quote:

C:\Users\Andrew\Desktop\Untitled.pwn(279) : warning 213: tag mismatch
C:\Users\Andrew\Desktop\Untitled.pwn(280) : warning 213: tag mismatch
C:\Users\Andrew\Desktop\Untitled.pwn(281) : warning 213: tag mismatch
C:\Users\Andrew\Desktop\Untitled.pwn(282) : warning 213: tag mismatch
C:\Users\Andrew\Desktop\Untitled.pwn(283) : warning 213: tag mismatch
C:\Users\Andrew\Desktop\Untitled.pwn(284) : warning 213: tag mismatch
C:\Users\Andrew\Desktop\Untitled.pwn(316) : warning 213: tag mismatch

on these lines

Quote:

mysql_fetch_field_row(HD[i][exteriorX], "exteriorX");
mysql_fetch_field_row(HD[i][exteriorY], "exteriorY");
mysql_fetch_field_row(HD[i][exteriorZ], "exteriorZ");
mysql_fetch_field_row(HD[i][interiorX], "interiorX");
mysql_fetch_field_row(HD[i][interiorY], "interiorY");
mysql_fetch_field_row(HD[i][interiorZ], "interiorZ");

HD[houseID][interiorInt] = hinteriorInt;




Re: jHouse - a MySQL based, user friendly housing system! - jameskmonger - 22.02.2011

Yes, I am unsure how to fix that warning, if you would provide me with a fix I would be very happy.


Re: jHouse - a MySQL based, user friendly housing system! - jameskmonger - 22.02.2011

Alright I've fixed them all and the pastebin link has been updated - would you mind testing the script for me?


Re: jHouse - a MySQL based, user friendly housing system! - jameskmonger - 22.02.2011

Oh yes, all houses have their own virtual worlds by the way.