[Include] S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features)
#1

Introduction

Hi all
How I have a house system I need business too Now he is here!

This business system is very useful (I think) because you create business with just one line, also there is a lot of functions and features! I decide to make this because new scripters can easy add business and they can learn a lot of with this include! I hope you will like it!



Features
  • Creating business with just one line!
  • 21 functions
  • 5 commands
  • 2 callbacks
  • Buying business, selling business, locking business, unlocking business, controling business...

Functions

pawn Код:
/*

 • Function: CreateBusiness(Float: EnterX, Float: EnterY, Float: EnterZ, Interior, Float: InteriorX, Float: InteriorY, Float: InteriorZ, Price, VirtualWorld, RentPrice)
 • Data storage: MySQL (G-Stylezzz's plugin)
 • Usage: Creating business, use this in OnGameModeInit or OnFilterScriptInit!
 • Parameters:
        EnterX, EnterY, EnterZ: Coordinates where you can enter business, also on that coordiantes will create pickup and 3D text!
        ExitX, ExitY, ExitZ: Coordinates where you can exit business, this coordinates are coordiantes of interior, you can find interiors on http://weedarr.wikidot.com/interior or https://sampwiki.blast.hk/wiki/InteriorIDs
        Interior: ID of interior you want, see the web page on the parameter above
        Price: Price for buying business
        VirtulWorld: Always increase this because if you have 2 same interior and player are in the (Example one is in his house, second is in his too) they will see themself, It will look that they have same house! (Bad explained :/)
 • Example: CreateBusiness(-2395.9585,-601.2695,132.6484, 3, 384.808624,173.804992,1008.382812, 7000, 0);

*/


/*

 • Function: GetBusinessUser(businessid)
 • Usage: Getting name of user of specific business!
 • Parameters:
        businessid: ID of business that you want to get user (owner)
 • Example: format(string, sizeof(string), "Business user of business id %d is %s", businessid, GetHouseUser(businessid));

*/


/*

 • Function: GetBusinessEnterPos(houseid)
 • Usage: Getting the enter position (XYZ) of specific business!
 • Parameters:
        businessid: ID of business that you want to get enter position
 • Example: format(string, sizeof(string), "Business enter XYZ of business id %d is %s", businessid, GetBusinessEnterPos(businessid));

*/


/*

  • Function: GetBusinessExitPos(houseid)
 • Usage: Getting the exit position (XYZ) of specific business!
 • Parameters:
        businessid: ID of business that you want to get exit position
 • Example: format(string, sizeof(string), "Business exit XYZ of business id %d is %s", businessid, GetBusinessExitPos(businessid));

*/


/*

 • Function: GetBusinessEnterX(businessid)
 • Usage: Getting the enter X position of specific business!
 • Parameters:
        businessid: ID of business that you want to get enter X position
 • Example: format(string, sizeof(string), "Business enter X of business id %d is %s", businessid, GetBusinessEnterX(businessid));

*/


/*

 • Function: GetBusinessEnterY(businessid)
 • Usage: Getting the enter Y position of specific business!
 • Parameters:
        businessid: ID of business that you want to get enter Y position
 • Example: format(string, sizeof(string), "Business enter Y of business id %d is %s", businessid, GetBusinessEnterY(businessid));

*/


/*

 • Function: GetBusinessEnterZ(businessid)
 • Usage: Getting the enter Z position of specific business!
 • Parameters:
        businessid: ID of business that you want to get enter Z position
 • Example: format(string, sizeof(string), "Business enter Z of business id %d is %s", businessid, GetBusinessEnterZ(businessid));

*/


/*

 • Function: GetBusinessExitX(businessid)
 • Usage: Getting the exit X position of specific business!
 • Parameters:
        businessid: ID of business that you want to get exit X position
 • Example: format(string, sizeof(string), "Business exit X of business id %d is %s", businessid, GetBusinessExitX(businessid));

*/


/*

 • Function: GetBusinessExitY(businessid)
 • Usage: Getting the exit Y position of specific business!
 • Parameters:
        businessid: ID of business that you want to get exit Y position
 • Example: format(string, sizeof(string), "Business exit Y of business id %d is %s", businessid, GetBusinessExitY(businessid));

*/


