Advertisement
Guest User

Business and Garages

a guest
Feb 6th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 54.45 KB | None | 0 0
  1. CMD:asellbiz(playerid, params[])
  2. {
  3.     if (PlayerInfo[playerid][pAdmin] >= 5 || PlayerInfo[playerid][pShopTech] == 1)
  4.     {
  5.         new playername[MAX_PLAYER_NAME];
  6.         GetPlayerName(playerid, playername, sizeof(playername));
  7.  
  8.         new string[128], bizid;
  9.         if(sscanf(params, "d", bizid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /asellbiz [bizid]");
  10.  
  11.         arrBusinessData[bizid][b_iLocked] = 1;
  12.  
  13.         arrBusinessData[bizid][b_iSafeMoney] = 0;
  14.         arrBusinessData[bizid][b_szOwner][0] = 0;
  15.         PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  16.         format(string, sizeof(string), "~w~You have sold business %d.", bizid);
  17.         GameTextForPlayer(playerid, string, 10000, 3);
  18.         SaveBusiness();
  19.         DestroyDynamicPickup(arrBusinessData[bizid][b_iPickupID]);
  20.         arrBusinessData[bizid][b_iPickupID] = CreateDynamicPickup(1239, 23, arrBusinessData[bizid][b_fExteriorPos][0], arrBusinessData[bizid][b_fExteriorPos][1], arrBusinessData[bizid][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  21.         format(string, sizeof(string), "{E8A831}This business is for sale for $%d!\n{33AA33}/buybiz to purchase.\nID: %d", arrBusinessData[bizid][b_iValue], bizid);
  22.         UpdateDynamic3DTextLabelText(arrBusinessData[bizid][b_tLabelID], COLOR_GREEN, string);
  23.         return 1;
  24.     }
  25.     else
  26.     {
  27.         SendClientMessageEx(playerid, COLOR_WHITE, "You are not authorized to use that command!");
  28.     }
  29.     return 1;
  30. }
  31.  
  32. CMD:asellgarage(playerid, params[])
  33. {
  34.     if (PlayerInfo[playerid][pAdmin] >= 5 || PlayerInfo[playerid][pShopTech] == 1)
  35.     {
  36.         new playername[MAX_PLAYER_NAME];
  37.         GetPlayerName(playerid, playername, sizeof(playername));
  38.  
  39.         new string[128], garageid;
  40.         if(sscanf(params, "d", garageid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /asellgarage [garageid]");
  41.  
  42.         arrGarage[garageid][b_iLocked] = 1;
  43.  
  44.         arrGarage[garageid][b_iSafeMoney] = 0;
  45.         arrGarage[garageid][b_szOwner][0] = 0;
  46.         PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  47.         format(string, sizeof(string), "~w~You have sold garage %d.", garageid);
  48.         GameTextForPlayer(playerid, string, 10000, 3);
  49.         SaveGarages();
  50.         DestroyDynamicPickup(arrGarage[garageid][b_iPickupID]);
  51.         arrGarage[garageid][b_iPickupID] = CreateDynamicPickup(1239, 23, arrGarage[garageid][b_fExteriorPos][0], arrGarage[garageid][b_fExteriorPos][1], arrGarage[garageid][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  52.         format(string, sizeof(string), "{E8A831}This garage is for sale for $%d!\n{33AA33}/buygarage to purchase.\nID: %d", arrGarage[garageid][b_iValue], garageid);
  53.         UpdateDynamic3DTextLabelText(arrGarage[garageid][b_tLabelID], COLOR_GREEN, string);
  54.         return 1;
  55.     }
  56.     else
  57.     {
  58.         SendClientMessageEx(playerid, COLOR_WHITE, "You are not authorized to use that command!");
  59.     }
  60.     return 1;
  61. }
  62. CMD:gotogarage(playerid, params[])
  63. {
  64.     if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pShopTech] == 1)
  65.     {
  66.         new garageid;
  67.         if(sscanf(params, "d", garageid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /gotogarage [bizid]");
  68.  
  69.         SetPlayerPos(playerid,arrGarage[garageid][b_fExteriorPos][0],arrGarage[garageid][b_fExteriorPos][1],arrGarage[garageid][b_fExteriorPos][2]);
  70.         GameTextForPlayer(playerid, "~w~Teleporting", 5000, 1);
  71.         SetPlayerInterior(playerid, 0);
  72.         PlayerInfo[playerid][pVW] = 0;
  73.     }
  74.     return 1;
  75. }
  76.  
  77. CMD:gotobiz(playerid, params[])
  78. {
  79.     if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pShopTech] == 1)
  80.     {
  81.         new bizid;
  82.         if(sscanf(params, "d", bizid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /gotobiz [bizid]");
  83.  
  84.         SetPlayerPos(playerid,arrBusinessData[bizid][b_fExteriorPos][0],arrBusinessData[bizid][b_fExteriorPos][1],arrBusinessData[bizid][b_fExteriorPos][2]);
  85.         GameTextForPlayer(playerid, "~w~Teleporting", 5000, 1);
  86.         SetPlayerInterior(playerid, 0);
  87.         PlayerInfo[playerid][pVW] = 0;
  88.     }
  89.     return 1;
  90. }
  91. CMD:garageedit(playerid, params[])
  92. {
  93.     if(PlayerInfo[playerid][pAdmin] < 5)
  94.     {
  95.         SendClientMessageEx(playerid, COLOR_WHITE, "You are not authorized to use that command!");
  96.         return 1;
  97.     }
  98.  
  99.     new string[128], choice[32], garageid, amount;
  100.     new lockedinfo[20];
  101.     if(arrGarage[garageid][b_iLocked] == 0)
  102.     { lockedinfo = "Open"; }
  103.     if(arrGarage[garageid][b_iLocked] == 1)
  104.     { lockedinfo = "Closed"; }
  105.     else { lockedinfo = "Open"; }
  106.  
  107.     if(sscanf(params, "s[32]dD(0)", choice, garageid, amount))
  108.     {
  109.         SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /garageedit [name] [garageid] [optional amount]");
  110.         SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Commands: Exterior | Interior | Vault | Price | Delete");
  111.         return 1;
  112.     }
  113.     else if(strcmp(choice, "exterior", true) == 0)
  114.     {
  115.         GetPlayerPos(playerid, arrGarage[garageid][b_fExteriorPos][0], arrGarage[garageid][b_fExteriorPos][1], arrGarage[garageid][b_fExteriorPos][2]);
  116.         GetPlayerFacingAngle(playerid, arrGarage[garageid][b_fExteriorPos][3]);
  117.         SendClientMessageEx( playerid, COLOR_WHITE, "You have changed the exterior for this garage!" );
  118.         DestroyDynamicPickup(arrGarage[garageid][b_iPickupID]);
  119.         SaveGarages();
  120.         if(isnull(arrGarage[garageid][b_szOwner]))
  121.         {
  122.             DestroyDynamicPickup(arrGarage[garageid][b_iPickupID]);
  123.             DestroyDynamic3DTextLabel(arrGarage[garageid][b_tLabelID]);
  124.             format(string, sizeof(string), "{E8A831}This garage is for sale for $%d!\n{33AA33}/buygarage to purchase.\nID: %d", arrGarage[garageid][b_iValue], garageid);
  125.             arrGarage[garageid][b_tLabelID] = CreateDynamic3DTextLabel(string, COLOR_GREEN, arrGarage[garageid][b_fExteriorPos][0], arrGarage[garageid][b_fExteriorPos][1], arrGarage[garageid][b_fExteriorPos][2]+0.5,30.0, .testlos = 1, .streamdistance = 30.0, .worldid = 0, .interiorid = 0);
  126.             arrGarage[garageid][b_iPickupID] = CreateDynamicPickup(1239, 23, arrGarage[garageid][b_fExteriorPos][0], arrGarage[garageid][b_fExteriorPos][1], arrGarage[garageid][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  127.             arrGarage[garageid][b_iInteriorID] = 1;
  128.             arrGarage[garageid][b_fInteriorPos][0] = 608.6995;
  129.             arrGarage[garageid][b_fInteriorPos][1] = -1.8454;
  130.             arrGarage[garageid][b_fInteriorPos][2] = 1001.2202;
  131.         }
  132.     }
  133.     if(strcmp(choice, "interior", true) == 0)
  134.     {
  135.         GetPlayerPos(playerid, arrGarage[garageid][b_fInteriorPos][0], arrGarage[garageid][b_fInteriorPos][1], arrGarage[garageid][b_fInteriorPos][2]);
  136.         GetPlayerFacingAngle(playerid, arrGarage[garageid][b_fInteriorPos][3]);
  137.         arrGarage[garageid][b_iInteriorID] = GetPlayerInterior(playerid);
  138.         SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the interior for the garage!");
  139.         SaveGarages();
  140.         return 1;
  141.     }
  142.     if(strcmp(choice, "vault", true) == 0)
  143.     {
  144.         arrGarage[garageid][b_iSafeMoney] = amount;
  145.         SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the vault amount for that business!" );
  146.         SaveBusiness();
  147.         return 1;
  148.     }
  149.     else if(strcmp(choice, "delete", true) == 0)
  150.     {
  151.         if(IsValidDynamicPickup(arrGarage[garageid][b_iPickupID])) DestroyDynamicPickup(arrGarage[garageid][b_iPickupID]);
  152.         DestroyDynamic3DTextLabel(arrGarage[garageid][b_tLabelID]);
  153.         arrGarage[garageid][b_fExteriorPos][0] = 0;
  154.         arrGarage[garageid][b_fExteriorPos][1] = 0;
  155.         arrGarage[garageid][b_fExteriorPos][2] = 0;
  156.         arrGarage[garageid][b_iPickupID] = 0;
  157.         arrGarage[garageid][b_fExteriorPos][3] = 0;
  158.         arrGarage[garageid][b_fInteriorPos][0] = 0;
  159.         arrGarage[garageid][b_fInteriorPos][1] = 0;
  160.         arrGarage[garageid][b_fInteriorPos][2] = 0;
  161.         arrGarage[garageid][b_fInteriorPos][3] = 0;
  162.         SaveGarages();
  163.         format(string, sizeof(string), "You have deleted Business %d.", garageid);
  164.         SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  165.     }
  166.     else if(strcmp(choice, "price", true) == 0)
  167.     {
  168.         arrGarage[garageid][b_iValue] = amount;
  169.         format(string, sizeof(string), "You have set the business's price to $%d.", amount);
  170.         SendClientMessageEx(playerid, COLOR_WHITE, string);
  171.         if(isnull(arrGarage[garageid][b_szOwner]))
  172.         {
  173.             format(string, sizeof(string), "{E8A831}This garage is for sale for $%d!\n{33AA33}/buygarage to purchase.\nID: %d", arrGarage[garageid][b_iValue], garageid);
  174.             UpdateDynamic3DTextLabelText(arrGarage[garageid][b_tLabelID], COLOR_GREEN, string);
  175.         }
  176.     }
  177.     if(isnull(arrGarage[garageid][b_szOwner]))
  178.     {
  179.         format(string, sizeof(string), "{E8A831}This Garage is for sale for $%d!\n{33AA33}/buygarage to purchase.\nID: %d", arrGarage[garageid][b_iValue], garageid);
  180.         UpdateDynamic3DTextLabelText(arrGarage[garageid][b_tLabelID], COLOR_GREEN, string);
  181.     }
  182.     return 1;
  183. }
  184.  
  185. CMD:bizedit(playerid, params[])
  186. {
  187.     if(PlayerInfo[playerid][pAdmin] < 5)
  188.     {
  189.         SendClientMessageEx(playerid, COLOR_WHITE, "You are not authorized to use that command!");
  190.         return 1;
  191.     }
  192.  
  193.     new string[128], choice[32], bizid, amount;
  194.     new lockedinfo[20];
  195.     if(arrBusinessData[bizid][b_iLocked] == 0)
  196.     { lockedinfo = "Open"; }
  197.     if(arrBusinessData[bizid][b_iLocked] == 1)
  198.     { lockedinfo = "Closed"; }
  199.     else { lockedinfo = "Open"; }
  200.  
  201.     if(sscanf(params, "s[32]dD(0)", choice, bizid, amount))
  202.     {
  203.         SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /bizedit [name] [bizid] [optional amount]");
  204.         SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Commands: Exterior | Interior | Vault | Type | Price | Delete | Supplies");
  205.         return 1;
  206.     }
  207.     else if(strcmp(choice, "exterior", true) == 0)
  208.     {
  209.         GetPlayerPos(playerid, arrBusinessData[bizid][b_fExteriorPos][0], arrBusinessData[bizid][b_fExteriorPos][1], arrBusinessData[bizid][b_fExteriorPos][2]);
  210.         GetPlayerFacingAngle(playerid, arrBusinessData[bizid][b_fExteriorPos][3]);
  211.         SendClientMessageEx( playerid, COLOR_WHITE, "You have changed the exterior for this business!" );
  212.         DestroyDynamicPickup(arrBusinessData[bizid][b_iPickupID]);
  213.         SaveBusiness();
  214.         if(isnull(arrBusinessData[bizid][b_szOwner]))
  215.         {
  216.             DestroyDynamicPickup(arrBusinessData[bizid][b_iPickupID]);
  217.             DestroyDynamic3DTextLabel(arrBusinessData[bizid][b_tLabelID]);
  218.             format(string, sizeof(string), "{E8A831}This business is for sale for $%d!\n{33AA33}/buybiz to purchase.\nID: %d", arrBusinessData[bizid][b_iValue], bizid);
  219.             arrBusinessData[bizid][b_tLabelID] = CreateDynamic3DTextLabel(string, COLOR_GREEN, arrBusinessData[bizid][b_fExteriorPos][0], arrBusinessData[bizid][b_fExteriorPos][1], arrBusinessData[bizid][b_fExteriorPos][2]+0.5,30.0, .testlos = 1, .streamdistance = 30.0, .worldid = 0, .interiorid = 0);
  220.             arrBusinessData[bizid][b_iPickupID] = CreateDynamicPickup(1239, 23, arrBusinessData[bizid][b_fExteriorPos][0], arrBusinessData[bizid][b_fExteriorPos][1], arrBusinessData[bizid][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  221.  
  222.         }
  223.     }
  224.     if(strcmp(choice, "interior", true) == 0)
  225.     {
  226.         GetPlayerPos(playerid, arrBusinessData[bizid][b_fInteriorPos][0], arrBusinessData[bizid][b_fInteriorPos][1], arrBusinessData[bizid][b_fInteriorPos][2]);
  227.         GetPlayerFacingAngle(playerid, arrBusinessData[bizid][b_fInteriorPos][3]);
  228.         arrBusinessData[bizid][b_iInteriorID] = GetPlayerInterior(playerid);
  229.         SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the interior for the business!");
  230.         SaveBusiness();
  231.         return 1;
  232.     }
  233.     if(strcmp(choice, "vault", true) == 0)
  234.     {
  235.         arrBusinessData[bizid][b_iSafeMoney] = amount;
  236.         SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the vault amount for that business!" );
  237.         SaveBusiness();
  238.         return 1;
  239.     }
  240.     if(strcmp(choice, "247", true) == 0)
  241.     {
  242.         if(isnull(arrBusinessData[bizid][b_szOwner]))
  243.         {
  244.             SendClientMessage(playerid, COLOR_WHITE, "The Business must have an owner before setting the type!");
  245.         }
  246.         else
  247.         {
  248.             arrBusinessData[bizid][b_iType] = 1;
  249.             arrBusinessData[bizid][b_iInteriorID] = 17;
  250.             arrBusinessData[bizid][b_fInteriorPos][0] = -25.8577;
  251.             arrBusinessData[bizid][b_fInteriorPos][1] = -187.6881;
  252.             arrBusinessData[bizid][b_fInteriorPos][2] = 1003.8469;
  253.            
  254.             SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the business to a 24/7 Store!" );
  255.             format(string, sizeof(string), "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(bizid), ((arrBusinessData[bizid][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[bizid][b_szOwner], bizid);
  256.             UpdateDynamic3DTextLabelText(arrBusinessData[bizid][b_tLabelID], COLOR_GREEN, string);
  257.             SaveBusiness();
  258.         }
  259.         return 1;
  260.     }
  261.     if(strcmp(choice, "gunstore", true) == 0)
  262.     {
  263.         if(isnull(arrBusinessData[bizid][b_szOwner]))
  264.         {
  265.             SendClientMessage(playerid, COLOR_WHITE, "The Business must have an owner before setting the type!");
  266.         }
  267.         else
  268.         {
  269.             arrBusinessData[bizid][b_iType] = 2;
  270.             arrBusinessData[bizid][b_iInteriorID] = 7;
  271.             arrBusinessData[bizid][b_fInteriorPos][0] = 315.7450;
  272.             arrBusinessData[bizid][b_fInteriorPos][1] = -143.1594;
  273.             arrBusinessData[bizid][b_fInteriorPos][2] = 999.6016;
  274.                
  275.             SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the business to a Gun Store!" );
  276.             format(string, sizeof(string), "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(bizid), ((arrBusinessData[bizid][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[bizid][b_szOwner], bizid);
  277.             UpdateDynamic3DTextLabelText(arrBusinessData[bizid][b_tLabelID], COLOR_GREEN, string);
  278.             SaveBusiness();
  279.         }
  280.         return 1;
  281.     }
  282.     if(strcmp(choice, "clotheshop", true) == 0)
  283.     {
  284.         if(isnull(arrBusinessData[bizid][b_szOwner]))
  285.         {
  286.             SendClientMessage(playerid, COLOR_WHITE, "The Business must have an owner before setting the type!");
  287.         }
  288.         else
  289.         {
  290.             arrBusinessData[bizid][b_iType] = 3;
  291.             arrBusinessData[bizid][b_iInteriorID] = 5;
  292.             arrBusinessData[bizid][b_fInteriorPos][0] = 226.2339;
  293.             arrBusinessData[bizid][b_fInteriorPos][1] = -8.1422;
  294.             arrBusinessData[bizid][b_fInteriorPos][2] = 1002.2109;
  295.            
  296.             SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the business to a Clothing Store!" );
  297.             format(string, sizeof(string), "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(bizid), ((arrBusinessData[bizid][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[bizid][b_szOwner], bizid);
  298.             UpdateDynamic3DTextLabelText(arrBusinessData[bizid][b_tLabelID], COLOR_GREEN, string);
  299.             SaveBusiness();
  300.         }
  301.         return 1;
  302.     }
  303.     if(strcmp(choice, "bar", true) == 0)
  304.     {
  305.         if(isnull(arrBusinessData[bizid][b_szOwner]))
  306.         {
  307.             SendClientMessage(playerid, COLOR_WHITE, "The Business must have an owner before setting the type!");
  308.         }
  309.         else
  310.         {
  311.             arrBusinessData[bizid][b_iType] = 4;
  312.             arrBusinessData[bizid][b_iInteriorID] = 11;
  313.             arrBusinessData[bizid][b_fInteriorPos][0] = 501.8307;
  314.             arrBusinessData[bizid][b_fInteriorPos][1] = -68.0945;
  315.             arrBusinessData[bizid][b_fInteriorPos][2] = 998.7578;
  316.  
  317.             SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the business to a Bar!" );
  318.             format(string, sizeof(string), "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(bizid), ((arrBusinessData[bizid][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[bizid][b_szOwner], bizid);
  319.             UpdateDynamic3DTextLabelText(arrBusinessData[bizid][b_tLabelID], COLOR_GREEN, string);
  320.             SaveBusiness();
  321.         }
  322.         return 1;
  323.     }
  324.     if(strcmp(choice, "electronicstore", true) == 0)
  325.     {
  326.         if(isnull(arrBusinessData[bizid][b_szOwner]))
  327.         {
  328.             SendClientMessage(playerid, COLOR_WHITE, "The Business must have an owner before setting the type!");
  329.         }
  330.         else
  331.         {
  332.             arrBusinessData[bizid][b_iType] = 5;
  333.             arrBusinessData[bizid][b_iInteriorID] = 6;
  334.             arrBusinessData[bizid][b_fInteriorPos][0] = -2240.468505;
  335.             arrBusinessData[bizid][b_fInteriorPos][1] = 137.060440;
  336.             arrBusinessData[bizid][b_fInteriorPos][2] = 1035.414062;
  337.  
  338.             SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the business to an Electronic Store!" );
  339.             format(string, sizeof(string), "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(bizid), ((arrBusinessData[bizid][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[bizid][b_szOwner], bizid);
  340.             UpdateDynamic3DTextLabelText(arrBusinessData[bizid][b_tLabelID], COLOR_GREEN, string);
  341.             SaveBusiness();
  342.         }
  343.         return 1;
  344.     }
  345.     if(strcmp(choice, "hotel", true) == 0)
  346.     {
  347.         if(isnull(arrBusinessData[bizid][b_szOwner]))
  348.         {
  349.             SendClientMessage(playerid, COLOR_WHITE, "The Business must have an owner before setting the type!");
  350.         }
  351.         else
  352.         {
  353.             arrBusinessData[bizid][b_iType] = 6;
  354.             arrBusinessData[bizid][b_iInteriorID] = 15;
  355.             arrBusinessData[bizid][b_fInteriorPos][0] = 2214.7585;
  356.             arrBusinessData[bizid][b_fInteriorPos][1] = -1150.5792;
  357.             arrBusinessData[bizid][b_fInteriorPos][2] = 1026.1969;
  358.  
  359.             SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the business to a Hotel!");
  360.             format(string, sizeof(string), "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(bizid), ((arrBusinessData[bizid][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[bizid][b_szOwner], bizid);
  361.             UpdateDynamic3DTextLabelText(arrBusinessData[bizid][b_tLabelID], COLOR_GREEN, string);
  362.             SaveBusiness();
  363.         }
  364.         return 1;
  365.     }
  366.     if(strcmp(choice, "restaurant", true) == 0)
  367.     {
  368.         if(isnull(arrBusinessData[bizid][b_szOwner]))
  369.         {
  370.             SendClientMessage(playerid, COLOR_WHITE, "The Business must have an owner before setting the type!");
  371.         }
  372.         else
  373.         {
  374.             arrBusinessData[bizid][b_iType] = 7;
  375.             arrBusinessData[bizid][b_iInteriorID] = 1;
  376.             arrBusinessData[bizid][b_fInteriorPos][0] = 453.5935;
  377.             arrBusinessData[bizid][b_fInteriorPos][1] = -18.2448;
  378.             arrBusinessData[bizid][b_fInteriorPos][2] = 1001.4328;
  379.  
  380.             SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the business to a Restaurant!");
  381.             format(string, sizeof(string), "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(bizid), ((arrBusinessData[bizid][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[bizid][b_szOwner], bizid);
  382.             UpdateDynamic3DTextLabelText(arrBusinessData[bizid][b_tLabelID], COLOR_GREEN, string);
  383.             SaveBusiness();
  384.         }
  385.         return 1;
  386.     }
  387.     if(strcmp(choice, "fastfood", true) == 0)
  388.     {
  389.         if(isnull(arrBusinessData[bizid][b_szOwner]))
  390.         {
  391.             SendClientMessage(playerid, COLOR_WHITE, "The Business must have an owner before setting the type!");
  392.         }
  393.         else
  394.         {
  395.             arrBusinessData[bizid][b_iType] = 8;
  396.             arrBusinessData[bizid][b_iInteriorID] = 10;
  397.             arrBusinessData[bizid][b_fInteriorPos][0] = 363.2538;
  398.             arrBusinessData[bizid][b_fInteriorPos][1] = -74.9876;
  399.             arrBusinessData[bizid][b_fInteriorPos][2] = 1001.7078;
  400.  
  401.             SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the business to a Fast Food Store!");
  402.             format(string, sizeof(string), "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(bizid), ((arrBusinessData[bizid][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[bizid][b_szOwner], bizid);
  403.             UpdateDynamic3DTextLabelText(arrBusinessData[bizid][b_tLabelID], COLOR_GREEN, string);
  404.             SaveBusiness();
  405.         }
  406.         return 1;
  407.     }
  408.     if(strcmp(choice, "type", true) == 0)
  409.     {
  410.         SendClientMessage(playerid, COLOR_WHITE, "There are 5 different types of businesses, they are listed below.");
  411.         SendClientMessage(playerid, COLOR_WHITE, "24/7 - Use /bizedit 247 [bizid] to set the bizid to a 24/7 Store.");
  412.         SendClientMessage(playerid, COLOR_WHITE, "Gun Shop - Use /bizedit gunstore [bizid] to set the bizid to a Gun Store.");
  413.         SendClientMessage(playerid, COLOR_WHITE, "Clothing Store - Use /bizedit clotheshop [bizid] to set the bizid to a Clothes Shop.");
  414.         SendClientMessage(playerid, COLOR_WHITE, "Bar - Use /bizedit bar [bizid] to set the bizid to a Bar.");
  415.         SendClientMessage(playerid, COLOR_WHITE, "Electronic Store - Use /bizedit electronicstore [bizid] to set the bizid to a Electronic Store.");
  416.         SendClientMessage(playerid, COLOR_WHITE, "Hotel - Use /bizedit hotel [bizid] to set the bizid to a Hotel.");
  417.         SendClientMessage(playerid, COLOR_WHITE, "Restaurant - Use /bizedit restaurant [bizid] to set the bizid to a Restaurant.");
  418.         SendClientMessage(playerid, COLOR_WHITE, "Fast Food Shack - Use /bizedit fastfood [bizid] to set the bizid to a Fast Food Shack.");
  419.         return 1;
  420.     }
  421.     else if(strcmp(choice, "delete", true) == 0)
  422.     {
  423.         if(IsValidDynamicPickup(arrBusinessData[bizid][b_iPickupID])) DestroyDynamicPickup(arrBusinessData[bizid][b_iPickupID]);
  424.         DestroyDynamic3DTextLabel(arrBusinessData[bizid][b_tLabelID]);
  425.         arrBusinessData[bizid][b_fExteriorPos][0] = 0;
  426.         arrBusinessData[bizid][b_fExteriorPos][1] = 0;
  427.         arrBusinessData[bizid][b_fExteriorPos][2] = 0;
  428.         arrBusinessData[bizid][b_iPickupID] = 0;
  429.         arrBusinessData[bizid][b_fExteriorPos][3] = 0;
  430.         arrBusinessData[bizid][b_fInteriorPos][0] = 0;
  431.         arrBusinessData[bizid][b_fInteriorPos][1] = 0;
  432.         arrBusinessData[bizid][b_fInteriorPos][2] = 0;
  433.         arrBusinessData[bizid][b_fInteriorPos][3] = 0;
  434.         SaveBusiness();
  435.         format(string, sizeof(string), "You have deleted Business %d.", bizid);
  436.         SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  437.     }
  438.     else if(strcmp(choice, "price", true) == 0)
  439.     {
  440.         arrBusinessData[bizid][b_iValue] = amount;
  441.         format(string, sizeof(string), "You have set the business's price to $%d.", amount);
  442.         SendClientMessageEx(playerid, COLOR_WHITE, string);
  443.         if(isnull(arrBusinessData[bizid][b_szOwner]))
  444.         {
  445.             format(string, sizeof(string), "{E8A831}This business is for sale for $%d!\n{33AA33}/buybiz to purchase.\nID: %d", arrBusinessData[bizid][b_iValue], bizid);
  446.             UpdateDynamic3DTextLabelText(arrBusinessData[bizid][b_tLabelID], COLOR_GREEN, string);
  447.         }
  448.     }
  449.     else if(strcmp(choice, "supplies", true) == 0)
  450.     {
  451.         format(string, sizeof(string), "You have changed that business's amount of supplies to %d.", amount);
  452.         SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  453.         arrBusinessData[bizid][b_iSupplies] = amount;
  454.     }
  455.     if(isnull(arrBusinessData[bizid][b_szOwner]))
  456.     {
  457.         format(string, sizeof(string), "{E8A831}This business is for sale for $%d!\n{33AA33}/buybiz to purchase.\nID: %d", arrBusinessData[bizid][b_iValue], bizid);
  458.         UpdateDynamic3DTextLabelText(arrBusinessData[bizid][b_tLabelID], COLOR_GREEN, string);
  459.     }
  460.     return 1;
  461. }
  462.  
  463. CMD:buybiz(playerid, params[]) {
  464.     new string[128];
  465.         new playername[MAX_PLAYER_NAME];
  466.     new sendername[MAX_PLAYER_NAME];
  467.     new Float:oldposx, Float:oldposy, Float:oldposz;
  468.     GetPlayerName(playerid, playername, sizeof(playername));
  469.     GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  470.     if(IsPlayerInRangeOfPoint(playerid, 100.0, 1109.0, 1537.0, 5.0) && PlayerInfo[playerid][pAdmin] < 2) {
  471.         SendClientMessage(playerid, COLOR_WHITE, "You cannot use this command in this area!");
  472.     }
  473.     else for(new b = 0; b < MAX_BUSINESSES; b++) if(IsPlayerInRangeOfPoint(playerid,2.0, arrBusinessData[b][b_fExteriorPos][0], arrBusinessData[b][b_fExteriorPos][1], arrBusinessData[b][b_fExteriorPos][2])) {
  474.         if(isnull(arrBusinessData[b][b_szOwner])) {
  475.             if(PlayerInfo[playerid][pCash] > arrBusinessData[b][b_iValue]) {
  476.            
  477.                 if(PlayerInfo[playerid][pPbizkey] == INVALID_BIZ_ID) {
  478.                     new
  479.                         szMessage[128];
  480.                    
  481.                     //-> They own the business! Just collect their name in b_szOwner to declare its ownership.
  482.                     GetPlayerName(playerid, arrBusinessData[b][b_szOwner], MAX_PLAYER_NAME);
  483.                     PlayerInfo[playerid][pPbizkey] = b;
  484.                     BizOwners++;
  485.                     GivePlayerCash(playerid, -arrBusinessData[b][b_iValue]);
  486.                     GameTextForPlayer(playerid, "~w~Congratulations!", 5000, 3);
  487.  
  488.                     SendClientMessageEx(playerid, COLOR_WHITE, "Congratulations on your new purchase!");
  489.                     SendClientMessageEx(playerid, COLOR_WHITE, "You can use /bizhelp to navigate your way!");
  490.                     arrBusinessData[playerid][b_iEmployeeRank] = 5;
  491.                     SaveUser(playerid);
  492.                    
  493.                     DestroyDynamicPickup(arrBusinessData[b][b_iPickupID]);
  494.                     arrBusinessData[b][b_iPickupID] = CreateDynamicPickup(1239, 23, arrBusinessData[b][b_fExteriorPos][0], arrBusinessData[b][b_fExteriorPos][1], arrBusinessData[b][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  495.                    
  496.                     format(szMessage, sizeof(szMessage), "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(b), ((arrBusinessData[b][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[b][b_szOwner], b);
  497.                     UpdateDynamic3DTextLabelText(arrBusinessData[b][b_tLabelID], COLOR_GREEN, szMessage);
  498.                     format(string, sizeof(string), "BUSINESS'S(biz1): %s has purchased business ID %i.", GetPlayerNameEx(playerid), b);
  499.                     Log("logs/transactions.log", string);
  500.                     return SaveBusiness();
  501.                 }
  502.                 if(PlayerInfo[playerid][pPbizkey2] == INVALID_BIZ_ID) {
  503.                     new
  504.                         szMessage[128];
  505.                    
  506.                     //-> They own the business! Just collect their name in b_szOwner to declare its ownership.
  507.                     GetPlayerName(playerid, arrBusinessData[b][b_szOwner], MAX_PLAYER_NAME);
  508.                     PlayerInfo[playerid][pPbizkey2] = b;
  509.                    
  510.                     GivePlayerCash(playerid, -arrBusinessData[b][b_iValue]);
  511.                     GameTextForPlayer(playerid, "~w~Congratulations!", 5000, 3);
  512.  
  513.                     SendClientMessageEx(playerid, COLOR_WHITE, "Congratulations on your new purchase!");
  514.                     arrBusinessData[playerid][b_iEmployee] = 5;
  515.                     SaveUser(playerid);
  516.                    
  517.                     DestroyDynamicPickup(arrBusinessData[b][b_iPickupID]);
  518.                     arrBusinessData[b][b_iPickupID] = CreateDynamicPickup(1239, 23, arrBusinessData[b][b_fExteriorPos][0], arrBusinessData[b][b_fExteriorPos][1], arrBusinessData[b][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  519.                    
  520.                     format(szMessage, sizeof(szMessage), "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(b), ((arrBusinessData[b][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[b][b_szOwner], b);
  521.                     UpdateDynamic3DTextLabelText(arrBusinessData[b][b_tLabelID], COLOR_GREEN, szMessage);
  522.                     format(string, sizeof(string), "BUSINESS'S(biz2): %s has purchased business ID %i.", GetPlayerNameEx(playerid), b);
  523.                     Log("logs/transactions.log", string);
  524.                     return SaveBusiness();
  525.                 }
  526.                 SendClientMessageEx(playerid, COLOR_LIGHTRED, "You already own two businesses!");
  527.             }
  528.             else SendClientMessageEx(playerid, COLOR_LIGHTRED, "You don't have the cash to buy this business!");
  529.         }
  530.         else SendClientMessageEx(playerid, COLOR_LIGHTRED, "This business is already owned!");
  531.     }
  532.     return 1;
  533. }
  534.  
  535. CMD:sellbiz(playerid, params[])
  536. {
  537.     new string[128];
  538.     new bizkey = PlayerInfo[playerid][pPbizkey];
  539.     new bizkey2 = PlayerInfo[playerid][pPbizkey2];
  540.  
  541.     if(bizkey == INVALID_BIZ_ID && bizkey2 == INVALID_BIZ_ID)
  542.     {
  543.         SendClientMessageEx(playerid, COLOR_WHITE, "You don't own a business!");
  544.         return 1;
  545.     }
  546.  
  547.     if(bizkey != INVALID_BIZ_ID && IsPlayerInRangeOfPoint(playerid, 4.0,arrBusinessData[bizkey][b_fExteriorPos][0],arrBusinessData[bizkey][b_fExteriorPos][1],arrBusinessData[bizkey][b_fExteriorPos][2]))
  548.     {
  549.         arrBusinessData[bizkey][b_iSafeMoney] = 0;
  550.         arrBusinessData[bizkey][b_iLocked] = 1;
  551.         arrBusinessData[bizkey][b_szOwner][0] = 0;
  552.         GivePlayerCash(playerid,arrBusinessData[bizkey][b_iValue]);
  553.         PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  554.         arrBusinessData[playerid][b_iEmployee] = -1;
  555.         arrBusinessData[playerid][b_iEmployeeRank] = 0;
  556.         format(string, sizeof(string), "~w~ You have sold your business for ~n~~g~$%d", arrBusinessData[bizkey][b_iValue]);
  557.         GameTextForPlayer(playerid, string, 4000, 3);
  558.         BizOwners--;
  559.         PlayerInfo[playerid][pPbizkey] = INVALID_BIZ_ID;
  560.         if(PlayerInfo[playerid][pVW] == bizkey+6000)
  561.         {
  562.             SetPlayerInterior(playerid,0);
  563.             SetPlayerPos(playerid,arrBusinessData[bizkey][b_fExteriorPos][0],arrBusinessData[bizkey][b_fExteriorPos][1],arrBusinessData[bizkey][b_fExteriorPos][2]);
  564.             PlayerInfo[playerid][pVW] = 0;
  565.             PlayerInfo[playerid][pPbizkey] = INVALID_BIZ_ID;
  566.         }
  567.         SaveBusiness();
  568.         SaveUser(playerid);
  569.         DestroyDynamicPickup(arrBusinessData[bizkey][b_iPickupID]);
  570.         arrBusinessData[bizkey][b_iPickupID] = CreateDynamicPickup(1239, 23, arrBusinessData[bizkey][b_fExteriorPos][0], arrBusinessData[bizkey][b_fExteriorPos][1], arrBusinessData[bizkey][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  571.         DestroyDynamic3DTextLabel(arrBusinessData[bizkey][b_tLabelID]);
  572.         format(string, sizeof(string), "{E8A831}This business is for sale for $%d!\n{33AA33}/buybiz to purchase.\nID: %d", arrBusinessData[bizkey][b_iValue], bizkey);
  573.         arrBusinessData[bizkey][b_tLabelID] = CreateDynamic3DTextLabel(string, COLOR_GREEN, arrBusinessData[bizkey][b_fExteriorPos][0], arrBusinessData[bizkey][b_fExteriorPos][1], arrBusinessData[bizkey][b_fExteriorPos][2]+0.5, 30.0, .testlos = 1, .streamdistance = 30.0, .worldid = 0, .interiorid = 0);
  574.         format(string, sizeof(string), "BUSINESS'S(biz1): %s has sold there business, business ID: %i.", GetPlayerNameEx(playerid), bizkey);
  575.         Log("logs/transactions.log", string);
  576.         return 1;
  577.     }
  578.     else if(bizkey2 != INVALID_BIZ_ID && IsPlayerInRangeOfPoint(playerid, 4.0,arrBusinessData[bizkey2][b_fExteriorPos][0],arrBusinessData[bizkey2][b_fExteriorPos][1],arrBusinessData[bizkey2][b_fExteriorPos][2]))
  579.     {
  580.         arrBusinessData[bizkey2][b_iSafeMoney] = 0;
  581.         arrBusinessData[bizkey2][b_iLocked] = 1;
  582.         arrBusinessData[bizkey2][b_szOwner][0] = 0;
  583.         GivePlayerCash(playerid,arrBusinessData[bizkey2][b_iValue]);
  584.         PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  585.         format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", arrBusinessData[bizkey2][b_iValue]);
  586.         GameTextForPlayer(playerid, string, 4000, 3);
  587.         BizOwners--;
  588.         PlayerInfo[playerid][pPbizkey2] = INVALID_BIZ_ID;
  589.         if(PlayerInfo[playerid][pVW] == bizkey2+6000)
  590.         {
  591.             SetPlayerInterior(playerid,0);
  592.             SetPlayerPos(playerid,arrBusinessData[bizkey2][b_fExteriorPos][0],arrBusinessData[bizkey2][b_fExteriorPos][1],arrBusinessData[bizkey2][b_fExteriorPos][2]);
  593.             PlayerInfo[playerid][pVW] = 0;
  594.             PlayerInfo[playerid][pPbizkey2] = INVALID_BIZ_ID;
  595.         }
  596.         SaveBusiness();
  597.         SaveUser(playerid);
  598.         DestroyDynamicPickup(arrBusinessData[bizkey2][b_iPickupID]);
  599.         arrBusinessData[bizkey2][b_iPickupID] = CreateDynamicPickup(1239, 23, arrBusinessData[bizkey2][b_fExteriorPos][0], arrBusinessData[bizkey2][b_fExteriorPos][1], arrBusinessData[bizkey2][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  600.         DestroyDynamic3DTextLabel(arrBusinessData[bizkey2][b_tLabelID]);
  601.         format(string, sizeof(string), "{E8A831}This business is for sale for $%d!\n{33AA33}/buybiz to purchase.\nID: %d", arrBusinessData[bizkey2][b_iValue], bizkey2);
  602.         UpdateDynamic3DTextLabelText(arrBusinessData[bizkey2][b_tLabelID], COLOR_GREEN, string);
  603.         format(string, sizeof(string), "BUSINESS'S(biz2): %s has sold there business, business ID: %i.", GetPlayerNameEx(playerid), bizkey2);
  604.         Log("logs/transactions.log", string);
  605.         return 1;
  606.     }
  607.     return 1;
  608. }
  609.  
  610. CMD:buygarage(playerid, params[])
  611. {
  612.     new string[128];
  613.     if(IsPlayerInRangeOfPoint(playerid, 100.0, 1109.0, 1537.0, 5.0) && PlayerInfo[playerid][pAdmin] < 2) {
  614.         SendClientMessage(playerid, COLOR_WHITE, "You cannot use this command in this area!");
  615.     }
  616.     else for(new b = 0; b < MAX_GARAGES; b++) if(IsPlayerInRangeOfPoint(playerid,2.0, arrGarage[b][b_fExteriorPos][0], arrGarage[b][b_fExteriorPos][1], arrGarage[b][b_fExteriorPos][2])) {
  617.         if(isnull(arrGarage[b][b_szOwner])) {
  618.             if(PlayerInfo[playerid][pCash] > arrGarage[b][b_iValue]) {
  619.  
  620.                 if(PlayerInfo[playerid][pPgaragekey] == INVALID_GARAGE_ID) {
  621.                     new
  622.                         szMessage[128];
  623.  
  624.                     //-> They own the business! Just collect their name in b_szOwner to declare its ownership.
  625.                     GetPlayerName(playerid, arrGarage[b][b_szOwner], MAX_PLAYER_NAME);
  626.                     PlayerInfo[playerid][pPgaragekey] = b;
  627.                     BizOwners++;
  628.                     GivePlayerCash(playerid, -arrGarage[b][b_iValue]);
  629.                     GameTextForPlayer(playerid, "~w~Congratulations!", 5000, 3);
  630.  
  631.                     SendClientMessageEx(playerid, COLOR_WHITE, "Congratulations on your new purchase!");
  632.                     SendClientMessageEx(playerid, COLOR_WHITE, "You can use /garagehelp to navigate your way!");
  633.                     SaveUser(playerid);
  634.  
  635.                     DestroyDynamicPickup(arrGarage[b][b_iPickupID]);
  636.                     arrGarage[b][b_iPickupID] = CreateDynamicPickup(1239, 23, arrGarage[b][b_fExteriorPos][0], arrGarage[b][b_fExteriorPos][1], arrGarage[b][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  637.  
  638.                     format(szMessage, sizeof(szMessage), "Garage\n\nStatus: %s\nOwned by %s\n\nID: %d",((arrGarage[b][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrGarage[b][b_szOwner], b);
  639.                     UpdateDynamic3DTextLabelText(arrGarage[b][b_tLabelID], COLOR_GREEN, szMessage);
  640.                     format(string, sizeof(string), "GARAGES: %s has purchased garage ID %i.", GetPlayerNameEx(playerid), b);
  641.                     Log("logs/transactions.log", string);
  642.                     return SaveBusiness();
  643.                 }
  644.             }
  645.             else SendClientMessageEx(playerid, COLOR_LIGHTRED, "You don't have the cash to buy this garage!");
  646.         }
  647.         else SendClientMessageEx(playerid, COLOR_LIGHTRED, "This garage is already owned!");
  648.     }
  649.     return 1;
  650. }
  651.  
  652. CMD:sellgarage(playerid, params[])
  653. {
  654.     new string[128];
  655.     new garagekey = PlayerInfo[playerid][pPgaragekey];
  656.     if(garagekey == INVALID_GARAGE_ID)
  657.     {
  658.         SendClientMessageEx(playerid, COLOR_WHITE, "You don't own a garage!");
  659.         return 1;
  660.     }
  661.  
  662.     if(garagekey != INVALID_GARAGE_ID && IsPlayerInRangeOfPoint(playerid, 4.0,arrGarage[garagekey][b_fExteriorPos][0],arrGarage[garagekey][b_fExteriorPos][1],arrGarage[garagekey][b_fExteriorPos][2]))
  663.     {
  664.         arrGarage[garagekey][b_iSafeMoney] = 0;
  665.         arrGarage[garagekey][b_iLocked] = 1;
  666.         arrGarage[garagekey][b_szOwner][0] = 0;
  667.         GivePlayerCash(playerid,arrGarage[garagekey][b_iValue]);
  668.         PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  669.         format(string, sizeof(string), "~w~ You have sold your garage for ~n~~g~$%d", arrGarage[garagekey][b_iValue]);
  670.         GameTextForPlayer(playerid, string, 4000, 3);
  671.         PlayerInfo[playerid][pPgaragekey] = INVALID_BIZ_ID;
  672.         if(PlayerInfo[playerid][pVW] == garagekey+6000)
  673.         {
  674.             SetPlayerInterior(playerid,0);
  675.             SetPlayerPos(playerid,arrGarage[garagekey][b_fExteriorPos][0],arrGarage[garagekey][b_fExteriorPos][1],arrGarage[garagekey][b_fExteriorPos][2]);
  676.             PlayerInfo[playerid][pVW] = 0;
  677.             PlayerInfo[playerid][pPgaragekey] = INVALID_GARAGE_ID;
  678.         }
  679.         SaveGarages();
  680.         SaveUser(playerid);
  681.         format(string, sizeof(string), "GARAGES: %s has sold there garage.", GetPlayerNameEx(playerid));
  682.         Log("logs/transactions.log", string);
  683.         DestroyDynamicPickup(arrGarage[garagekey][b_iPickupID]);
  684.         arrGarage[garagekey][b_iPickupID] = CreateDynamicPickup(1239, 23, arrGarage[garagekey][b_fExteriorPos][0], arrGarage[garagekey][b_fExteriorPos][1], arrGarage[garagekey][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  685.         DestroyDynamic3DTextLabel(arrGarage[garagekey][b_tLabelID]);
  686.         format(string, sizeof(string), "{E8A831}This Garage is for sale for $%d!\n{33AA33}/buygarage to purchase.\nID: %d", arrGarage[garagekey][b_iValue], garagekey);
  687.         arrGarage[garagekey][b_tLabelID] = CreateDynamic3DTextLabel(string, COLOR_GREEN, arrGarage[garagekey][b_fExteriorPos][0], arrGarage[garagekey][b_fExteriorPos][1], arrGarage[garagekey][b_fExteriorPos][2]+0.5, 30.0, .testlos = 1, .streamdistance = 30.0, .worldid = 0, .interiorid = 0);
  688.         return 1;
  689.     }
  690.     return 1;
  691. }
  692.  
  693. CMD:lockbiz(playerid, params[])
  694. {
  695.     new
  696.         iBusinessID = PlayerInfo[playerid][pPbizkey];
  697.        
  698.     if(0 <= iBusinessID < MAX_BUSINESSES && (IsPlayerInRangeOfPoint(playerid, 2.0, arrBusinessData[iBusinessID][b_fExteriorPos][0], arrBusinessData[iBusinessID][b_fExteriorPos][1], arrBusinessData[iBusinessID][b_fExteriorPos][2]) || IsPlayerInRangeOfPoint(playerid, 2.0, arrBusinessData[iBusinessID][b_fInteriorPos][0], arrBusinessData[iBusinessID][b_fInteriorPos][1], arrBusinessData[iBusinessID][b_fInteriorPos][2]))) {
  699.  
  700.         new
  701.             szMessage[128];
  702.  
  703.         if(arrBusinessData[iBusinessID][b_iLocked]) {
  704.             arrBusinessData[iBusinessID][b_iLocked] = 0;
  705.             format(szMessage, sizeof(szMessage), "* %s has unlocked their business.", GetPlayerNameEx(playerid));
  706.         }
  707.         else {
  708.             arrBusinessData[iBusinessID][b_iLocked] = 1;
  709.             format(szMessage, sizeof(szMessage), "* %s has locked their business.", GetPlayerNameEx(playerid));
  710.         }
  711.         ProxDetector(30.0, playerid, szMessage, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  712.        
  713.         DestroyDynamicPickup(arrBusinessData[iBusinessID][b_iPickupID]);
  714.         arrBusinessData[iBusinessID][b_iPickupID] = CreateDynamicPickup(1239, 23, arrBusinessData[iBusinessID][b_fExteriorPos][0], arrBusinessData[iBusinessID][b_fExteriorPos][1], arrBusinessData[iBusinessID][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  715.        
  716.         format(szMessage, sizeof szMessage, "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(iBusinessID), ((arrBusinessData[iBusinessID][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[iBusinessID][b_szOwner], iBusinessID);
  717.         return UpdateDynamic3DTextLabelText(arrBusinessData[iBusinessID][b_tLabelID], COLOR_GREEN, szMessage);
  718.     }
  719.     else iBusinessID = PlayerInfo[playerid][pPbizkey2];
  720.     if(0 <= iBusinessID < MAX_BUSINESSES && (IsPlayerInRangeOfPoint(playerid, 2.0, arrBusinessData[iBusinessID][b_fExteriorPos][0], arrBusinessData[iBusinessID][b_fExteriorPos][1], arrBusinessData[iBusinessID][b_fExteriorPos][2]) || IsPlayerInRangeOfPoint(playerid, 2.0, arrBusinessData[iBusinessID][b_fInteriorPos][0], arrBusinessData[iBusinessID][b_fInteriorPos][1], arrBusinessData[iBusinessID][b_fInteriorPos][2]))) {
  721.  
  722.         new
  723.             szMessage[128];
  724.  
  725.         if(arrBusinessData[iBusinessID][b_iLocked]) {
  726.             arrBusinessData[iBusinessID][b_iLocked] = 0;
  727.             format(szMessage, sizeof(szMessage), "* %s has unlocked their business.", GetPlayerNameEx(playerid));
  728.         }
  729.         else {
  730.             arrBusinessData[iBusinessID][b_iLocked] = 1;
  731.             format(szMessage, sizeof(szMessage), "* %s has locked their business.", GetPlayerNameEx(playerid));
  732.         }
  733.         ProxDetector(30.0, playerid, szMessage, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  734.        
  735.         DestroyDynamicPickup(arrBusinessData[iBusinessID][b_iPickupID]);
  736.         arrBusinessData[iBusinessID][b_iPickupID] = CreateDynamicPickup(1239, 23, arrBusinessData[iBusinessID][b_fExteriorPos][0], arrBusinessData[iBusinessID][b_fExteriorPos][1], arrBusinessData[iBusinessID][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  737.        
  738.         format(szMessage, sizeof szMessage, "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(iBusinessID), ((arrBusinessData[iBusinessID][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[iBusinessID][b_szOwner], iBusinessID);
  739.         return UpdateDynamic3DTextLabelText(arrBusinessData[iBusinessID][b_tLabelID], COLOR_GREEN, szMessage);
  740.     }
  741.     return SendClientMessageEx(playerid, COLOR_WHITE, "You either don't own a business, or are not at one of them.");
  742. }
  743.  
  744. CMD:lockgarage(playerid, params[])
  745. {
  746.     new
  747.         garageID = PlayerInfo[playerid][pPgaragekey];
  748.  
  749.     if(0 <= garageID < MAX_BUSINESSES && (IsPlayerInRangeOfPoint(playerid, 2.0, arrGarage[garageID][b_fExteriorPos][0], arrGarage[garageID][b_fExteriorPos][1], arrGarage[garageID][b_fExteriorPos][2]) || IsPlayerInRangeOfPoint(playerid, 2.0, arrGarage[garageID][b_fInteriorPos][0], arrGarage[garageID][b_fInteriorPos][1], arrGarage[garageID][b_fInteriorPos][2]))) {
  750.  
  751.         new
  752.             szMessage[128];
  753.  
  754.         if(arrGarage[garageID][b_iLocked]) {
  755.             arrGarage[garageID][b_iLocked] = 0;
  756.             format(szMessage, sizeof(szMessage), "* %s has unlocked their garage.", GetPlayerNameEx(playerid));
  757.         }
  758.         else {
  759.             arrGarage[garageID][b_iLocked] = 1;
  760.             format(szMessage, sizeof(szMessage), "* %s has locked their garage.", GetPlayerNameEx(playerid));
  761.         }
  762.         ProxDetector(30.0, playerid, szMessage, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  763.  
  764.         DestroyDynamicPickup(arrGarage[garageID][b_iPickupID]);
  765.         arrGarage[garageID][b_iPickupID] = CreateDynamicPickup(1239, 23, arrGarage[garageID][b_fExteriorPos][0], arrGarage[garageID][b_fExteriorPos][1], arrGarage[garageID][b_fExteriorPos][2], .worldid = 0, .interiorid = 0);
  766.         format(szMessage, sizeof(szMessage), "Garage\n\nStatus: %s\nOwned by %s\n\nID: %d",((arrGarage[garageID][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrGarage[garageID][b_szOwner], garageID);
  767.         return UpdateDynamic3DTextLabelText(arrGarage[garageID][b_tLabelID], COLOR_GREEN, szMessage);
  768.     }
  769.     return SendClientMessageEx(playerid, COLOR_WHITE, "You either don't own a garage, or are not at one of them.");
  770. }
  771.  
  772. CMD:garagehelp(playerid, params[])
  773. {
  774.     if(PlayerInfo[playerid][pPgaragekey] > -1)
  775.     {
  776.         SendClientMessage(playerid, COLOR_YELLOW, "*** Garage Help ***");
  777.         SendClientMessage(playerid, COLOR_WHITE, "You can use your garage to park cars, hide away or host a car show and more!");
  778.         SendClientMessage(playerid, COLOR_WHITE, "Commands: /lockgarage - /sellgarage - /buygarage - /sellmygarage");
  779.         SendClientMessage(playerid, COLOR_GREEN, "If you have any questions or concerns, report for an administrator.");
  780.     }
  781.     else SendClientMessage(playerid, COLOR_WHITE, "You dont own a garage!");
  782.     return 1;
  783. }
  784.  
  785. CMD:bizhelp(playerid, params[])
  786. {
  787.     if(PlayerInfo[playerid][pPbizkey]  >= -1 || PlayerInfo[playerid][pPbizkey2] >= -1)
  788.     {
  789.         SendClientMessage(playerid, COLOR_YELLOW, "*** Business Help ***");
  790.         SendClientMessage(playerid, COLOR_WHITE, "As a Business Owner you are expected to maintain and run your business with high standards.");
  791.         SendClientMessage(playerid, COLOR_WHITE, "Your very lucky you own a business, you are able to deposit money into your safe as well as withdraw it.");
  792.         SendClientMessage(playerid, COLOR_WHITE, "You must report for a HA+ to change the type of your business, depending if the type has been setup, you will be fined %10 total wealth.");
  793.         SendClientMessage(playerid, COLOR_WHITE, "Commands: /lockbiz - /sellbiz - /buybiz - /bizdeposit - /bizwithdraw - /bizvault - /bchat - /bizcontract - /bizterminate - /bgiverank");
  794.         SendClientMessage(playerid, COLOR_GREEN, "If you have any questions or concerns, report for an administrator.");
  795.     }
  796.     else SendClientMessage(playerid, COLOR_WHITE, "You dont own a business!");
  797.     return 1;
  798. }
  799.  
  800. CMD:bizvault(playerid, params[])
  801. {
  802.     new string[128];
  803.     new bizid;
  804.     new bizkey = PlayerInfo[playerid][pPbizkey];
  805.     new bizkey2 = PlayerInfo[playerid][pPbizkey2];
  806.     if(PlayerInfo[playerid][pPbizkey]  > -1 || PlayerInfo[playerid][pPbizkey2] > -1)
  807.     {
  808.     if(bizkey != INVALID_BIZ_ID && IsPlayerInRangeOfPoint(playerid, 4.0,arrBusinessData[bizkey][b_fInteriorPos][0],arrBusinessData[bizkey][b_fInteriorPos][1],arrBusinessData[bizkey][b_fInteriorPos][2]) || bizkey2 != INVALID_BIZ_ID && IsPlayerInRangeOfPoint(playerid, 4.0,arrBusinessData[bizkey2][b_fInteriorPos][0],arrBusinessData[bizkey2][b_fInteriorPos][1],arrBusinessData[bizkey2][b_fInteriorPos][2]))
  809.     {
  810.         SendClientMessage(playerid, COLOR_GREEN, "|___| Business Vault |___|");
  811.         format(string, sizeof(string), "Your current vault amount is: $%i.", arrBusinessData[bizid][b_iSafeMoney]);
  812.         SendClientMessageToAll(COLOR_LIGHTRED, string);
  813.         SendClientMessage(playerid, COLOR_GREEN, "|________________________|");
  814.     }
  815.     else SendClientMessage(playerid, COLOR_WHITE, "You are not inside your business or you dont own one!");
  816.     }
  817.     return 1;
  818. }
  819.  
  820. CMD:bizdeposit(playerid, params[])
  821. {
  822.     new string[128];
  823.     new bizid, amount = arrBusinessData[bizid][b_iSafeMoney];
  824.     new bizkey = PlayerInfo[playerid][pPbizkey];
  825.     new bizkey2 = PlayerInfo[playerid][pPbizkey2];
  826.     if(PlayerInfo[playerid][pPbizkey]  > -1 || PlayerInfo[playerid][pPbizkey2] > -1)
  827.     {
  828.     if(bizkey != INVALID_BIZ_ID && IsPlayerInRangeOfPoint(playerid, 4.0,arrBusinessData[bizkey][b_fInteriorPos][0],arrBusinessData[bizkey][b_fInteriorPos][1],arrBusinessData[bizkey][b_fInteriorPos][2]) || bizkey2 != INVALID_BIZ_ID && IsPlayerInRangeOfPoint(playerid, 4.0,arrBusinessData[bizkey2][b_fInteriorPos][0],arrBusinessData[bizkey2][b_fInteriorPos][1],arrBusinessData[bizkey2][b_fInteriorPos][2]))
  829.     {
  830.         if(sscanf(params, "d", amount)) {
  831.             return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /bizdeposit [amount]");
  832.         }
  833.         if(amount < 1) return SendClientMessageEx(playerid, COLOR_WHITE, "You must deposit atleast $1!");
  834.         if(amount > 1)
  835.         GivePlayerCash(playerid, -amount);
  836.         arrBusinessData[bizid][b_iSafeMoney] += amount;
  837.         format(string, sizeof(string), "You have deposited $%i into your business!", amount);
  838.         SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
  839.         format(string, sizeof(string), "BUSINESS'S: %s has deposited $%i to his business vault.", GetPlayerNameEx(playerid), amount);
  840.         Log("logs/transactions.log", string);
  841.         SaveUser(playerid);
  842.         SaveBusiness();
  843.     }
  844.     else SendClientMessage(playerid, COLOR_WHITE, "You are not inside your business!");
  845.     }
  846.     else SendClientMessage(playerid, COLOR_WHITE, "You dont own a business!");
  847.     return 1;
  848. }
  849. CMD:bizwithdraw(playerid, params[])
  850. {
  851.     new string[128];
  852.     new bizid, amount = arrBusinessData[bizid][b_iSafeMoney];
  853.     new bizkey = PlayerInfo[playerid][pPbizkey];
  854.     new bizkey2 = PlayerInfo[playerid][pPbizkey2];
  855.     if(PlayerInfo[playerid][pPbizkey]  > -1 || PlayerInfo[playerid][pPbizkey2] > -1)
  856.     {
  857.     if(bizkey != INVALID_BIZ_ID && IsPlayerInRangeOfPoint(playerid, 4.0,arrBusinessData[bizkey][b_fInteriorPos][0],arrBusinessData[bizkey][b_fInteriorPos][1],arrBusinessData[bizkey][b_fInteriorPos][2]) || bizkey2 != INVALID_BIZ_ID && IsPlayerInRangeOfPoint(playerid, 4.0,arrBusinessData[bizkey2][b_fInteriorPos][0],arrBusinessData[bizkey2][b_fInteriorPos][1],arrBusinessData[bizkey2][b_fInteriorPos][2]))
  858.     {
  859.         if(sscanf(params, "d", amount)) {
  860.             return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /bizwithdraw [amount]");
  861.         }
  862.         if(amount < 1) return SendClientMessageEx(playerid, COLOR_WHITE, "You must withdraw atleast $1!");
  863.         if(amount > 1)
  864.         if(arrBusinessData[bizid][b_iSafeMoney] > amount)
  865.         {
  866.         GivePlayerCash(playerid, amount);
  867.         arrBusinessData[bizid][b_iSafeMoney] -= amount;
  868.         format(string, sizeof(string), "You have withdraw $%i from your business!", amount);
  869.         SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
  870.         format(string, sizeof(string), "BUSINESS'S: %s has withdrawn $%i from his business vault.", GetPlayerNameEx(playerid), amount);
  871.         Log("logs/transactions.log", string);
  872.         }
  873.     }
  874.     else SendClientMessage(playerid, COLOR_WHITE, "You are not near your business!");
  875.     }
  876.     else SendClientMessage(playerid, COLOR_WHITE, "You dont own a business!");
  877.     return 1;
  878. }
  879.  
  880. CMD:sellmybiz(playerid, params[])
  881. {
  882.     new playername[MAX_PLAYER_NAME];
  883.     GetPlayerName(playerid, playername, sizeof(playername));
  884.     if((PlayerInfo[playerid][pPbizkey] != INVALID_BIZ_ID && strcmp(playername, arrBusinessData[PlayerInfo[playerid][pPbizkey]][b_szOwner], true) == 0) || (PlayerInfo[playerid][pPbizkey2] != INVALID_BIZ_ID && strcmp(playername, arrBusinessData[PlayerInfo[playerid][pPbizkey2]][b_szOwner], true) == 0))
  885.     {
  886.         new string[128], giveplayerid, price;
  887.         if(sscanf(params, "ud", giveplayerid, price)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /sellmybiz [player] [price]");
  888.  
  889.         if(price < 1) return SendClientMessageEx(playerid, COLOR_WHITE, "The selling price must be higher than $0!");
  890.  
  891.         if(!IsPlayerConnected(giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "Player is currently not connected to the server.");
  892.         if(PlayerInfo[giveplayerid][pPbizkey] != INVALID_BIZ_ID && strcmp(GetPlayerNameEx(playerid), arrBusinessData[PlayerInfo[giveplayerid][pPbizkey]][b_szOwner], true) == 0)
  893.         {
  894.             SendClientMessageEx(playerid, COLOR_WHITE, "They already own a business!");
  895.             return 1;
  896.         }
  897.         new bizkey = PlayerInfo[playerid][pPbizkey];
  898.         new bizkey2 = PlayerInfo[playerid][pPbizkey2];
  899.         if(IsPlayerInRangeOfPoint(playerid, 4.0,arrBusinessData[bizkey][b_fExteriorPos][0],arrBusinessData[bizkey][b_fExteriorPos][1],arrBusinessData[bizkey][b_fExteriorPos][2]))
  900.             {
  901.                 if (ProxDetectorS(8.0, playerid, giveplayerid))
  902.                 {
  903.                     SetPVarInt(giveplayerid, "BizSeller", playerid);
  904.                     SetPVarInt(giveplayerid, "BizPrice", price);
  905.                    
  906.                     SetPVarInt(playerid, "BizBuyer", giveplayerid);
  907.                     SetPVarInt(playerid, "BizID", bizkey);
  908.                     format(string, sizeof(string), "* You offered %s to buy your business for $%d.", GetPlayerNameEx(giveplayerid), price);
  909.                     SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  910.                     format(string, sizeof(string), "* %s has offered you their business for $%d, (type /accept business) to buy the business.", GetPlayerNameEx(playerid), price);
  911.                     SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
  912.                     return 1;
  913.                 }
  914.                 else
  915.                 {
  916.                     SendClientMessageEx(playerid, COLOR_WHITE, "That player is not near you.");
  917.                     return 1;
  918.                 }
  919.             }
  920.             else if(IsPlayerInRangeOfPoint(playerid, 4.0,arrBusinessData[bizkey2][b_fExteriorPos][0],arrBusinessData[bizkey2][b_fExteriorPos][1],arrBusinessData[bizkey2][b_fExteriorPos][2]))
  921.             {
  922.                 if (ProxDetectorS(8.0, playerid, giveplayerid))
  923.                 {
  924.                     SetPVarInt(giveplayerid, "BizSeller", playerid);
  925.                     SetPVarInt(giveplayerid, "BizPrice", price);
  926.                    
  927.                     SetPVarInt(playerid, "BizBuyer", giveplayerid);
  928.                     SetPVarInt(playerid, "BizID", bizkey2);
  929.                    
  930.                     format(string, sizeof(string), "* You offered %s to buy your business for $%d.", GetPlayerNameEx(giveplayerid), price);
  931.                     SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  932.                     format(string, sizeof(string), "* %s has offered you their business for $%d, (type /accept business) to buy the business.", GetPlayerNameEx(playerid), price);
  933.                     SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
  934.                     return 1;
  935.                 }
  936.                 else
  937.                 {
  938.                     SendClientMessageEx(playerid, COLOR_WHITE, "That player is not near you.");
  939.                     return 1;
  940.                 }
  941.             }
  942.             else
  943.             {
  944.                 SendClientMessageEx(playerid, COLOR_WHITE, "You are not near your business.");
  945.                 return 1;
  946.             }
  947.     }
  948.     else
  949.     {
  950.         SendClientMessageEx(playerid, COLOR_WHITE, "You don't own a business.");
  951.     }
  952.     return 1;
  953. }
  954.  
  955. CMD:sellmygarage(playerid, params[])
  956. {
  957.  
  958.     new playername[MAX_PLAYER_NAME];
  959.     GetPlayerName(playerid, playername, sizeof(playername));
  960.     if((PlayerInfo[playerid][pPgaragekey] != INVALID_GARAGE_ID && strcmp(playername, arrGarage[PlayerInfo[playerid][pPgaragekey]][b_szOwner], true) == 0))
  961.     {
  962.         new string[128], giveplayerid, price;
  963.         if(sscanf(params, "ud", giveplayerid, price)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /sellmygarage [player] [price]");
  964.  
  965.         if(price < 1) return SendClientMessageEx(playerid, COLOR_WHITE, "The selling price must be higher than $0!");
  966.  
  967.         if(!IsPlayerConnected(giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "Player is currently not connected to the server.");
  968.         if(PlayerInfo[giveplayerid][pPgaragekey] != INVALID_GARAGE_ID && strcmp(GetPlayerNameEx(playerid), arrGarage[PlayerInfo[giveplayerid][pPgaragekey]][b_szOwner], true) == 0)
  969.         {
  970.             SendClientMessageEx(playerid, COLOR_WHITE, "They already own a garage!");
  971.             return 1;
  972.         }
  973.         new garagekey = PlayerInfo[playerid][pPgaragekey];
  974.         if(IsPlayerInRangeOfPoint(playerid, 4.0,arrGarage[garagekey][b_fExteriorPos][0],arrGarage[garagekey][b_fExteriorPos][1],arrGarage[garagekey][b_fExteriorPos][2]))
  975.             {
  976.                 if (ProxDetectorS(8.0, playerid, giveplayerid))
  977.                 {
  978.                     SetPVarInt(giveplayerid, "BizSeller1", playerid);
  979.                     SetPVarInt(giveplayerid, "BizPrice1", price);
  980.  
  981.                     SetPVarInt(playerid, "BizBuyer1", giveplayerid);
  982.                     SetPVarInt(playerid, "BizID1", garagekey);
  983.  
  984.                     format(string, sizeof(string), "* You offered %s to buy your garage for $%d.", GetPlayerNameEx(giveplayerid), price);
  985.                     SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  986.                     format(string, sizeof(string), "* %s has offered you their garage for $%d, (type /accept garage) to buy the business.", GetPlayerNameEx(playerid), price);
  987.                     SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
  988.                 }
  989.                 else
  990.                 {
  991.                     SendClientMessageEx(playerid, COLOR_WHITE, "That player is not near you.");
  992.                     return 1;
  993.                 }
  994.             }
  995.             else
  996.             {
  997.                 SendClientMessageEx(playerid, COLOR_WHITE, "You are not near your garage.");
  998.                 return 1;
  999.             }
  1000.             }
  1001.     return 1;
  1002. }
  1003.  
  1004. CMD:updatebiz(playerid, params[])
  1005. {
  1006.     if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pShopTech] == 1)
  1007.     {
  1008.         new bizid, szText[128];
  1009.         if(sscanf(params, "d", bizid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /updatebiz [bizid]");
  1010.  
  1011.         if(!isnull(arrBusinessData[bizid][b_szOwner])) format(szText, sizeof szText, "%s\n%s\nOwned by %s\nID: %d", Business_ReturnType(bizid), ((arrBusinessData[bizid][b_iLocked]) ? ("{FF0000}Closed{33AA33}") : ("{E8A831}Open{33AA33}")), arrBusinessData[bizid][b_szOwner], bizid);
  1012.         else format(szText, sizeof szText, "{E8A831}This business is for sale for $%d!\n{33AA33}/buybiz to purchase.\nID: %d", arrBusinessData[bizid][b_iValue], bizid);
  1013.         UpdateDynamic3DTextLabelText(arrBusinessData[bizid][b_tLabelID], COLOR_GREEN, szText);
  1014.         SendClientMessage(playerid, COLOR_RED, "Business successfully updated.");
  1015.     }
  1016.     return 1;
  1017. }
  1018. CMD:buydrink(playerid, params[])
  1019. {
  1020.     if(IsPlayerInRangeOfPoint(playerid, 30.0, 501.8307,-68.0945,998.7578))
  1021.     {
  1022.         ShowPlayerDialog(playerid, 6241, DIALOG_STYLE_LIST, "Bar Drinks!", "Vodka($18)\nWKD($14)\nSmirn-Off Ice($16)\nWhisky($20)\nCarling($7)", "Buy Drink", "Cancel");
  1023.     }
  1024.     else SendClientMessage(playerid, COLOR_WHITE, "You are not in a Bar!");
  1025.     return 1;
  1026. }
  1027. CMD:weplist(playerid, params[])
  1028. {
  1029.     if(PlayerInfo[playerid][pAdmin] >= 2)
  1030.     {
  1031.     SendClientMessage(playerid, COLOR_WHITE, "Brass Knuckles | 1 - Golf Club | 2 - Nitestick | 3 - Knife | 4 - Baseball bat | 5");
  1032.     SendClientMessage(playerid, COLOR_WHITE, "Shovel | 6 - Pool Cue | 7 - Katana | 8 - Chainsaw | 9 - Double-Ended Dildo | 10 ");
  1033.     SendClientMessage(playerid, COLOR_WHITE, "Dildo | 11 - Vibrator | 12 - Silver Vibrator | 13 - Flowers | 14 - Cane | 15");
  1034.     SendClientMessage(playerid, COLOR_WHITE, "Grenade | 16 - Tear Gas | 17 - Molotov Cocktail | 18 - 9mm | 22 - Silenced 9mm | 23");
  1035.     SendClientMessage(playerid, COLOR_WHITE, "Desert Eagle | 24 - Shotgun | 25 - Sawnoff Shotgun | 26 - Combat Shotgun | 27");
  1036.     SendClientMessage(playerid, COLOR_WHITE, "Micro SMG/Uzi | 28 - MP5 | 29 - AK-47 | 30 - M4 | 31 - Tec-9 | 32 - Country Rifle | 33");
  1037.     SendClientMessage(playerid, COLOR_WHITE, "Sniper Rifle | 34 - RPG | 35 - HS Rocket | 36 - Flamethrower | 37 - Minigun | 38 ");
  1038.     SendClientMessage(playerid, COLOR_WHITE, "Satchel Charge - 39 | Detonator | 40 - Spraycan | 41 - Fire Extinguisher | 42");
  1039.     SendClientMessage(playerid, COLOR_WHITE, "Camera | 43 - Night Vis Goggles | 44 - Thermal Goggles | 45 - Parachute | 46");
  1040.     }
  1041.     return 1;
  1042. }
  1043. stock IsAtElecStore(playerid)
  1044. {
  1045.     if(IsPlayerConnected(playerid))
  1046.     {
  1047.         if(IsPlayerInRangeOfPoint(playerid, 40.0, -2240.468505,137.060440,1035.414062))
  1048.         {
  1049.             return 1;
  1050.         }
  1051.     }
  1052.     return 0;
  1053. }
  1054.  
  1055. stock SaveUser(playerid)
  1056. {
  1057.     if(gPlayerLogged{playerid}) {
  1058.  
  1059.     }
  1060.     return 1;
  1061. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement