[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
#2

Nice release
Reply
#3

Good Job
Reply
#4

Nice
Reply
#5

AWESOM
Reply
#6

Good Job man nice [fs] Keep it up
Reply
#7

Thanks
Reply
#8

english version ?
Reply
#9

Ti consiglierei perт di fare le screen quando hai i testi in inglese. forse и meglio XD! (almeno qui in sa-mp forum. in forum ITALIANI allora fa pure ma qui и meglio se fain tutto in inglese)
Reply
#10

Quote:
Originally Posted by benedek
View Post
english version ?
The english and italian version are in the same SOURCE. you have to define 'ENGLISH' or 'ITALIAN'.

if you do:

pawn Code:
#define LANGUAGE ENGLISH
The compiler will compile only the english piece.

Otherwise:

pawn Code:
#define LANGUAGE ITALIAN
Will compile the .amx file in italian.

Quote:
Originally Posted by [ZFM]Zuc
View Post
Ti consiglierei perт di fare le screen quando hai i testi in inglese. forse и meglio XD! (almeno qui in sa-mp forum. in forum ITALIANI allora fa pure ma qui и meglio se fai tutto in inglese)
Gli screenshots gli avevo fatti prima della versione in inglese, e mi rompevo a rifarli...
Reply
#11

Uhm ye i've got something in my Gamemode that's wrong but don't lnow what why i don't lose money with filterscripts do you know why ??
Reply
#12

Good work
Reply
#13

Good Work.
Reply
#14

Quote:
Originally Posted by Jason010
View Post
Uhm ye i've got something in my Gamemode that's wrong but don't lnow what why i don't lose money with filterscripts do you know why ??
I think is your OnDialogResponse... Try to return it 0.

------


Thanks for the comments
Reply
#15

New big and important update. Check the new download page.
Reply
#16

nice work i like i hope this workes cuz i tryd gar house and gar object editer the gar object editer can only create object and cant rotate objects the house 1 didnt even work so thanks for this if it works and PS (gar can suck it)
Reply
#17

Nice work dude
Reply
#18

Thankyou
Reply
#19

for me , this is the best so far
Reply
#20

can u make one with car slots and a car system plz the i will use it apart from that NICE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)