/*

 • Function: GetBusinessExitZ(businessid)
 • Usage: Getting the exit Z position of specific business!
 • Parameters:
        businessid: ID of business that you want to get exit Z position
 • Example: format(string, sizeof(string), "Business exit Z of business id %d is %s", businessid, GetBusinessExitZ(businessid));

*/


/*

 • Function: GetBusinessPrice(businessid)
 • Usage: Getting the price of specific business!
 • Parameters:
        businessid: ID of business that you want to get price
 • Example: format(string, sizeof(string), "Business price of business id %d is %s", businessid, GetBusinessPrice(businessid));

*/


/*

 • Function: GetBusinessInterior(businessid)
 • Usage: Getting the interior of specific business!
 • Parameters:
        businessid: ID of business that you want to get interior
 • Example: format(string, sizeof(string), "Business interior of business id %d is %s", businessid, GetBusinessInterior(businessid));

*/


/*

 • Function: GetBusinessVirtualWorld(businessid)
 • Usage: Getting the virtualworld of specific business!
 • Parameters:
        businessid: ID of business that you want to get virtualworld
 • Example: format(string, sizeof(string), "Business virtualworld of business id %d is %s", businessid, GetBusinessVirtualWorld(businessid));

*/


/*

 • Function: GetBusinessMoney(businessid)
 • Usage: Getting the money of specific business!
 • Parameters:
        businessid: ID of business that you want to get money
 • Example: format(string, sizeof(string), "Business money of business id %d is %s", businessid, GetBusinessMoney(businessid));

*/


/*

 • Function: GetTotalBusiness(businessid)
 • Usage: Getting the total business, use this in OnGameModeInit after all business!
 • Example: printf("Total business: %d", GetTotalBusiness());

*/


/*

 • Function: IsBusinessOwned(businessid)
 • Usage: Checking if is bussines owned of specific business!
 • Parameters:
        businessid: ID of business that you want to check if is owned
 • Example: if(IsBusinessOwned(businessid)) SendClientMessage(playerid, -1, "Business is owned!");
            else SendClientMessage(palyerid, -1, "Business is not owned!");

*/


/*

 • Function: IsBusinessLocked(businessid)
 • Usage: Checking if is business locked of specific business!
 • Parameters:
        businessid: ID of business that you want to check if is locked
 • Example: if(IsBusinessOwned(businessid)) SendClientMessage(playerid, -1, "Business is locked!");
            else SendClientMessage(palyerid, -1, "Business is not locked!");

*/


/*

 • Function: IsBusinessExist(businessid)
 • Usage: Checking if is exist of specific business!
 • Parameters:
        businessid: ID of business that you want to check if is exist
 • Example: if(IsBusinessExist(businessid)) SendClientMessage(playerid, -1, "Business exist!");
            else SendClientMessage(palyerid, -1, "Business doesn't exist!");

*/


/*

 • Function: IsPlayerBuyBusiness(playerid, businessid)
 • Usage: Checking if is player buyed business (used when you try to buy business but you already have house)!
 • Parameters:
        playerid: ID of player that you want preform check
        businessid: ID of business that you want to check if is player buy business
 • Example: if(IsPlayerBuyBusiness(playerid, businessid)) return SendClientMessage(playerid, -1, "You buy this business already!");
            else SendClientMessage(playerid, -1, "You didn't buy this business!");

*/


/*

 • Function: IsPlayerBuyBusiness(playerid, businessid)
 • Usage: Checking if is player buyed any business!
 • Parameters:
        playerid: ID of player that you want preform check
 • Example: if(IsPlayerBuyAnyBusiness(playerid)) return SendClientMessage(playerid, -1, "You buy any business already!");
            else SendClientMessage(playerid, -1, "You didn't buy any business!");

*/


/*

 • Function: IsPlayerBusinessOwner(playerid, businessid)
 • Usage: Checking if is player owner of specific business!
 • Parameters:
        playerid: ID of player that you want preform check
        businessid: ID of vusiness that you want to check if is player owner
 • Example: if(IsPlayerBusinessOwner(playerid, businessid)) return SendClientMessage(playerid, -1, "You are owner of the business!");
            else SendClientMessage(playerid, -1, "You are not owner of the business!");

*/

Commands

pawn Код:
/*

 • Command: /buyhouse
 • Processor: y_commands (YCMD)
 • Usage: Buying business (Player must be in range of business he want to buy!)

*/


