SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 19/12/2015, 11:27 PM   #1
rootcause
Big Clucker
 
rootcause's Avatar
 
Join Date: Feb 2015
Location: /
Posts: 114
Reputation: 197
Default Yet Another Business System

Because I'm very creative when it comes to names.




Features

Dynamic Businesses: You can create businesses in-game and edit/remove them.

Resetting: If a business owner doesn't visit their business in 7 days, they'll lose it. You can configure how many days it takes to reset a business from BUSINESS_DAYS define.

Business Safe: You can deposit your money in the business's safe or take it whenever you want. You can give other players permissions if you want them to use your business's safe.

Permissions: You can give permissions to other players. Permissions allow other players to deposit or take money from your business's safe.

Safe Logs: You can check your safe logs to see who deposited how much money or took how much money from your business. If they're stealing from you, don't be afraid to remove their permissions! Won't bring back the stolen money, though.

Business Selling: You have a business you don't want anymore? You can instantly sell it (boring), or you can put it on sale so other players can buy it for the price you want. This works even if you're offline. Simply if someone buys your business when you're offline, you'll get your money when you join the server.

Business Limit: You can decide how many businesses a player can own by using LIMIT_PER_PLAYER define. If you set it to 0, players can buy any business they want. If you set it to something else, players won't be able to buy more businesses than LIMIT_PER_PLAYER's value. This is added to prevent abusive players buying all the businesses, then putting them on sale for a higher price.

Screenshots








Commands

/business: Opens the business management menu, options you're not allowed to do will be red.

RCON Only:

/createbusiness [price] [earning] [type] - Creates a business on your position.

/gotobusiness [business id] - Teleports you to the business you specified ID of.

/setbusinessprice [business id] [new price] - Sets a business's price to the new price.

/setbusinessearning [business id] [new earning] - Sets a business's earning to the new earning.

/setbusinesstype [business id] [type (optional)] - Sets a business's type to the new type. If you leave the type parameter empty you'll get a dialog which lists all business types.

/resetbusiness [business id] - Resets the business you specified ID of.

/deletebusiness [business id] - Deletes the business you specified ID of.

Notes

MySQL: This filterscript needs a MySQL database to work. The .sql file is not included in the download link because required tables will get created if they don't exist on initialization.

About Interiors: The exit position may look awkward when you go inside a business because I took the interior coordinates from here so you might want to change them. You can do that from BusinessInteriors array starting at line 95, or you can add new interiors/business types from there.

Downloads

__________________
All Releases | YouTube

Last edited by rootcause; 05/07/2016 at 06:02 PM. Reason: videos re-added
rootcause is offline   Reply With Quote
Old 19/12/2015, 11:28 PM   #2
maraz1987
Little Clucker
 
Join Date: Jun 2013
Posts: 32
Reputation: 5
Default Re: Yet Another Business System

efso olmuş krdş
maraz1987 is offline   Reply With Quote
Old 20/12/2015, 01:32 AM   #3
benjaminjones
Huge Clucker
 
Join Date: Sep 2012
Posts: 452
Reputation: 80
Default Re: Yet Another Business System

Looks really good! You should've added the /buy command with things to purchase though.
benjaminjones is offline   Reply With Quote
Old 20/12/2015, 07:46 AM   #4
Deniz1467
Little Clucker
 
Deniz1467's Avatar
 
Join Date: Aug 2012
Location: Republic of Turkey
Posts: 38
Reputation: 3
Default Re: Yet Another Business System

helal krdş
Deniz1467 is offline   Reply With Quote
Old 20/12/2015, 09:30 AM   #5
Ritzy2K
High-roller
 
Ritzy2K's Avatar
 
Join Date: Jun 2014
Location: India
Posts: 1,548
Reputation: 170
Default Re: Yet Another Business System

Yet Another House System
Yet Another Business Sysem
DDDDDD Good Job!
Hereby have my rep.
__________________
Ritzy2K is offline   Reply With Quote
Old 20/12/2015, 09:50 AM   #6
Elegy
Banned
 
Join Date: Dec 2015
Location: Girl Friend House
Posts: 169
Reputation: 3
Default Re: Yet Another Business System

Nice. +1 wanna rep ur job
PHP Code:
I not spammer. And post hunter 
Elegy is offline   Reply With Quote
Old 20/12/2015, 11:00 AM   #7
rootcause
Big Clucker
 
rootcause's Avatar
 
Join Date: Feb 2015
Location: /
Posts: 114
Reputation: 197
Default Re: Yet Another Business System

Quote:
Originally Posted by benjaminjones View Post
Looks really good! You should've added the /buy command with things to purchase though.
I was going to do it that way, but I couldn't think of anything that you can buy from businesses except armor and health refills, maybe weapons. If you have any ideas about what to sell, I may do a /buy version.
__________________
All Releases | YouTube
rootcause is offline   Reply With Quote
Old 20/12/2015, 11:48 AM   #8
SecretBoss
Gangsta
 
SecretBoss's Avatar
 
Join Date: Dec 2014
Location: Greece
Posts: 808
Reputation: 103
Default Re: Yet Another Business System

Why it doesn't update the owner? Whenever I buy a business and close the server business, doesn't seem to get updated

I made a command to test if the function is loading command is the following

Code:
CMD:savebusiness(playerid, params[])
{
	LevelCheck(playerid, 5);
	foreach(new i : Business)
	    Business_Save(i);
	Server(playerid, "Businesses saved.");
	return 1;
}
Whenever this command is called businesses are saving but when

Code:
	foreach(new i : Business)
	    Business_Save(i);
is called on "OnFilterScriptExit" callback it doesn't work, I can't really understand what's the problem, logs printing nothing I also tried CallLocalFunction but it didn't work

Last edited by SecretBoss; 20/12/2015 at 12:53 PM.
SecretBoss is offline   Reply With Quote
Old 21/12/2015, 11:16 PM   #9
saffierr
High-roller
 
saffierr's Avatar
 
Join Date: Jul 2013
Location: GetPlayerGirlHouse(targetplayer);
Posts: 1,149
Reputation: 39
Default Re: Yet Another Business System

Really astonishing, really really nice.
Well done, repped.
saffierr is offline   Reply With Quote
Old 21/12/2015, 11:33 PM   #10
rootcause
Big Clucker
 
rootcause's Avatar
 
Join Date: Feb 2015
Location: /
Posts: 114
Reputation: 197
Default Re: Yet Another Business System

Quote:
Originally Posted by SecretBoss View Post
Why it doesn't update the owner? Whenever I buy a business and close the server business, doesn't seem to get updated

I made a command to test if the function is loading command is the following

Code:
-snip-
Whenever this command is called businesses are saving but when

Code:
-snip-
is called on "OnFilterScriptExit" callback it doesn't work, I can't really understand what's the problem, logs printing nothing I also tried CallLocalFunction but it didn't work
How do you close the server? I always write exit to the console and everything gets saved.

If you don't use exit command, OnGameModeExit and OnFilterScriptExit for loaded filterscripts won't get called if I remember correctly.
__________________
All Releases | YouTube
rootcause is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Business System FaZeRs Scripting Help 4 02/02/2014 07:27 PM
Business System Davman Scripting Help 0 28/04/2012 02:57 PM
Business System Vertical-Roleplay Scripting Help 2 20/04/2012 07:17 AM
Business system maxas Help Archive 6 10/12/2010 04:08 PM
Business System? Luis_Leone Help Archive 2 01/08/2010 10:58 PM


All times are GMT. The time now is 01:41 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.