Advertisement
Guest User

Business system

a guest
Nov 12th, 2013
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 17.74 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. #include <YSI\y_commands>
  7. #include <YSI\y_ini>
  8.  
  9. #define SCM SendClientMessage //Saves time
  10. #define BPATH "/Business/%i.ini" //Defines the path y_ini will use to find the .ini file we need.
  11. //The below colors do not have to be used, but you will need to edit the script if you choose not to use them.
  12. #define NEWBIE_COLOR        0x7DAEFFFF
  13. #define TCOLOR_WHITE        0xFFFFFF00
  14. #define COLOR_GRAD1         0xB4B5B7FF
  15. #define COLOR_GRAD2         0xBFC0C2FF
  16. #define COLOR_GRAD3         0xCBCCCEFF
  17. #define COLOR_GRAD4         0xD8D8D8FF
  18. #define COLOR_GRAD5         0xE3E3E3FF
  19. #define COLOR_GRAD6         0xF0F0F0FF
  20. #define COLOR_FADE1         0xE6E6E6E6
  21. #define COLOR_FADE2         0xC8C8C8C8
  22. #define COLOR_FADE3         0xAAAAAAAA
  23. #define COLOR_FADE4         0x8C8C8C8C
  24. #define COLOR_FADE5         0x6E6E6E6E
  25. #define COLOR_PURPLE        0xC2A2DAAA
  26. #define COLOR_RED           0xAA3333AA
  27. #define COLOR_GREY          0xAFAFAFAA
  28. #define COLOR_GREEN         0x33AA33AA
  29. #define COLOR_BLACK         0x000001FF
  30. #define COLOR_BLUE          0x007BD0FF
  31. #define COLOR_LIGHTORANGE   0xFFA100FF
  32. #define COLOR_FLASH         0xFF000080
  33. #define COLOR_LIGHTRED      0xFF6347AA
  34. #define COLOR_LIGHTBLUE     0x01FCFFC8
  35. #define COLOR_LIGHTGREEN    0x9ACD32AA
  36. #define COLOR_YELLOW        0xFFFF00AA
  37. #define COLOR_LIGHTYELLOW   0xFFFF91FF
  38. #define COLOR_YELLOW2       0xF5DEB3AA
  39. #define COLOR_WHITE         0xFFFFFFAA
  40.  
  41. new InsideBiz;[MAX_PLAYERS]//This define will be used later to find out what business we are in.
  42. enum bInfo {
  43.     bOwned,
  44.     bPrice,
  45.     bOwner[MAX_PLAYER_NAME],
  46.     bType,
  47.     bLocked,
  48.     bMoney,
  49.     Float:bEntranceX,
  50.     Float:bEntranceY,
  51.     Float:bEntranceZ,
  52.     Float:bEntranceA,
  53.     Float:bExitX,
  54.     Float:bExitY,
  55.     Float:bExitZ,
  56.     Float:bExitA,
  57.     bInt,
  58.     bWorld,
  59.     bInsideInt,
  60.     bInsideWorld,
  61.     bInsideIcon,
  62.     bOutsideIcon,
  63.     bName[128]
  64. }
  65. new BusinessInfo[200][bInfo];//We are creating a define to use for our Enum.
  66. BizID// You'll also have to save this, and load this..I expect you know how to do this.
  67.  
  68. new str[40];
  69.     for(new idx = 1; idx < sizeof(BusinessInfo); idx++)//Creates a loop, that goes through all of the businesses.
  70.     {
  71.         format(str, sizeof(str), BPATH, idx);//formats the file path, with the biz ID
  72.         INI_ParseFile(str, "loadbiz_%s", .bExtra = true, .extra = idx );//This is very hard to explain, but it basically loads the info from the file(More in Y_Less y_ini tutorial.)
  73.         BusinessInfo[idx][bOutsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[idx][bEntranceX], BusinessInfo[idx][bEntranceY], BusinessInfo[idx][bEntranceZ], BusinessInfo[idx][bWorld]); //Creates a pickup at the business entrance.
  74.         BusinessInfo[idx][bInsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[idx][bExitX], BusinessInfo[idx][bExitY], BusinessInfo[idx][bExitZ], BusinessInfo[idx][bInsideWorld]); //Creates a pickup at the exit(Inside the interior)
  75.     }
  76.     for(new id = 1; id < sizeof(BusinessInfo); id++)//Loops through the businesses.
  77.     {
  78.         if(BusinessInfo[id][bPrice] == 0) break;//Breaks the loop if the price is 0(Meaning it doesn't exist)
  79.         SaveBusiness(id);//Calls the SaveBusiness function.
  80.     }
  81.     forward SaveBusiness(id);
  82. public SaveBusiness(id)
  83. {
  84.     new file4[40];
  85.     format(file4, sizeof(file4), BPATH, id);
  86.     new INI:File = INI_Open(file4);
  87.     INI_SetTag(File,"data");
  88.     INI_WriteInt(File,"bOwned", BusinessInfo[id][bOwned]);
  89.     INI_WriteInt(File,"bPrice", BusinessInfo[id][bPrice]);
  90.     INI_WriteString(File,"bOwner", BusinessInfo[id][bOwner]);
  91.     INI_WriteInt(File,"bType", BusinessInfo[id][bType]);
  92.     INI_WriteInt(File,"bLocked", BusinessInfo[id][bLocked]);
  93.     INI_WriteInt(File,"bMoney", BusinessInfo[id][bMoney]);
  94.     INI_WriteFloat(File,"bEntranceX", BusinessInfo[id][bEntranceX]);
  95.     INI_WriteFloat(File,"bEntranceY", BusinessInfo[id][bEntranceY]);
  96.     INI_WriteFloat(File,"bEntranceZ", BusinessInfo[id][bEntranceZ]);
  97.     INI_WriteFloat(File,"bEntranceA", BusinessInfo[id][bEntranceA]);
  98.     INI_WriteFloat(File,"bExitX", BusinessInfo[id][bExitX]);
  99.     INI_WriteFloat(File,"bExitY", BusinessInfo[id][bExitY]);
  100.     INI_WriteFloat(File,"bExitZ", BusinessInfo[id][bExitZ]);
  101.     INI_WriteFloat(File,"bExitA", BusinessInfo[id][bExitA]);
  102.     INI_WriteInt(File,"bInt", BusinessInfo[id][bInt]);
  103.     INI_WriteInt(File,"bWorld", BusinessInfo[id][bWorld]);
  104.     INI_WriteInt(File,"bInsideInt", BusinessInfo[id][bInsideInt]);
  105.     INI_WriteInt(File,"bInsideWorld", BusinessInfo[id][bInsideWorld]);
  106.     INI_WriteString(File,"bName", BusinessInfo[id][bName]);
  107.     INI_Close(File);
  108.     return 1;
  109. }
  110.  
  111. forward loadbiz_data(idx, name[], value[]);
  112. public loadbiz_data(idx, name[], value[])
  113. {
  114.     INI_Int("bOwned", BusinessInfo[idx][bOwned]);
  115.     INI_Int("bPrice", BusinessInfo[idx][bPrice]);
  116.     INI_String("bOwner", BusinessInfo[idx][bOwner], 24);
  117.     INI_Int("bType", BusinessInfo[idx][bType]);
  118.     INI_Int("bLocked", BusinessInfo[idx][bLocked]);
  119.     INI_Int("bMoney", BusinessInfo[idx][bMoney]);
  120.     INI_Float("bEntranceX", BusinessInfo[idx][bEntranceX]);
  121.     INI_Float("bEntranceY", BusinessInfo[idx][bEntranceY]);
  122.     INI_Float("bEntranceZ", BusinessInfo[idx][bEntranceZ]);
  123.     INI_Float("bEntranceA", BusinessInfo[idx][bEntranceA]);
  124.     INI_Float("bExitX", BusinessInfo[idx][bExitX]);
  125.     INI_Float("bExitY", BusinessInfo[idx][bExitY]);
  126.     INI_Float("bExitZ", BusinessInfo[idx][bExitZ]);
  127.     INI_Float("bExitA", BusinessInfo[idx][bExitA]);
  128.     INI_Int("bInt", BusinessInfo[idx][bInt]);
  129.     INI_Int("bWorld", BusinessInfo[idx][bWorld]);
  130.     INI_Int("bInsideInt", BusinessInfo[idx][bInsideInt]);
  131.     INI_Int("bInsideWorld", BusinessInfo[idx][bInsideWorld]);
  132.     INI_String("bName", BusinessInfo[idx][bName], 128);
  133.     return 1;
  134. }
  135. YCMD:createbiz(playerid, params[])
  136. {
  137.     if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_GREY, "You aren't authorized to use this command!");//Checks if player is a RCON admin..Change this with your admin system.
  138.  
  139.     new price, level, id, int, world, string[128], Float:Xi, Float:Yi, Float:Zi, inti;//All the new defines we will need.
  140.     if(sscanf(params, "dddfff", price, level, inti, Xi, Yi, Zi)) return SendClientMessage(playerid, COLOR_GREY, "YCMD: /createbiz [price] [type] [interior] [X] [Y] [Z]");//d stands for integer, f stands for float.
  141.  
  142.     if(level < 0 || level > 4) return SendClientMessage(playerid, COLOR_GREY, "YCMD: Type cannot go below 0, or above 10.");//
  143.  
  144.     if(price < 10000) return SendClientMessage(playerid, COLOR_GREY, "YCMD: Price cannot go below $10,000.");// Check if the price is below 1000, if it is it will return a message saying it.
  145.  
  146.     for(new h = 1;h < sizeof(BusinessInfo);h++)//Loops through all the businesses
  147.     {
  148.         if(BusinessInfo[h][bPrice] == 0)//Checks if the price of a business is 0.
  149.         {
  150.             id = h;
  151.             break;//It stops looping if it is.
  152.         }
  153.     }
  154.     new Float:X,Float:Y,Float:Z,Float:A;//More new defines.
  155.     GetPlayerPos(playerid, X, Y, Z);//Gets your player position, and saves it into floats.
  156.     GetPlayerFacingAngle(playerid, A);//Gets your facing angle, and saves it into a float.
  157.     int = GetPlayerInterior(playerid);//Gets your interior, and saves it into a integer.
  158.     world = GetPlayerVirtualWorld(playerid);//Gets your Virtual World, and saves it into a integer
  159.     BusinessInfo[id][bInsideInt] = inti;
  160.     BusinessInfo[id][bExitX] = Xi;
  161.     BusinessInfo[id][bExitY] = Yi;
  162.     BusinessInfo[id][bExitZ] = Zi;
  163.  
  164.     BusinessInfo[id][bOwned] = 0;
  165.     BusinessInfo[id][bPrice] = price;
  166.     BusinessInfo[id][bType] = level;
  167.     BusinessInfo[id][bEntranceX] = X;
  168.     BusinessInfo[id][bEntranceY] = Y;
  169.     BusinessInfo[id][bEntranceZ] = Z;
  170.     BusinessInfo[id][bEntranceA] = A;
  171.     BusinessInfo[id][bLocked] = 1;
  172.  
  173.     BusinessInfo[id][bInt] =int;
  174.     BusinessInfo[id][bWorld] =world;
  175.     BusinessInfo[id][bInsideWorld] =id;
  176.  
  177.     format(string, sizeof(string), "None");
  178.     strmid(BusinessInfo[id][bName], string, 0, strlen(string), 255);
  179.  
  180.     if(BusinessInfo[id][bOutsideIcon]) DestroyDynamicPickup(BusinessInfo[id][bOutsideIcon]);
  181.     if(BusinessInfo[id][bInsideIcon]) DestroyDynamicPickup(BusinessInfo[id][bInsideIcon]);
  182.     BusinessInfo[id][bOutsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[id][bEntranceX], BusinessInfo[id][bEntranceY], BusinessInfo[id][bEntranceZ], BusinessInfo[id][bWorld]);//Creates a pickup at your location
  183.     BusinessInfo[id][bInsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[id][bExitX], BusinessInfo[id][bExitY], BusinessInfo[id][bExitZ], BusinessInfo[id][bInsideWorld]);//Creates a pickup at your location
  184.     new file4[40];
  185.     format(file4, sizeof(file4), BPATH, id);
  186.     new INI:File = INI_Open(file4);
  187.     INI_SetTag(File,"data");
  188.     INI_WriteInt(File,"bOwned", BusinessInfo[id][bOwned]);
  189.     INI_WriteInt(File,"bPrice", BusinessInfo[id][bPrice]);
  190.     INI_WriteString(File,"bOwner", BusinessInfo[id][bOwner]);
  191.     INI_WriteInt(File,"bType", BusinessInfo[id][bType]);
  192.     INI_WriteInt(File,"bLocked", BusinessInfo[id][bLocked]);
  193.     INI_WriteInt(File,"bMoney", BusinessInfo[id][bMoney]);
  194.     INI_WriteFloat(File,"bEntranceX", BusinessInfo[id][bEntranceX]);
  195.     INI_WriteFloat(File,"bEntranceY", BusinessInfo[id][bEntranceY]);
  196.     INI_WriteFloat(File,"bEntranceZ", BusinessInfo[id][bEntranceZ]);
  197.     INI_WriteFloat(File,"bEntranceA", BusinessInfo[id][bEntranceA]);
  198.     INI_WriteFloat(File,"bExitX", BusinessInfo[id][bExitX]);
  199.     INI_WriteFloat(File,"bExitY", BusinessInfo[id][bExitY]);
  200.     INI_WriteFloat(File,"bExitZ", BusinessInfo[id][bExitZ]);
  201.     INI_WriteFloat(File,"bExitA", BusinessInfo[id][bExitA]);
  202.     INI_WriteInt(File,"bInt", BusinessInfo[id][bInt]);
  203.     INI_WriteInt(File,"bWorld", BusinessInfo[id][bWorld]);
  204.     INI_WriteInt(File,"bInsideInt", BusinessInfo[id][bInsideInt]);
  205.     INI_WriteInt(File,"bInsideWorld", BusinessInfo[id][bInsideWorld]);
  206.     INI_WriteString(File,"bName", BusinessInfo[id][bName]);
  207.     INI_Close(File);
  208.     return 1;
  209. }
  210.  
  211. YCMD:deletebiz(playerid, params[])
  212. {
  213.     if(!IsPlayerAdmin(playerid)) return 1; // Checks if a player is a RCON admin, again change this to your admin system.
  214.  
  215.     new id;
  216.  
  217.     if(sscanf(params, "d", id)) return SendClientMessage(playerid, COLOR_GREY, "YCMD: /deletebiz [id]");
  218.     if(BusinessInfo[id][bOwned] == 1) return SCM(playerid, COLOR_GREY, "This biz is owned.");//Checks if the biz is owned, if it is it won't allow it to be deleted.
  219.         //Below it resets all the biz enum info.
  220.     BusinessInfo[id][bOwned] = 0;
  221.     BusinessInfo[id][bPrice] = 0;
  222.     BusinessInfo[id][bOwner] = 0;
  223.     BusinessInfo[id][bType] = 0;
  224.     BusinessInfo[id][bLocked] = 0;
  225.     BusinessInfo[id][bName] = 0;
  226.     BusinessInfo[id][bMoney] = 0;
  227.     BusinessInfo[id][bEntranceX] = 0;
  228.     BusinessInfo[id][bEntranceY] = 0;
  229.     BusinessInfo[id][bEntranceZ] = 0;
  230.     BusinessInfo[id][bEntranceA] = 0;
  231.     BusinessInfo[id][bExitX] = 0;
  232.     BusinessInfo[id][bExitY] = 0;
  233.     BusinessInfo[id][bExitZ] = 0;
  234.     BusinessInfo[id][bExitA] = 0;
  235.     BusinessInfo[id][bInt] = 0;
  236.     BusinessInfo[id][bWorld] = 0;
  237.  
  238.     if(BusinessInfo[id][bOutsideIcon]) DestroyDynamicPickup(BusinessInfo[id][bOutsideIcon]);//Destroys the pickup.
  239.  
  240.     new string[128];
  241.  
  242.     format(string, sizeof(string), BPATH, id);
  243.     fremove(string);
  244.     return 1;
  245. }
  246.  
  247. public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  248. {
  249.     new string[256];
  250.     for(new b = 1;b < sizeof(BusinessInfo);b++)// Loopd through all the businesses again.
  251.     {
  252.         if(pickupid == BusinessInfo[b][bOutsideIcon])//Checks if it's a biz pickup.
  253.         {
  254.            if(BusinessInfo[b][bOwned] == 0)//Checks if it is owned.
  255.            {
  256.                 format(string, sizeof(string), "~g~Name:~w~%s~n~~w~This business is ~g~for sale!~n~~r~Price:~g~%i~n~BizType:~w~%s~n~~g~BizID:~w~%i", BusinessInfo[b][bName], BusinessInfo[b][bPrice], BusinessType(b), b);//Formats a string with all the info.
  257.                 GameTextForPlayer(playerid, string, 3000, 3);
  258.            }
  259.            if(BusinessInfo[b][bOwned] == 1)//Checks if it owned.
  260.            {
  261.                 format(string, sizeof(string), "~g~Name:~w~%s~n~~g~Owner:~w~%s~n~~g~BizType:~w~%s ~n~~g~BizID:~w~%i", BusinessInfo[b][bName], BusinessInfo[b][bOwner], BusinessType(b), b);//Formats a string with all the info.
  262.                 GameTextForPlayer(playerid, string, 3000, 3);
  263.            }
  264.         }
  265.     }
  266.     return 1;
  267. }
  268.  
  269. stock BusinessType(b)// creates a stock.
  270. {
  271.     new string[30];
  272.     switch(BusinessInfo[b][bType])//You should know what switch is.
  273.     {
  274.         case 4: string = "24/7";
  275.         case 3: string = "Club";
  276.         case 2: string = "Bar";
  277.         case 1: string = "Clothes Shop";
  278.     }
  279.     return string;
  280. }
  281. IsPlayerNearBizEnt(playerid)
  282. {
  283.     for(new b = 1; b < sizeof(BusinessInfo); b++)
  284.     {
  285.         if(IsPlayerInRangeOfPoint(playerid, 2.0, BusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ])) return b;
  286.     }
  287.     return -1;
  288. }
  289.  
  290. YCMD:lockbiz(playerid, params[])
  291. {
  292.     new id = IsPlayerNearBizEnt(playerid);//Uses the function to find if player is near a biz!
  293.     if(id != PlayerInfo[playerid][BizID]) return SCM(playerid, COLOR_GREY, "This isn't your biz!");
  294.     if(BusinessInfo[id][bLocked] == 1)
  295.     {
  296.         BusinessInfo[id][bLocked] = 0;
  297.         GameTextForPlayer(playerid, "Biz ~g~unlocked!", 3000, 3);
  298.     }
  299.     else
  300.     {
  301.         BusinessInfo[id][bLocked] = 1;
  302.         GameTextForPlayer(playerid, "Biz ~r~locked!", 3000, 3);
  303.     }
  304.     return 1;
  305. }
  306.  
  307. YCMD:enter(playerid, params[])
  308. {
  309.     for(new b = 1; b < sizeof(BusinessInfo); b++)//Loops through all the businesses.
  310.     {
  311.         if(IsPlayerInRangeOfPoint(playerid, 1.0, BusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ]))//Checks if player is near the entrance.
  312.         {
  313.             if(BusinessInfo[b][bLocked] == 1) return SendClientMessage(playerid, COLOR_GREY, "This Business is locked!");//Checks it it is locked/
  314.             SetPlayerPos(playerid, BusinessInfo[b][bExitX], BusinessInfo[b][bExitY], BusinessInfo[b][bExitZ]);
  315.             SetPlayerFacingAngle(playerid, BusinessInfo[b][bExitA]);
  316.             SetPlayerInterior(playerid, BusinessInfo[b][bInsideInt]);
  317.             SetPlayerVirtualWorld(playerid, BusinessInfo[b][bInsideWorld]);
  318.             InsideBiz[playerid] = b;
  319.             return 1;
  320.         }
  321.         if(IsPlayerInRangeOfPoint(playerid, 2.0, BusinessInfo[b][bExitX], BusinessInfo[b][bExitY], BusinessInfo[b][bExitZ]) && GetPlayerVirtualWorld(playerid) == BusinessInfo[b][bInsideWorld])//Checks if player is in near the exit.
  322.         {
  323.             SetPlayerPos(playerid, BusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ]);
  324.             SetPlayerFacingAngle(playerid, BusinessInfo[b][bEntranceA]);
  325.             SetPlayerInterior(playerid, BusinessInfo[b][bInt]);
  326.             SetPlayerVirtualWorld(playerid, BusinessInfo[b][bWorld]);
  327.             InsideBiz[playerid] = 0;
  328.             return 1;
  329.         }
  330.     }
  331.     return 1;
  332. }
  333.  
  334. YCMD:buybiz(playerid, params[])
  335. {
  336.  
  337.     new id = IsPlayerNearBizEnt(playerid);
  338.  
  339.     if(id == -1 || id == 0) return SendClientMessage(playerid, COLOR_GREY, "You are not near a biz");
  340.  
  341.     if(BusinessInfo[id][bOwned] != 0 || BusinessInfo[id][bPrice] == 0) return SendClientMessage(playerid, COLOR_GREY, "This biz is not for sale.");
  342.  
  343.     if(PlayerInfo[playerid][BizID] != 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You already own a biz.");
  344.  
  345.     if(PlayerInfo[playerid][Money] < BusinessInfo[id][bPrice]) return SendClientMessage(playerid, COLOR_LIGHTRED, "Sorry, you can not afford this biz.");
  346.  
  347.     PlayerInfo[playerid][BizID] = id;
  348.     PlayerInfo[playerid][Money] -= BusinessInfo[id][bPrice];
  349.     GivePlayerMoney(playerid, -BusinessInfo[id][bPrice]);
  350.  
  351.     BusinessInfo[id][bLocked] = 0;
  352.     BusinessInfo[id][bOwned] = 1;
  353.     BusinessInfo[id][bOwner] = RemoveUnderScore(playerid);
  354.  
  355.     SendClientMessage(playerid, COLOR_YELLOW, "Congratulations on your new biz! Use /bizhelp to get help, or /ask!");
  356.     return 1;
  357. }
  358.  
  359. YCMD:sellbiz(playerid, params[])
  360. {
  361.     new id = PlayerInfo[playerid][BizID];
  362.     if(PlayerInfo[playerid][BizID] == 0) return SCM(playerid, COLOR_GREY, "You don't own a biz!");
  363.     BusinessInfo[id][bOwned] = 0;
  364.     BusinessInfo[id][bOwner] = 0;
  365.     BusinessInfo[id][bLocked] = 1;
  366.     PlayerInfo[playerid][Money] = BusinessInfo[id][bPrice];
  367.     PlayerInfo[playerid][BizID] = 0;
  368.     SCM(playerid, COLOR_YELLOW, "Business sold!");
  369.     return 1;
  370. }
  371.  
  372. YCMD:bizsetname(playerid, params[])
  373. {
  374.     new name[128];
  375.     if(sscanf(params, "s[128]", name)) return SCM(playerid, COLOR_GREY, "/bizsetname [name]");
  376.     if(PlayerInfo[playerid][BizID] == 0) return SCM(playerid, COLOR_GREY, "You don't own a biz!");
  377.     BusinessInfo[PlayerInfo[playerid][BizID]][bName] = name;
  378.     SCM(playerid, COLOR_YELLOW, "Business name changed!");
  379.     return 1;
  380. }
  381.  
  382. YCMD:clothes(playerid, params[])
  383. {
  384.     new skin;
  385.     if(sscanf(params, "i", skin)) return SCM(playerid, COLOR_GREY, "YCMD:/skin [skinid]");
  386.     if(PlayerInfo[playerid][Money] < 100) return SCM(playerid, COLOR_GREY, "You need atleast 100%!");
  387.     if(BusinessInfo[InsideBiz[playerid]][bType] != 1) return SCM(playerid, COLOR_GREY, "You need to be in clothes shop!");
  388.     if(1 > skin ||  299 < skin || skin == 288 || skin == 287 || skin == 286 || skin == 285 || skin == 284 || skin == 283 || skin == 282 || skin == 281 || skin == 280 || skin == 279 || skin == 278 || skin == 277 || skin == 276 || skin == 275 || skin == 274) return SCM(playerid, COLOR_GREY, "Invalid skin ID!");
  389.     SetPlayerSkin(playerid, skin);
  390.     PlayerInfo[playerid][Skin] = skin;
  391.     GivePlayerMoney(playerid, -100);
  392.     BusinessInfo[InsideBiz[playerid]][bMoney] += 100;
  393.     return 1;
  394. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement