Jump to content
  • 0

ajutor sistem business


star69

Question

#define     MAX_BUSINESS        (100)
#define     MAX_BUSINESS_NAME	(32)    // maximum length of a business's name (default: 32)
#define     BUSINESS_INTERVAL   (30)    // give money to businesses every x minutes, also saves businesses (default: 30)
#define     BUSINESS_DAYS  		(7)     // if a business's owner doesn't visit their business after x days, it will get reset (default: 7)
#define     LIMIT_PER_PLAYER    (3)     // a player can buy up to x businesses - you can set this to 0 if you want it unlimited (default: 3)
#define     INVALID_BUSINESS    (-1)

enum    e_businessdialogs
{
	DIALOG_BUY_BUSINESS = 21500,
	DIALOG_BUY_BUSINESS_FROM_OWNER,
	DIALOG_MANAGE_BUSINESS,
	DIALOG_MANAGE_BUSINESS_NAME,
	DIALOG_MANAGE_BUSINESS_SAFE,
	DIALOG_MANAGE_DEPOSIT_TO_SAFE,
	DIALOG_MANAGE_TAKE_FROM_SAFE,
	DIALOG_MANAGE_SELL,
	DIALOG_MANAGE_SELL_TO_PLAYERS,
	DIALOG_MANAGE_PERMISSIONS,
	DIALOG_MANAGE_GIVE_PERM_NAME,
	DIALOG_MANAGE_GIVE_PERM_DEPOSIT,
    DIALOG_MANAGE_GIVE_PERM_TAKE,
    DIALOG_MANAGE_LIST_PERMS,
    DIALOG_MANAGE_EDIT_PERMS,
    DIALOG_MANAGE_SAFE_LOGS,
	DIALOG_ADMIN_BUSINESS_TYPE
}

enum    e_businessperms
{
 	PERM_CAN_USE_SAFE,
	PERM_CAN_DEPOSIT,
	PERM_CAN_TAKE
}

enum    e_business
{
	// saved
	bName[MAX_BUSINESS_NAME],
	Owner[MAX_PLAYER_NAME],
	Float: BusinessX,
	Float: BusinessY,
	Float: BusinessZ,
	Closed,
	Price,
	SalePrice,
	Earning,
	Money,
	Type,
	LastVisited,
	// not saved
	Text3D: BusinessLabel,
	BusinessPickup,
	bool: Save
}

enum    e_businessint
{
	InteriorName[32],
	Float: InteriorX,
	Float: InteriorY,
	Float: InteriorZ,
	InteriorID,
	ExitPickup,
	Text3D: ExitLabel
};

new
	BusinessData[MAX_BUSINESS][e_business],
	Iterator: Business<MAX_BUSINESS>;

new
	InBusiness[MAX_PLAYERS] = {INVALID_BUSINESS, ...};

new
	BusinessStates[2][16] = {"{2ECC71}Deschis", "{E74C3C}Inchis"},
	PermissionStates[2][16] = {"{E74C3C}Nu", "{2ECC71}Da"};

new
	BusinessInteriors[][e_businessint] = {
		{"24/7 1", -25.884498, -185.868988, 1003.546875, 17},
		{"24/7 2", 6.091179, -29.271898, 1003.549438, 10},
		{"24/7 3", -30.946699, -89.609596, 1003.546875, 18},
		{"24/7 4", -25.132598, -139.066986, 1003.546875, 16},
		{"24/7 5", -27.312299, -29.277599, 1003.557250, 4},
		{"24/7 6", -26.691598, -55.714897, 1003.546875, 6},
		{"Ammunation 1", 286.148986, -40.644397, 1001.515625, 1},
		{"Ammunation 2", 286.800994, -82.547599, 1001.515625, 4},
		{"Ammunation 3", 296.919982, -108.071998, 1001.515625, 6},
		{"Ammunation 4", 314.820983, -141.431991, 999.601562, 7},
		{"Ammunation 5", 316.524993, -167.706985, 999.593750, 6},
		{"Sex Shop", -103.559165, -24.225606, 1000.718750, 3},
		{"Binco", 207.737991, -109.019996, 1005.132812, 15},
		{"Didier Sachs", 204.332992, -166.694992, 1000.523437, 14},
		{"ProLaps", 207.054992, -138.804992, 1003.507812, 3},
		{"Sub Urban", 203.777999, -48.492397, 1001.804687, 1},
		{"Victim", 226.293991, -7.431529, 1002.210937, 5},
		{"Zip", 161.391006, -93.159156, 1001.804687, 18},
		{"Alhambra", 493.390991, -22.722799, 1000.679687, 17},
		{"Bar", 501.980987, -69.150199, 998.757812, 11},
		{"Burger Shot", 375.962463, -65.816848, 1001.507812, 10},
		{"Cluckin' Bell", 369.579528, -4.487294, 1001.858886, 9},
		{"Well Stacked Pizza", 373.825653, -117.270904, 1001.499511, 5},
		{"Strip Club", 1204.809936, -11.586799, 1000.921875, 2},
		{"Pleasure Domes", -2640.762939, 1406.682006, 906.460937, 3},
		{"Barber 1", 411.625976, -21.433298, 1001.804687, 2},
		{"Barber 2", 418.652984, -82.639793, 1001.804687, 3},
		{"Barber 3", 412.021972, -52.649898, 1001.898437, 12},
		{"Tatoo Parlour", -204.439987, -26.453998, 1002.273437, 16}
	};

Am acest sistem de afaceri

Vreau ca comanda /cumpara sa functioneze doar daca sunt in primele 6 tipuri de afaceri

Ma poate ajuta cineva?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.