[FilterScript] [FS] C-House - Load, and Save houses through MySQL. Quick and Easy!
#1

- Hello everyone, i've been working on this system for a while now, and I think it's ready to be released now. The house system, loads and saves houses through MySQL. The house system also has a house ownership system.

Features
- Threaded querys for faster and more stable loading.
- 1 line one house structure!
- House locking system.
- Build up to 2000 houses, in a few minutes.

Information
- This information is in the top of the script.
pawn Код:
/*
*  @title C-House
*  @description - Build in the script /w MySQL loading.
*  @author Carlton
*
*  - This script is downloadable at the SA-MP forums.
*  - Selling this script or re-releasing it without my permission is not allowed
*
*  <-- Install guide -->
*  - Insert your D.B. info into the defines.
*  - Click compile.
*
*  <-- House adding -->
*  - Use the AddServerHouse function.
*
*  <--  Functions -->
*  - AddServerHouse(id, Float:X, Float:Y, Float:Z, Interior, Float:ExitX, Float:ExitY, Float:ExitZ, Price);
*
    + id - The house ID, don't duplicate house ids.
*  + Float:X - The X coordinate. >
*  + Float:Y - The Y coordinate. >> Entrance
*  + Float:Z - The Z coordinate. >
*  + Interior - The interior id for the house.
*  + Float:ExitX - The X coordinate. >
*  + Float:ExitY - The Y coordinate. >> Exit location
*  + Float:ExitZ - The Z coordinate. >
*  + Price - The price of the house.
*
*  - SaveHouse(houseid)
*  + houseid - The house id you wan't save.

*  <-- Support -- >
*  Enjoy the house system, post any questions in the topic.
*/
Example
- I've given you a example in the script.
pawn Код:
AddServerHouse(1, 1984.19,-1995.43,16.3322, 9, 315.856170,1024.496459,1949.797363, 9000);
Put all AddServerHouse functions in OnFilterScriptInit. Also, don't use id 0, I was unable to figure out why phpmyadmin won't let me start off as zero in auto-increment.

Commands
/enter - Enters the house.
/exit - Exits the house.
/housecommands - View the house commands.
/lockhouse - Locks the house if you own it.
/unlockhouse - Unlocks the house if you own it.
/changehouseprice - This is for rcon admins only. This changes the house price.
/buyhouse - Buy the house.
/sellhouse - Sell the house. If you own it.

Installation Information
- Make sure you change these settings so you can use the system.
pawn Код:
#define DB_HOST ""
#define DB_USER ""
#define DB_PASSWORD ""
#define DB_NAME ""
#define DB_TABLE_NAME "Houses"
I really suggest you keep DB_TABLE_NAME as Houses.

Table Structure
- Insert this table structure into your database manager.
Код:
CREATE TABLE IF NOT EXISTS `Houses` (
 `HouseID` int(11) NOT NULL auto_increment,
 `X` float NOT NULL,
 `Y` float NOT NULL,
 `Z` float NOT NULL,
 `Interior` int(11) NOT NULL,
 `ExitX` float NOT NULL,
 `ExitY` float NOT NULL,
 `ExitZ` float NOT NULL,
 `Price` int(11) NOT NULL,
 `Owner` text NOT NULL,
 `Locked` int(11) NOT NULL,
 PRIMARY KEY (`HouseID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
Download
- Enjoy, You also need G-StyleZzZ MySQL plugin to use this.
Reply


Messages In This Thread
[FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 31.03.2010, 14:15
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by [03]Garsino - 31.03.2010, 14:20
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 31.03.2010, 14:24
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Eazy_Efolife - 31.03.2010, 15:01
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Zh3r0 - 31.03.2010, 15:14
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 31.03.2010, 15:29
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by V1ceC1ty - 31.03.2010, 15:37
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 31.03.2010, 17:20
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Smokey619 - 31.03.2010, 17:56
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 31.03.2010, 17:59
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by [03]Garsino - 31.03.2010, 18:25
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 31.03.2010, 18:35
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by [03]Garsino - 31.03.2010, 19:03
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 31.03.2010, 19:14
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by swredder - 31.03.2010, 19:35
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 31.03.2010, 19:49
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by JPs_ - 31.03.2010, 19:52
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by swredder - 31.03.2010, 19:52
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 31.03.2010, 20:20
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Smokey619 - 31.03.2010, 23:49
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by swordx - 01.04.2010, 00:39
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 01.04.2010, 11:36
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by tony_montana1333 - 01.04.2010, 19:36
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 01.04.2010, 19:38
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by tony_montana1333 - 01.04.2010, 22:36
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Smokey619 - 02.04.2010, 00:01
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by billiout - 27.04.2010, 16:19
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 27.04.2010, 19:43
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by billiout - 27.04.2010, 19:57
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 27.04.2010, 19:58
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Y.T - 29.07.2010, 20:44
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Mujib - 29.07.2010, 20:50
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Y.T - 29.07.2010, 20:53
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Kar - 31.07.2010, 06:43
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Carlton - 31.07.2010, 13:52
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Toni - 06.08.2010, 14:59
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by [MKD]Max - 07.10.2010, 13:48
AW: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Kotomi - 20.11.2010, 18:53
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Pajashuvve - 01.01.2012, 16:14
Re: [FS] C-House - Load, and Save houses through MySQL. Quick and Easy! - by Ivica_Razor - 12.02.2013, 14:32

Forum Jump:


Users browsing this thread: 6 Guest(s)