22.04.2011, 20:50
(
Last edited by Sasino97; 05/01/2013 at 08:15 PM.
)
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
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
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).
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