[FilterScript] Sasinosoft Houses: Dynamic House-Business System
#1

Warning
It may have problems running on SA-MP 0.3e.
I made this during SA-MP Server 0.3c.
DOWNLOAD THE NEW VERSION 2.0 for SA-MP 0.3e
https://sampforum.blast.hk/showthread.php?tid=405201

Description

This is a script with no commands to execute: It's only done with dialogs, and there are no client messages or game texts, but only message boxes.

You create the houses and stores with the functions.

The owner of a business can open/close, rename and sell it.
He automatically gets the setted money every 10 minutes.

The owner of a house can open/close and sell his house.
When he is in the house he can use the KEY_ENTER_PROPERTY to open the storage, and he can deposit weapons and money.

Main Functions

CreateHouse(houseid, Float:eX, Float:eY, Float:eZ, Float:iX, Float:iY, Float:iZ, BuyPrice, SellPrice, INT, VW)

Function: Creates a house.

Parameters:
-houseid: The ID of the house. Don't use 2 houses with the same ID
-Float:eX, eY, eZ: The exterior position of the house
-Float:iX, iY, iZ: The interior position of the house
-BuyPrice: The cost of the house
-SellPrice: The amount of money the owner gets when he sells the house
-INT: The interior of the house
-VW: The virtual world of the house

Returns:
-true(1): When the house already exists and successfully loaded
-null(-1): When the house didn't exists but successfully created
-false(0): When can't read a file(Won't be created)


CreateBusiness(bizid, defaultname[24], Float:eX, Float:eY, Float:eZ, Float:iX, Float:iY, Float:iZ, BuyPrice, SellPrice, Earn, INT, VW)

Function: Creates a business.

Parameters:
-bizid: The ID of the biz. Don't use 2 biz with the same ID
-defaultname[24]: The default name of your store (Max Lenght 23 letters)
-Float:eX, eY, eZ: The exterior position of the biz
-Float:iX, iY, iZ: The interior position of the biz
-BuyPrice: The cost of the biz
-SellPrice: The amount of money the owner gets when he sells the biz
-INT: The interior of the biz
-VW: The virtual world of the biz

Returns:
-true(1): When the biz already exists and successfully loaded
-null(-1): When the biz didn't exists but successfully created
-false(0): When can't read a file(Won't be created)

These were the 2 only functions you need to create a house or a store.
The other functions are explained in the script if you want to edit it.

Constants To Change

pawn Code:
#define MAX_HOUSES 100  //Change to your max amount of houses
#define MAX_BUSINESSES 100 //Change to your max amount of businesses
#define HOUSE_FILE "SasiHouses/Houses/HouseID%d.ini" //Don't remove %d.ini
#define BIZ_FILE "SasiHouses/Stores/BizID%d.ini" //Don't remove %d.ini
#define PRINT_HOUSES //Comment if you don't want the log of loaded houses
#define KEY_ENTER_PROPERTY KEY_WALK //Change this to the key you want. (Default Mouse Cen).
Screenshots





Uploaded with ImageShack.us

EDIT: Bugs

Yesterday I found a little bug, When you buy a store you earn money, but when you restart the server, the script doesn't read the key "Money" in the business file.

EDIT: FIXED.

Download

- Removed. Check version 2.0 https://sampforum.blast.hk/showthread.php?tid=405201

Credits

All the script: [GF]Sasino97
SII (Slick's ini include): [DRuG]Slick
Testing: [GF]Michi_Angel, [GF]Candy_Ale, [GF]Gianluca6
Reply


Messages In This Thread
Sasinosoft Houses: Dynamic House-Business System - by Sasino97 - 22.04.2011, 20:50
Re : Sasi-Houses: Advanced House-Store System - Based On Dialogs - by Naruto_Emilio - 22.04.2011, 20:53
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by ...:Lucian:... - 23.04.2011, 08:56
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by wheelman_WM - 23.04.2011, 08:57
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by Salsa - 23.04.2011, 09:02
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by BlackStones - 23.04.2011, 09:02
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by Sasino97 - 25.04.2011, 15:16
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by benedek - 25.04.2011, 20:19
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by [ZFM]Zuc - 25.04.2011, 21:03
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by Sasino97 - 27.04.2011, 11:31
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by Jason010 - 01.06.2011, 16:46
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by Sakhalin - 10.06.2011, 18:16
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by BlackG - 10.06.2011, 18:24
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by Sasino97 - 11.06.2011, 21:00
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by Sasino97 - 20.06.2011, 20:45
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by crowb14 - 12.07.2011, 23:15
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by Kingunit - 13.07.2011, 23:04
Re: Sasi-Houses: Advanced House-Store System - Based On Dialogs - by Sasino97 - 15.07.2011, 19:06
Re: Sasinosoft Houses: Dynamic House-Business System - by HuSs3n - 21.09.2011, 16:46
Re: Sasinosoft Houses: Dynamic House-Business System - by Zonoya - 21.09.2011, 16:51
Re: Sasinosoft Houses: Dynamic House-Business System - by Sasino97 - 27.07.2012, 17:14
Re: Sasinosoft Houses: Dynamic House-Business System - by Sanady - 27.07.2012, 17:37
Re: Sasinosoft Houses: Dynamic House-Business System - by Cassy_ - 02.09.2012, 04:36
Re: Sasinosoft Houses: Dynamic House-Business System - by Sasino97 - 03.09.2012, 21:16

Forum Jump:


Users browsing this thread: 1 Guest(s)