/*

 • Command: /sellbusiness
 • Processor: y_commands (YCMD)
 • Usage: Selling business (Player must be in range of business he want to sell!)

*/


/*

 • Command: /lockbusiness
 • Processor: y_commands (YCMD)
 • Usage: Locking business (Player must be in range of his business to lock it!)

*/


/*

 • Command: /unlockbusiness
 • Processor: y_commands (YCMD)
 • Usage: Unlocking business (Player must be in range of his business to unlock it!)

*/


/*

 • Command: /businesscontrol
 • Processor: y_commands (YCMD)
 • Usage: Controling your business: lock business, unlock business, storing money in business, taking money from business (Player must be in his house to control it!)

*/

Callbacks

pawn Код:
/*

 • Callback: OnPlayerEnterBusiness(playerid, businessid)
 • Action: Called when player enter business!
 • Example: if(IsPlayerBusinessOwner(playerid, businessid) SendClientMessage(playerid, -1, "You entered your business!");

*/


/*

 • Callback: OnPlayerExitBusiness(playerid, businessid)
 • Action: Called when player exit business!
 • Example: if(IsPlayerBusinessOwner(playerid, businessid) SendClientMessage(playerid, -1, "You exited your business!");

*/

Necessary things

MySQL Plugin by G-Stylezz aka BlueG
y_hooks by ******
y_commands by ******
sscanf by ******
foreach by ******



Notes
  • There is no a lot of fetures like in house system because house system haves a lot of features, so maybe it would be little bad that you can rob house, rob business etc.
  • You can store just money in the business and every one hour you get 1000$ in your business!
    You can easily change price with #define BUSINES_PAYMENT!

Video

[ame]http://www.youtube.com/watch?v=HZCrdCtwsfI&feature=feedu[/ame]


Download

Pastebin (v1.0.0)


Mediafire (v1.0.0)


Solidfiles (v1.0.0)



Credits
  • System32 - Almost everything!
  • The Guy - Helped me a lot, thank you!
  • ****** - y_hooks, y_commands, sscanf & foreach!
  • G-Stylezz (BlueG) - MySQL plugin!
Reply


Messages In This Thread
S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 13.11.2011, 07:10
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by Kavinsky - 13.11.2011, 07:41
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by TomTroX - 13.11.2011, 07:57
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 13.11.2011, 08:01
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by Speed - 13.11.2011, 08:51
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 13.11.2011, 09:01
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by [LaTinb0y]...$ag3R - 13.11.2011, 14:01
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 13.11.2011, 14:04
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by [LaTinb0y]...$ag3R - 13.11.2011, 14:06
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by Astralis - 13.11.2011, 14:07
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 13.11.2011, 15:36
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by ChickenInDark - 13.11.2011, 16:51
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 13.11.2011, 19:48
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by ExTro - 13.11.2011, 19:54
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by MS:RP Mason - 14.11.2011, 06:40
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 14.11.2011, 07:30
AW: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by Mellnik - 29.02.2012, 14:43
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 29.02.2012, 18:20
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by Guitar - 29.02.2012, 19:29
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 29.02.2012, 20:07
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by STONEGOLD - 29.02.2012, 20:56
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by Spooky - 28.04.2012, 09:49
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 28.04.2012, 09:59
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by Spooky - 28.04.2012, 10:02
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 28.04.2012, 10:06
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by SpawneR - 30.04.2012, 17:57
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 30.04.2012, 20:51
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by Spooky - 01.05.2012, 07:29
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by zSuYaNw - 01.05.2012, 07:32
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 01.05.2012, 08:56
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by Just rp - 03.05.2012, 17:57
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by System64 - 03.05.2012, 18:13
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by iHaze. - 18.07.2012, 05:23
Respuesta: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by SantiagoValdivieso - 22.11.2012, 03:10
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by rashidkhoso37 - 29.07.2014, 09:27
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by Adarsh007 - 11.07.2015, 16:06
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by BenStar - 13.12.2017, 12:56
Re: S32_Business - Create business with just one line! (MySQL, YCMD, sscanf... A lot of functions & features) - by Xeon™ - 13.12.2017, 17:26

Forum Jump:


Users browsing this thread: 6 Guest(s)