[FilterScript] Yet Another Business System
#1

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

Reply
#2

efso olmuş krdş
Reply
#3

Looks really good! You should've added the /buy command with things to purchase though.
Reply
#4

helal krdş
Reply
#5

Yet Another House System
Yet Another Business Sysem
DDDDDD Good Job!
Hereby have my rep.
Reply
#6

Nice. +1 wanna rep ur job
PHP код:
I not spammer. And post hunter 
Reply
#7

Quote:
Originally Posted by benjaminjones
Посмотреть сообщение
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.
Reply
#8

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

Код:
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

Код:
	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
Reply
#9

Quote:
Originally Posted by SecretBoss
Посмотреть сообщение
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

Код:
-snip-
Whenever this command is called businesses are saving but when

Код:
-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.
Reply
#10

Quote:
Originally Posted by rootcause
Посмотреть сообщение
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.
Yea you are right, but some people never use it, or gamemode will may crash some times I am not sure if ongamemodeexit is called there anyway, what will happen if someone using the same interiors on other scripts? You are creating a pickup and a label on interior without setting the virtual world so on every interior where player enters it will be the pickup. You can get business's id and sum it with a number to generate a different world for each business so players will never meet.
Reply
#11

Maybe you can make profit business. Like profit one week or one day. for next update
Reply
#12

Very nice bro thanks
Reply
#13

Good job, i like it, rep!
Reply
#14

Very nice rootcause, thank you
Reply
#15

I Love it!!
Reply
#16

Very good Filterscript, nice
Reply
#17

Very nice mate.
Reply
#18

Really like it, gonna use this one!
Reply
#19

Nice bro..
Epic for Roleplay !
Reply
#20

Nice. Next update please added command go home.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)