Guest User

Biz System

a guest
Mar 2nd, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 33.74 KB | None | 0 0
  1.  
  2. if(strcmp(cmd, "/buybiz", true) == 0)
  3.     {
  4.         if(IsPlayerConnected(playerid))
  5.         {
  6.             new Float:oldposx, Float:oldposy, Float:oldposz;
  7.             GetPlayerName(playerid, playername, sizeof(playername));
  8.             GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  9.             if(PlayerInfo[playerid][pPbiskey] != 255)
  10.             {
  11.                 SendClientMessage(playerid, COLOR_WHITE, "   Du besitzt schon ein Business, tipp /sellbiz wenn du dieses willst.");
  12.                 return 1;
  13.             }
  14.             for(new b = 0; b < sizeof(SBizzInfo); b++)
  15.             {
  16.                 if(IsPlayerInRangeOfPoint(playerid,2.0, SBizzInfo[b][sbEntranceX], SBizzInfo[b][sbEntranceY], SBizzInfo[b][sbEntranceZ]) && SBizzInfo[b][sbOwned] == 0)
  17.                 {
  18.                     if(PlayerInfo[playerid][pLevel] < SBizzInfo[b][sbLevelNeeded])
  19.                     {
  20.                         format(string, sizeof(string), "Du benötigst Level %d um es erwerben zu können",SBizzInfo[b][sbLevelNeeded]);
  21.                         SendClientMessage(playerid, COLOR_GRAD5, string);
  22.                         return 1;
  23.                     }
  24.                     if(GetPlayerMoney(playerid) > SBizzInfo[b][sbBuyPrice])
  25.                     {
  26.                         PlayerInfo[playerid][pPbiskey] = b+100;
  27.                         SBizzInfo[b][sbOwned] = 1;
  28.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  29.                         strmid(SBizzInfo[b][sbOwner], sendername, 0, strlen(sendername), 255);
  30.                         GivePlayerMoney(playerid,-SBizzInfo[b][sbBuyPrice]);
  31.                         PlayerPlayMusic(playerid);
  32.                         SendClientMessage(playerid, COLOR_WHITE, "Gratulation für dein neues Gewerbe.");
  33.                         SendClientMessage(playerid, COLOR_WHITE, "Gib /help ein, um Hilfe für dein neues Gewerbe zu bekommen.");
  34.                         DateProp(playerid);
  35.                         new string4[200];
  36.                         format(string4, sizeof(string4), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", SBizzInfo[b][sbMessage],SBizzInfo[b][sbOwner],SBizzInfo[b][sbExtortion],SBizzInfo[b][sbEntranceCost],SBizzInfo[b][sbLevelNeeded],SBizzInfo[b][sbProducts],SBizzInfo[b][sbMaxProducts], SBizzInfo[b][sbPriceProd]);
  37.                         Update3DTextLabelText(SBizzInfo[b][sbText],COLOR_BUYED,string4);
  38.                         OnPropUpdate();
  39.                         PlayerUpdate(playerid);
  40.                         return 1;
  41.                     }
  42.                     else
  43.                     {
  44.                         SendClientMessage(playerid, COLOR_WHITE, "Du hast nicht genug Geld, um das Gewerbe kaufen zu können.");
  45.                         return 1;
  46.                     }
  47.                 }
  48.             }
  49.             for(new b = 0; b < sizeof(BizzInfo); b++)
  50.             {
  51.                 if(IsPlayerInRangeOfPoint(playerid,2.0, BizzInfo[b][bEntranceX], BizzInfo[b][bEntranceY], BizzInfo[b][bEntranceZ]) && BizzInfo[b][bOwned] == 0)
  52.                 {
  53.                     if(PlayerInfo[playerid][pLevel] < BizzInfo[b][bLevelNeeded])
  54.                     {
  55.                         format(string, sizeof(string), "Du benötigst mindestens Level %d, um es kaufen zu können",BizzInfo[b][bLevelNeeded]);
  56.                         SendClientMessage(playerid, COLOR_GRAD5, string);
  57.                         return 1;
  58.                     }
  59.                     if(GetPlayerMoney(playerid) > BizzInfo[b][bBuyPrice])
  60.                     {
  61.                         PlayerInfo[playerid][pPbiskey] = b;
  62.                         BizzInfo[b][bOwned] = 1;
  63.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  64.                         strmid(BizzInfo[b][bOwner], sendername, 0, strlen(sendername), 255);
  65.                         GivePlayerMoney(playerid,-BizzInfo[b][bBuyPrice]);
  66.                         PlayerPlayMusic(playerid);
  67.                         SetPlayerInterior(playerid,BizzInfo[b][bInterior]);
  68.                         PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior];
  69.                         SetPlayerPos(playerid,BizzInfo[b][bExitX],BizzInfo[b][bExitY],BizzInfo[b][bExitZ]);
  70.                         GameTextForPlayer(playerid, "~w~Willkommen~n~Um es zu Verlassen tipp /exit (An der Tuer) ein", 5000, 3);
  71.                         PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior];
  72.                         PlayerInfo[playerid][pLocal] = b ;
  73.                         SendClientMessage(playerid, COLOR_WHITE, "Gratulation für dein neues Gewerbe.");
  74.                         SendClientMessage(playerid, COLOR_WHITE, "Gib /help ein, um Hilfe für dein neues Gewerbe zu bekommen.");
  75.                         DateProp(playerid);
  76.                         //Label Update
  77.                         new string3[128];
  78.                         format(string3, sizeof(string3), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", BizzInfo[b][bMessage],BizzInfo[b][bOwner],BizzInfo[b][bExtortion],BizzInfo[b][bEntranceCost],BizzInfo[b][bLevelNeeded],BizzInfo[b][bProducts],BizzInfo[b][bMaxProducts],BizzInfo[b][bPriceProd]);
  79.                         Update3DTextLabelText(BizzInfo[b][bText],COLOR_BUYED,string3);
  80.                         //Speichern
  81.                         OnPropUpdate();
  82.                         PlayerUpdate(playerid);
  83.                         return 1;
  84.                     }
  85.                     else
  86.                     {
  87.                         SendClientMessage(playerid, COLOR_WHITE, "Du hast nicht genug Geld, um das Gewerbe kaufen zu können.");
  88.                         return 1;
  89.                     }
  90.                 }
  91.             }
  92.         }
  93.         return 1;
  94.     }
  95.     if(strcmp(cmd, "/sellbiz", true) == 0)
  96.     {
  97.         if(IsPlayerConnected(playerid))
  98.         {
  99.             GetPlayerName(playerid, playername, sizeof(playername));
  100.             if(PlayerInfo[playerid][pPbiskey] == 255)
  101.             {
  102.                 SendClientMessage(playerid, COLOR_WHITE, "Du besitzt kein Gewerbe.");
  103.                 return 1;
  104.             }
  105.             if(PlayerInfo[playerid][pMarried] > 0)
  106.             {
  107.                 SendClientMessage(playerid, COLOR_GREY, "   Du bist Verheiratet, also kannst du dein Haus nicht verkaufen !");
  108.                 return 1;
  109.             }
  110.             if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(playername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0)
  111.             {
  112.                 new bouse = PlayerInfo[playerid][pPbiskey]-100;
  113.                 GivePlayerMoney(playerid,SBizzInfo[bouse][sbTill]);
  114.                 SBizzInfo[bouse][sbLocked] = 1;
  115.                 SBizzInfo[bouse][sbOwned] = 0;
  116.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  117.                 strmid(SBizzInfo[bouse][sbOwner], "The State", 0, strlen("The State"), 255);
  118.                 strmid(SBizzInfo[bouse][sbExtortion], "No-one", 0, strlen("No-one"), 255);
  119.                 ConsumingMoney[playerid] = 1;
  120.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  121.                 format(string, sizeof(string), "~w~Gluekwunsch~n~ Du hast dein Geschaeft verkauft. Premie ~n~~g~$%d", SBizzInfo[bouse][sbTill]);
  122.                 GameTextForPlayer(playerid, string, 10000, 3);
  123.                 SBizzInfo[bouse][sbTill] = 0;
  124.                 PlayerInfo[playerid][pPbiskey] = 255;
  125.                 //Labe Update
  126.                 new string4[160];
  127.                 format(string4, sizeof(string4), "[Business zu Verkaufen - %s]\nPreis: %d$\nLevel: %d", SBizzInfo[bouse][sbMessage],SBizzInfo[bouse][sbBuyPrice],SBizzInfo[bouse][sbLevelNeeded]);
  128.                 Update3DTextLabelText(SBizzInfo[bouse][sbText],COLOR_FORSELL,string4);
  129.                 //Speichern
  130.                 OnPropUpdate();
  131.                 PlayerUpdate(playerid);
  132.                 return 1;
  133.             }
  134.             if(strcmp(playername, BizzInfo[PlayerInfo[playerid][pPbiskey]][bOwner], true) == 0)
  135.             {
  136.                 new bouse = PlayerInfo[playerid][pPbiskey];
  137.                 BizzInfo[bouse][bLocked] = 1;
  138.                 BizzInfo[bouse][bOwned] = 0;
  139.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  140.                 strmid(BizzInfo[bouse][bOwner], "The State", 0, strlen("The State"), 255);
  141.                 strmid(BizzInfo[bouse][bExtortion], "No-one", 0, strlen("No-one"), 255);
  142.                 ConsumingMoney[playerid] = 1;
  143.                 GivePlayerMoney(playerid,BizzInfo[bouse][bTill]);
  144.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  145.                 format(string, sizeof(string), "~w~Gluekwunsch~n~ Du hast dein Geschaeft verkauft. Premie ~n~~g~$%d", BizzInfo[bouse][bTill]);
  146.                 GameTextForPlayer(playerid, string, 10000, 3);
  147.                 BizzInfo[bouse][bTill] = 0;
  148.                 PlayerInfo[playerid][pPbiskey] = 255;
  149.                 //Labe Update
  150.                 new string3[160];
  151.                 format(string3, sizeof(string3), "[Business zu Verkaufen - %s]\nPreis: %d$\nLevel: %d", BizzInfo[bouse][bMessage],BizzInfo[bouse][bBuyPrice],BizzInfo[bouse][bLevelNeeded]);
  152.                 Update3DTextLabelText(BizzInfo[bouse][bText],COLOR_FORSELL,string3);
  153.                 //Speichern
  154.                 OnPropUpdate();
  155.                 PlayerUpdate(playerid);
  156.                 return 1;
  157.             }
  158.             else
  159.             {
  160.                 SendClientMessage(playerid, COLOR_WHITE, "Dir gehört kein Geschäfft.");
  161.             }
  162.         }
  163.         return 1;
  164.     }
  165.     if (strcmp(cmd, "/bizinfo", true) == 0)
  166.     {
  167.         if(IsPlayerConnected(playerid))
  168.         {
  169.             new bouse = PlayerInfo[playerid][pPbiskey];
  170.             if(bouse == 255)
  171.             {
  172.                 SendClientMessage(playerid, COLOR_WHITE, "Dir gehört kein Geschäfft.");
  173.                 return 1;
  174.             }
  175.             if (bouse >= 100)
  176.             {
  177.  
  178.                 PrintSBizInfo(playerid,bouse-100);
  179.             }
  180.             else
  181.             {
  182.                 PrintBizInfo(playerid,bouse);
  183.             }
  184.         }
  185.         return 1;
  186.     }
  187.     if(strcmp(cmd, "/prodprice", true) == 0)
  188.     {
  189.         new bouse = PlayerInfo[playerid][pPbiskey];
  190.         if (bouse == 255)
  191.         {
  192.             SendClientMessage(playerid, COLOR_GRAD2, "Dir gehört kein Geschäfft");
  193.             return 1;
  194.         }
  195.         tmp = strtok(cmdtext, idx);
  196.         if(!strlen(tmp))
  197.         {
  198.             SendClientMessage(playerid, COLOR_WHITE, "FEHLER: /prodprice [kosten pro Produkt]");
  199.         }
  200.         if(strval(tmp) < 10 || strval(tmp) > 5000)
  201.         {
  202.             SendClientMessage(playerid, COLOR_WHITE, "Der Prodpreis muss mindestens 10$ sein und kann höchsten 5000$ sein.");
  203.             return 1;
  204.         }
  205.         if (bouse >= 100)
  206.         {
  207.             if(strval(tmp) > SBizzInfo[bouse-100][sbTill])
  208.             {
  209.                 SendClientMessage(playerid, COLOR_WHITE, "Nicht genug Geld in der Businesskasse");
  210.                 return 1;
  211.             }
  212.             SBizzInfo[bouse-100][sbPriceProd] = strval(tmp);
  213.             format(string, sizeof(string), "Produkte werden nun für %d$ / Produkt gekauft.", SBizzInfo[bouse-100][sbPriceProd]);
  214.             new string4[160];
  215.             if(SBizzInfo[bouse-100][sbOwned] == 1)
  216.             {
  217.                 format(string4, sizeof(string4), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", SBizzInfo[bouse-100][sbMessage],SBizzInfo[bouse-100][sbOwner],SBizzInfo[bouse-100][sbExtortion],SBizzInfo[bouse-100][sbEntranceCost],SBizzInfo[bouse-100][sbLevelNeeded],SBizzInfo[bouse-100][sbProducts],SBizzInfo[bouse-100][sbMaxProducts], SBizzInfo[bouse-100][sbPriceProd]);
  218.                 Update3DTextLabelText(SBizzInfo[bouse-100][sbText],COLOR_BUYED,string4);
  219.             }
  220.         }
  221.         else
  222.         {
  223.             if(strval(tmp) > BizzInfo[bouse][bTill])
  224.             {
  225.                 SendClientMessage(playerid, COLOR_WHITE, "Nicht genug Geld inder Businesskasse");
  226.                 return 1;
  227.             }
  228.             BizzInfo[bouse][bPriceProd] = strval(tmp);
  229.             format(string, sizeof(string), "Produkte werden nun für %d$ / Produkt gekauft.", BizzInfo[bouse][bPriceProd]);
  230.             new string3[200];
  231.             if(BizzInfo[bouse][bOwned] == 1)
  232.             {
  233.                 format(string3, sizeof(string3), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", BizzInfo[bouse][bMessage],BizzInfo[bouse][bOwner],BizzInfo[bouse][bExtortion],BizzInfo[bouse][bEntranceCost],BizzInfo[bouse][bLevelNeeded],BizzInfo[bouse][bProducts],BizzInfo[bouse][bMaxProducts],BizzInfo[bouse][bPriceProd]);
  234.                 Update3DTextLabelText(BizzInfo[bouse][bText],COLOR_BUYED,string3);
  235.             }
  236.         }
  237.         OnPropUpdate();
  238.         SendClientMessage(playerid, COLOR_WHITE, string);
  239.         return 1;
  240.     }
  241.     if(strcmp(cmd, "/bizfee", true) == 0)
  242.     {
  243.         if(IsPlayerConnected(playerid))
  244.         {
  245.             new bouse = PlayerInfo[playerid][pPbiskey];
  246.             if (bouse == 255)
  247.             {
  248.                 SendClientMessage(playerid, COLOR_GRAD2, "Dir gehört kein Geschäfft!");
  249.                 return 1;
  250.             }
  251.             tmp = strtok(cmdtext, idx);
  252.             if(!strlen(tmp))
  253.             {
  254.                 SendClientMessage(playerid, COLOR_WHITE, "NUTZE: /bizfee [Preis]");
  255.             }
  256.             if(strval(tmp) < 0 || strval(tmp) > 250 && bouse != 102 && bouse != 105)
  257.             {
  258.                 SendClientMessage(playerid, COLOR_WHITE, "Minimaler eintritt ist $0, Maximaler eintritt ist $250.");
  259.                 return 1;
  260.             }
  261.             if(bouse == 102)
  262.             {
  263.                 if(strval(tmp) < 0 || strval(tmp) > 50)
  264.                 {
  265.                     SendClientMessage(playerid, COLOR_GRAD1, "Minimaler Spritpreis ist 0$, Maximaler Sprittpreis 50$.");
  266.  
  267.                 }
  268.             }
  269.             if(bouse == 105)
  270.             {
  271.                 if(strval(tmp) < 0 || strval(tmp) > 50)
  272.                 {
  273.                     SendClientMessage(playerid, COLOR_GRAD1, "Maximaler Preis pro Buchstabe: 50$, Minimaler Preis: 0$!");
  274.                     return 1;
  275.                 }
  276.             }
  277.             if (bouse >= 100)
  278.             {
  279.                 SBizzInfo[bouse-100][sbEntranceCost] = strval(tmp);
  280.                 format(string, sizeof(string), "Eintritts Preis wurde auf $%d gesetzt.", SBizzInfo[bouse-100][sbEntranceCost]);
  281.                 SendClientMessage(playerid, COLOR_GREEN, "Eintritts Preis wurde auf $%d gesetzt!");
  282.             }
  283.             else
  284.             {
  285.                 BizzInfo[bouse][bEntranceCost] = strval(tmp);
  286.                 format(string, sizeof(string), "Eintritts Preis wurde auf $%d gesetzt.", BizzInfo[bouse][bEntranceCost]);
  287.                 SendClientMessage(playerid, COLOR_GREEN, "Eintritts Preis wurde auf $%d gesetzt!");
  288.             }
  289.             new string3[160];
  290.             if(BizzInfo[bouse][bOwned] == 1)
  291.             {
  292.                 format(string3, sizeof(string3), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", BizzInfo[bouse][bMessage],BizzInfo[bouse][bOwner],BizzInfo[bouse][bExtortion],BizzInfo[bouse][bEntranceCost],BizzInfo[bouse][bLevelNeeded],BizzInfo[bouse][bProducts],BizzInfo[bouse][bMaxProducts],BizzInfo[bouse][bPriceProd]);
  293.                 Update3DTextLabelText(BizzInfo[bouse][bText],COLOR_BUYED,string3);
  294.             }
  295.             new string4[160];
  296.             if(SBizzInfo[bouse-100][sbOwned] == 1)
  297.             {
  298.                 format(string4, sizeof(string4), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", SBizzInfo[bouse-100][sbMessage],SBizzInfo[bouse-100][sbOwner],SBizzInfo[bouse-100][sbExtortion],SBizzInfo[bouse-100][sbEntranceCost],SBizzInfo[bouse-100][sbLevelNeeded],SBizzInfo[bouse-100][sbProducts],SBizzInfo[bouse-100][sbMaxProducts], SBizzInfo[bouse-100][sbPriceProd]);
  299.                 Update3DTextLabelText(SBizzInfo[bouse-100][sbText],COLOR_BUYED,string4);
  300.             }
  301.             OnPropUpdate();
  302.             SendClientMessage(playerid, COLOR_WHITE, string);
  303.         }
  304.         return 1;
  305.     }
  306.     if(strcmp(cmd, "/teilhaber", true) == 0)
  307.     {
  308.         if(IsPlayerConnected(playerid))
  309.         {
  310.             new bouse = PlayerInfo[playerid][pPbiskey];
  311.             if (bouse == 255)
  312.             {
  313.                 SendClientMessage(playerid, COLOR_GRAD2, "   Dir gehört kein Geschäfft");
  314.                 return 1;
  315.             }
  316.             tmp = strtok(cmdtext, idx);
  317.             if(!strlen(tmp))
  318.             {
  319.                 SendClientMessage(playerid, COLOR_WHITE, "NUTZUNG: /teilhaber [playerid] (oder 555 für keinen)");
  320.                 return 1;
  321.             }
  322.             giveplayerid = ReturnUser(tmp);
  323.             if(IsPlayerConnected(giveplayerid))
  324.             {
  325.                 if(giveplayerid != INVALID_PLAYER_ID)
  326.                 {
  327.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  328.                     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  329.                     format(string, sizeof(string), "* %s ist nun Teilhaber.",giveplayer);
  330.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  331.                     format(string, sizeof(string), "* %s hat sein Business geteilt, nun bist du Teilhaber.",sendername);
  332.                     SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  333.                     if (bouse >= 100)
  334.                     {
  335.                         format(string, sizeof(string), "%s",giveplayer);
  336.                         strmid(SBizzInfo[bouse-100][sbExtortion], string, 0, sizeof(string), 255);
  337.                         format(string, sizeof(string), "Business Teilhaber Name = %s",SBizzInfo[bouse-100][sbExtortion]);
  338.                         format(ALLSTRING, sizeof(ALLSTRING), "[Business zu Verkaufen - %s]\nPreis: %d$\nLevel: %d", SBizzInfo[bouse-100][sbMessage],SBizzInfo[bouse-100][sbBuyPrice],SBizzInfo[bouse-100][sbLevelNeeded]);
  339.                         Update3DTextLabelText(SBizzInfo[bouse-100][sbText], COLOR_FORSELL, ALLSTRING);
  340.  
  341.                     }
  342.                     else
  343.                     {
  344.                         format(string, sizeof(string), "%s",giveplayer);
  345.                         strmid(BizzInfo[bouse][bExtortion], string, 0, sizeof(string), 255);
  346.                         format(string, sizeof(string), "Business Teilhaber Name = %s",BizzInfo[bouse][bExtortion]);
  347.                         format(ALLSTRING, sizeof(ALLSTRING), "[Business zu Verkaufen - %s]\nPreis: %d$\nLevel: %d", BizzInfo[bouse][bMessage],BizzInfo[bouse][bBuyPrice],BizzInfo[bouse][bLevelNeeded]);
  348.                         Update3DTextLabelText(BizzInfo[bouse][bText], COLOR_FORSELL, ALLSTRING);
  349.                     }
  350.                     OnPropUpdate();
  351.                     SendClientMessage(playerid, COLOR_WHITE, string);
  352.                 }
  353.             }
  354.             else if(giveplayerid == 555)
  355.             {
  356.                 if (bouse >= 100)
  357.                 {
  358.                     format(string, sizeof(string), "Niemand");
  359.                     strmid(SBizzInfo[bouse-100][sbExtortion], string, 0, sizeof(string), 255);
  360.                     format(string, sizeof(string), "Business Teilhaber Name = %s",SBizzInfo[bouse-100][sbExtortion]);
  361.                 }
  362.                 else
  363.                 {
  364.                     format(string, sizeof(string), "Niemand");
  365.                     strmid(BizzInfo[bouse][bExtortion], string, 0, sizeof(string), 255);
  366.                     format(string, sizeof(string), "Business Teilhaber Name = %s",BizzInfo[bouse][bExtortion]);
  367.                 }
  368.                 OnPropUpdate();
  369.                 SendClientMessage(playerid, COLOR_WHITE, string);
  370.             }
  371.             else
  372.             {
  373.                 SendClientMessage(playerid, COLOR_GREY, "   Der Spieler ist Offline !");
  374.                 return 1;
  375.             }
  376.         }
  377.         return 1;
  378.     }
  379.  
  380.     if(strcmp(cmd, "/tankteilhaber", true) == 0)
  381.     {
  382.         if(IsPlayerConnected(playerid))
  383.         {
  384.             new bouse = PlayerInfo[playerid][pPtankekey];
  385.             if (bouse == 255)
  386.             {
  387.                 SendClientMessage(playerid, COLOR_GRAD2, "Dir gehört keine Tankstelle!");
  388.                 return 1;
  389.             }
  390.             tmp = strtok(cmdtext, idx);
  391.             if(!strlen(tmp))
  392.             {
  393.                 SendClientMessage(playerid, COLOR_WHITE, "NUTZUNG: /tankteilhaber [playerid] (oder 555 für keinen)");
  394.                 return 1;
  395.             }
  396.             giveplayerid = ReturnUser(tmp);
  397.             if(IsPlayerConnected(giveplayerid))
  398.             {
  399.                 if(giveplayerid != INVALID_PLAYER_ID)
  400.                 {
  401.                     GetPlayerName(playerid, sendername, sizeof(sendername));
  402.                     GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  403.                     format(string, sizeof(string), "* %s ist nun Teilhaber.",giveplayer);
  404.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  405.                     format(string, sizeof(string), "* %s hat seine Tankstelle geteilt, nun bist du Teilhaber.",sendername);
  406.                     SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  407.                     if (bouse >= 100)
  408.                     {
  409.                         format(string, sizeof(string), "%s",giveplayer);
  410.                         //strmid(TankeInfo[bouse-100][tExtortion], string, 0, sizeof(string), 255);
  411.                         format(string, sizeof(string), "Tankstellen Teilhaber Name = %s",TankeInfo[bouse-100][tExtortion]);
  412.                     }
  413.                     OnPropUpdate();
  414.                     SendClientMessage(playerid, COLOR_WHITE, string);
  415.                 }
  416.             }
  417.             else if(giveplayerid == 555)
  418.             {
  419.                 if (bouse >= 100)
  420.                 {
  421.                     format(string, sizeof(string), "Niemand");
  422.                     strmid(SBizzInfo[bouse-100][sbExtortion], string, 0, sizeof(string), 255);
  423.                     format(string, sizeof(string), "Business Teilhaber Name = %s",SBizzInfo[bouse-100][sbExtortion]);
  424.                 }
  425.                 else
  426.                 {
  427.                     format(string, sizeof(string), "Niemand");
  428.                     strmid(BizzInfo[bouse][bExtortion], string, 0, sizeof(string), 255);
  429.                     format(string, sizeof(string), "Business Teilhaber Name = %s",BizzInfo[bouse][bExtortion]);
  430.                 }
  431.                 OnPropUpdate();
  432.                 SendClientMessage(playerid, COLOR_WHITE, string);
  433.             }
  434.  
  435.         }
  436.         return 1;
  437.     }
  438.     if(strcmp(cmd, "/tankpreis", true) == 0)
  439.     {
  440.         if(IsPlayerConnected(playerid))
  441.         {
  442.             new bouse = PlayerInfo[playerid][pPtankekey];
  443.             if (bouse == 255)
  444.             {
  445.                 SendClientMessage(playerid, COLOR_GRAD2, "Dir gehört keine Tankstelle!");
  446.                 return 1;
  447.             }
  448.             tmp = strtok(cmdtext, idx);
  449.             if(!strlen(tmp))
  450.             {
  451.                 SendClientMessage(playerid, COLOR_WHITE, "NUTZE: /tankpreis [Preis pro Liter]");
  452.             }
  453.             if(strval(tmp) < 0 || strval(tmp) > 100)
  454.             {
  455.                 SendClientMessage(playerid, COLOR_WHITE, "Minimaler Preis pro Liter ist $0, Maximaler Preis pro Liter ist $100.");
  456.                 return 1;
  457.             }
  458.             if (bouse >= 100)
  459.             {
  460.                 TankeInfo[bouse-100][tEntranceCost] = strval(tmp);
  461.                 format(string, sizeof(string), "Preis pro Liter wurde auf $%d gesetzt.", TankeInfo[bouse-100][tEntranceCost]);
  462.             }
  463.             OnPropUpdate();
  464.             SendClientMessage(playerid, COLOR_WHITE, string);
  465.         }
  466.         return 1;
  467.     }
  468.     if(strcmp(cmd, "/tankwithdraw", true) == 0)
  469.     {
  470.         if(IsPlayerConnected(playerid))
  471.         {
  472.             new bouse = PlayerInfo[playerid][pPtankekey];
  473.             if (bouse == 255)
  474.             {
  475.                 SendClientMessage(playerid, COLOR_GRAD2, "Dir gehört keine Tankstelle!");
  476.                 return 1;
  477.             }
  478.             tmp = strtok(cmdtext, idx);
  479.             if(!strlen(tmp))
  480.             {
  481.                 if (bouse >= 100)
  482.                 {
  483.                     format(string, sizeof(string), "Du hast $%d in deiner Tankstellenkasse.", TankeInfo[bouse-100][tTill]);
  484.                     SendClientMessage(playerid, COLOR_GRAD3, string);
  485.                 }
  486.                 SendClientMessage(playerid, COLOR_GRAD2, "NUTZE: /tankwithdraw [Betrag]");
  487.                 return 1;
  488.             }
  489.             new cashdeposit = strval(tmp);
  490.             if(!strlen(tmp))
  491.             {
  492.                 SendClientMessage(playerid, COLOR_GRAD2, "NUTZE: /tankwithdraw [Betrag]");
  493.                 return 1;
  494.             }
  495.             if (bouse >= 100)
  496.             {
  497.                 if(cashdeposit > TankeInfo[bouse-100][tTill] || cashdeposit < 1)
  498.                 {
  499.                     SendClientMessage(playerid, COLOR_GRAD2, "So viel Geld besitzt du nicht!");
  500.                     return 1;
  501.                 }
  502.             }
  503.             if (bouse >= 100)
  504.             {
  505.                 if(!IsPlayerInRangeOfPoint(playerid,100.0,TankeInfo[bouse-100][tEntranceX],TankeInfo[bouse-100][tEntranceY],TankeInfo[bouse-100][tEntranceZ]))
  506.                 {
  507.                     SendClientMessage(playerid, COLOR_GRAD2, "Du bist zu weit von deiner Tankstelle entfernt!");
  508.                     return 1;
  509.                 }
  510.                 else
  511.                 {
  512.                     ConsumingMoney[playerid] = 1;
  513.                     GivePlayerMoney(playerid,cashdeposit);
  514.                     TankeInfo[bouse-100][tTill] -= cashdeposit;
  515.                     ExtortionTanke(bouse-100, TankeInfo[bouse-100][tTill]);
  516.                     format(string, sizeof(string), "* Du hast $%d aus deiner Tankstellenkasse genommen. Total: $%d ", cashdeposit,TankeInfo[bouse-100][tTill]);
  517.                     OnPropUpdate();
  518.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  519.                     return 1;
  520.                 }
  521.             }
  522.         }
  523.         return 1;
  524.     }
  525.  
  526.     if(strcmp(cmd, "/tankbank", true) == 0)
  527.     {
  528.         if(IsPlayerConnected(playerid))
  529.         {
  530.             new bouse = PlayerInfo[playerid][pPtankekey];
  531.             if (bouse == 255)
  532.             {
  533.                 SendClientMessage(playerid, COLOR_GRAD2, "Dir gehört keine Tankstelle!");
  534.                 return 1;
  535.             }
  536.             tmp = strtok(cmdtext, idx);
  537.             if(!strlen(tmp))
  538.             {
  539.                 if (bouse >= 100)
  540.                 {
  541.                     format(string, sizeof(string), "Du hast $%d in deiner Tankstellenkasse.", TankeInfo[bouse-100][tTill]);
  542.                     SendClientMessage(playerid, COLOR_GRAD3, string);
  543.                 }
  544.                 else
  545.                 {
  546.                     format(string, sizeof(string), "  Du hast $%d in deiner Tankstellenkasse.", BizzInfo[bouse][bTill]);
  547.                     SendClientMessage(playerid, COLOR_GRAD3, string);
  548.                 }
  549.                 SendClientMessage(playerid, COLOR_GRAD2, "NUTZE: /tankbank [Betrag]");
  550.                 return 1;
  551.             }
  552.             new cashdeposit = strval(tmp);
  553.             if(!strlen(tmp))
  554.             {
  555.                 SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /tankbank [Betrag]");
  556.                 SendClientMessage(playerid, COLOR_GRAD3, string);
  557.                 return 1;
  558.             }
  559.             if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
  560.             {
  561.                 SendClientMessage(playerid, COLOR_GRAD2, "So viel Geld hast du nicht auf deiner Hand!");
  562.                 return 1;
  563.             }
  564.             if (bouse >= 100)
  565.             {
  566.                 if(!IsPlayerInRangeOfPoint(playerid,100.0,TankeInfo[bouse-100][tEntranceX],TankeInfo[bouse-100][tEntranceY],TankeInfo[bouse-100][tEntranceZ]))
  567.                 {
  568.                     SendClientMessage(playerid, COLOR_GRAD2, "Du bist zu weit von deiner Tankstelle entfernt!");
  569.                     return 1;
  570.                 }
  571.                 else
  572.                 {
  573.                     TankeInfo[bouse-100][tTill] += cashdeposit;
  574.                     ExtortionTanke(bouse-100, TankeInfo[bouse-100][tTill]);
  575.                     GivePlayerMoney(playerid,-cashdeposit);
  576.                     format(string, sizeof(string), "* Du hast $%d in die Tankstellenkasse eingezahlt. Total: $%d ", cashdeposit,TankeInfo[bouse-100][tTill]);
  577.                     OnPropUpdate();
  578.                     SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  579.                     return 1;
  580.                 }
  581.             }
  582.         }
  583.         return 1;
  584.     }
  585.  
  586.     if(strcmp(cmd, "/buytanke", true) == 0)
  587.     {
  588.         if(IsPlayerConnected(playerid))
  589.         {
  590.             new Float:oldposx, Float:oldposy, Float:oldposz;
  591.             GetPlayerName(playerid, playername, sizeof(playername));
  592.             GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  593.             if(PlayerInfo[playerid][pPtankekey] != 255)
  594.             {
  595.                 SendClientMessage(playerid, COLOR_WHITE, "Du besitzt schon eine Tankstelle, tippe /selltanke wenn du diese willst.");
  596.                 return 1;
  597.             }
  598.             for(new b = 0; b < sizeof(TankeInfo); b++)
  599.             {
  600.                 if(IsPlayerInRangeOfPoint(playerid,2.0, TankeInfo[b][tEntranceX], TankeInfo[b][tEntranceY], TankeInfo[b][tEntranceZ]) && TankeInfo[b][tOwned] == 0)
  601.                 {
  602.                     if(PlayerInfo[playerid][pLevel] < TankeInfo[b][tLevelNeeded])
  603.                     {
  604.                         format(string, sizeof(string), "Du benötigst Level %d um es erwerben zu können",TankeInfo[b][tLevelNeeded]);
  605.                         SendClientMessage(playerid, COLOR_GRAD5, string);
  606.                         return 1;
  607.                     }
  608.                     if(GetPlayerMoney(playerid) > TankeInfo[b][tBuyPrice])
  609.                     {
  610.                         PlayerInfo[playerid][pPtankekey] = b+100;
  611.                         TankeInfo[b][tOwned] = 1;
  612.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  613.                         strmid(TankeInfo[b][tOwner], sendername, 0, strlen(sendername), 255);
  614.                         GivePlayerMoney(playerid,-TankeInfo[b][tBuyPrice]);
  615.                         PlayerPlayMusic(playerid);
  616.                         SendClientMessage(playerid, COLOR_WHITE, "Glückwunsch zu deiner neuen Tankstelle!");
  617.                         SendClientMessage(playerid, COLOR_WHITE, "Gib /tankhelp ein um Hilfe für deine Tankstelle zu bekommen.");
  618.                         DateProp(playerid);
  619.                         OnPropUpdate();
  620.                         PlayerUpdate(playerid);
  621.                         return 1;
  622.                     }
  623.                     else
  624.                     {
  625.                         SendClientMessage(playerid, COLOR_WHITE, "Du hast nicht genug Geld, um diese Tankstelle kaufen zu können.");
  626.                         return 1;
  627.                     }
  628.                 }
  629.             }
  630.         }
  631.         return 1;
  632.     }
  633.  
  634.     if(strcmp(cmd, "/selltanke", true) == 0)
  635.     {
  636.         if(IsPlayerConnected(playerid))
  637.         {
  638.             GetPlayerName(playerid, playername, sizeof(playername));
  639.             if(PlayerInfo[playerid][pPtankekey] == 255)
  640.             {
  641.                 SendClientMessage(playerid, COLOR_WHITE, "Du besitzt keine Tankstelle!");
  642.                 return 1;
  643.             }
  644.             if(PlayerInfo[playerid][pPtankekey] >= 100 && strcmp(playername, TankeInfo[PlayerInfo[playerid][pPtankekey]-100][tOwner], true) == 0)
  645.             {
  646.                 new bouse = PlayerInfo[playerid][pPtankekey]-100;
  647.                 GivePlayerMoney(playerid,TankeInfo[bouse][tTill]);
  648.                 TankeInfo[bouse][tLocked] = 1;
  649.                 TankeInfo[bouse][tOwned] = 0;
  650.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  651.                 strmid(TankeInfo[bouse][tOwner], "The State", 0, strlen("The State"), 255);
  652.                 strmid(TankeInfo[bouse][tExtortion], "No-one", 0, strlen("No-one"), 255);
  653.                 ConsumingMoney[playerid] = 1;
  654.                 PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  655.                 format(string, sizeof(string), "~w~Gluekwunsch~n~ Du hast deine Tankstelle verkauft. Premie ~n~~g~$%d", TankeInfo[bouse][tTill]);
  656.                 GameTextForPlayer(playerid, string, 10000, 3);
  657.                 TankeInfo[bouse][tTill] = 0;
  658.                 PlayerInfo[playerid][pPtankekey] = 255;
  659.                 OnPropUpdate();
  660.                 PlayerUpdate(playerid);
  661.                 return 1;
  662.             }
  663.             else
  664.             {
  665.                 SendClientMessage(playerid, COLOR_WHITE, "Dir gehört keine Tankstelle!");
  666.             }
  667.         }
  668.         return 1;
  669.     }
  670.  
  671.     if (strcmp(cmd, "/tankinfo", true) == 0)
  672.     {
  673.         if(IsPlayerConnected(playerid))
  674.         {
  675.             new bouse = PlayerInfo[playerid][pPtankekey];
  676.             if(bouse == 255)
  677.             {
  678.                 SendClientMessage(playerid, COLOR_WHITE, "Dir gehört keine Tankstelle!");
  679.                 return 1;
  680.             }
  681.             if (bouse >= 100)
  682.             {
  683.                 PrintFuelstationInfo(playerid,bouse-100);
  684.             }
  685.         }
  686.         return 1;
  687.     }
  688.     if(strcmp(cmd, "/bizname", true) == 0)
  689.     {
  690.         if(IsPlayerConnected(playerid))
  691.         {
  692.             new bouse = PlayerInfo[playerid][pPbiskey];
  693.             if (bouse == 255)
  694.             {
  695.                 SendClientMessage(playerid, COLOR_GRAD2, "   Dir gehört kein Geschäfft");
  696.                 return 1;
  697.             }
  698.             new length = strlen(cmdtext);
  699.             while ((idx < length) && (cmdtext[idx] <= ' '))
  700.             {
  701.                 idx++;
  702.             }
  703.             new offset = idx;
  704.             new result[64];
  705.             while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  706.             {
  707.                 result[idx - offset] = cmdtext[idx];
  708.                 idx++;
  709.             }
  710.             result[idx - offset] = EOS;
  711.             if(!strlen(result))
  712.             {
  713.                 SendClientMessage(playerid, COLOR_WHITE, "NUTZE: /bizname [Name]");
  714.             }
  715.             if (bouse >= 100)
  716.             {
  717.                 strmid(SBizzInfo[bouse-100][sbMessage], result, 0, 64, 255);
  718.                 format(string, sizeof(string), "Businessname wurde auf %s geändert",SBizzInfo[bouse-100][sbMessage]);
  719.             }
  720.             else
  721.             {
  722.                 strmid(BizzInfo[bouse][bMessage], result, 0, 64, 255);
  723.                 format(string, sizeof(string), "Businessname wurde auf %s geändert",BizzInfo[bouse][bMessage]);
  724.             }
  725.             new string3[160];
  726.             if(BizzInfo[bouse][bOwned] == 1)
  727.             {
  728.                 format(string3, sizeof(string3), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", BizzInfo[bouse][bMessage],BizzInfo[bouse][bOwner],BizzInfo[bouse][bExtortion],BizzInfo[bouse][bEntranceCost],BizzInfo[bouse][bLevelNeeded],BizzInfo[bouse][bProducts],BizzInfo[bouse][bMaxProducts],BizzInfo[bouse][bPriceProd]);
  729.                 Update3DTextLabelText(BizzInfo[bouse][bText],COLOR_BUYED,string3);
  730.             }
  731.             new string4[160];
  732.             if(SBizzInfo[bouse-100][sbOwned] == 1)
  733.             {
  734.                 format(string4, sizeof(string4), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", SBizzInfo[bouse-100][sbMessage],SBizzInfo[bouse-100][sbOwner],SBizzInfo[bouse-100][sbExtortion],SBizzInfo[bouse-100][sbEntranceCost],SBizzInfo[bouse-100][sbLevelNeeded],SBizzInfo[bouse-100][sbProducts],SBizzInfo[bouse-100][sbMaxProducts], SBizzInfo[bouse-100][sbPriceProd]);
  735.                 Update3DTextLabelText(SBizzInfo[bouse-100][sbText],COLOR_BUYED,string4);
  736.             }
  737.             OnPropUpdate();
  738.             SendClientMessage(playerid, COLOR_WHITE, string);
  739.         }
  740.         return 1;
  741.     }
  742.     if(strcmp(cmd, "/bizkasse", true) == 0)
  743.     {
  744.         if(IsPlayerConnected(playerid))
  745.         {
  746.             new bouse = PlayerInfo[playerid][pPbiskey];
  747.             if (bouse == 255)
  748.             {
  749.                 SendClientMessage(playerid, COLOR_GRAD2, "   Dir gehört kein Geschäfft");
  750.                 return 1;
  751.             }
  752.             tmp = strtok(cmdtext, idx);
  753.             if(!strlen(tmp))
  754.             {
  755.                 if (bouse >= 100)
  756.                 {
  757.                     format(string, sizeof(string), "  Du hast $%d in deiner Kasse.", SBizzInfo[bouse-100][sbTill]);
  758.                     SendClientMessage(playerid, COLOR_GRAD3, string);
  759.                 }
  760.                 else
  761.                 {
  762.                     format(string, sizeof(string), "  Du hast $%d in deiner Kasse.", BizzInfo[bouse][bTill]);
  763.                     SendClientMessage(playerid, COLOR_GRAD3, string);
  764.                 }
  765.                 SendClientMessage(playerid, COLOR_GRAD2, "NUTZE: /bizkasse [Betrag]");
  766.                 return 1;
  767.             }
  768.             new cashdeposit = strval(tmp);
  769.             if(!strlen(tmp))
  770.             {
  771.                 SendClientMessage(playerid, COLOR_GRAD2, "NUTZE: /bizkasse [Betrag]");
  772.                 return 1;
  773.             }
  774.             if (bouse >= 100)
  775.             {
  776.                 if(cashdeposit > SBizzInfo[bouse-100][sbTill] || cashdeposit < 1)
  777.                 {
  778.                     SendClientMessage(playerid, COLOR_GRAD2, "   Du hast nicht so viel Geld");
  779.                     return 1;
  780.                 }
  781.             }
  782.             else
  783.             {
  784.                 if (cashdeposit > BizzInfo[bouse][bTill] || cashdeposit < 1)
  785.                 {
  786.                     SendClientMessage(playerid, COLOR_GRAD2, "   Du hast nicht so viel Geld");
  787.                     return 1;
  788.                 }
  789.             }
  790.             if (bouse >= 100)
  791.             {
  792.                 if(!IsPlayerInRangeOfPoint(playerid,100.0,SBizzInfo[bouse-100][sbEntranceX],SBizzInfo[bouse-100][sbEntranceY],SBizzInfo[bouse-100][sbEntranceZ]))
  793.                 {
  794.                     SendClientMessage(playerid, COLOR_GRAD2, "   Du bist zu weit von deinem Geschäfft entfernt");
  795.                     return 1;
  796.                 }
  797.                 else
  798.                 {
  799.                     ConsumingMoney[playerid] = 1;
  800.                     GivePlayerMoney(playerid,cashdeposit);
  801.                     SBizzInfo[bouse-100][sbTill] -= cashdeposit;
  802.                     format(string, sizeof(string), "  Du hast $%d aus deiner Kasse genommen Total: $%d ", cashdeposit,SBizzInfo[bouse-100][sbTill]);
  803.                     OnPropUpdate();
  804.                     SendClientMessage(playerid, COLOR_YELLOW, string);
  805.                     return 1;
  806.                 }
  807.             }
  808.             else
  809.             {
  810.                 if (!IsPlayerInRangeOfPoint(playerid,100.0,BizzInfo[bouse][bExitX],BizzInfo[bouse][bExitY],BizzInfo[bouse][bExitZ]))
  811.                 {
  812.                     SendClientMessage(playerid, COLOR_GRAD2, "   Du bist zu weit von deinem Geschäfft entfernt");
  813.                     return 1;
  814.                 }
  815.                 else
  816.                 {
  817.                     ConsumingMoney[playerid] = 1;
  818.                     GivePlayerMoney(playerid,cashdeposit);
  819.                     BizzInfo[bouse][bTill] -= cashdeposit;
  820.                     format(string, sizeof(string), "  Du hast $%d aus deiner Kasse genommen Total: $%d ", cashdeposit,BizzInfo[bouse][bTill]);
  821.                     OnPropUpdate();
  822.                     SendClientMessage(playerid, COLOR_YELLOW, string);
  823.                     return 1;
  824.                 }
  825.             }
  826.         }
  827.         return 1;
  828.     }
  829.     if(strcmp(cmd, "/bizbank", true) == 0)
  830.     {
  831.         if(IsPlayerConnected(playerid))
  832.         {
  833.             new bouse = PlayerInfo[playerid][pPbiskey];
  834.             if (bouse == 255)
  835.             {
  836.                 SendClientMessage(playerid, COLOR_GRAD2, "   Dir gehört kein Geschäfft");
  837.                 return 1;
  838.             }
  839.             tmp = strtok(cmdtext, idx);
  840.             if(!strlen(tmp))
  841.             {
  842.                 if (bouse >= 100)
  843.                 {
  844.                     format(string, sizeof(string), "  Du hast $%d in deiner Kasse.", SBizzInfo[bouse-100][sbTill]);
  845.                     SendClientMessage(playerid, COLOR_GRAD3, string);
  846.                 }
  847.                 else
  848.                 {
  849.                     format(string, sizeof(string), "  Du hast $%d in deiner Kasse.", BizzInfo[bouse][bTill]);
  850.                     SendClientMessage(playerid, COLOR_GRAD3, string);
  851.                 }
  852.                 SendClientMessage(playerid, COLOR_GRAD2, "NUTZER: /bizbank [Betrag]");
  853.                 return 1;
  854.             }
  855.             new cashdeposit = strval(tmp);
  856.             if(!strlen(tmp))
  857.             {
  858.                 SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /bizbank [nutze]");
  859.                 SendClientMessage(playerid, COLOR_GRAD3, string);
  860.                 return 1;
  861.             }
  862.             if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
  863.             {
  864.                 SendClientMessage(playerid, COLOR_GRAD2, "   Du hast nicht so viel");
  865.                 return 1;
  866.             }
  867.             if (bouse >= 100)
  868.             {
  869.                 if(!IsPlayerInRangeOfPoint(playerid,100.0,SBizzInfo[bouse-100][sbEntranceX],SBizzInfo[bouse-100][sbEntranceY],SBizzInfo[bouse-100][sbEntranceZ]))
  870.                 {
  871.                     SendClientMessage(playerid, COLOR_GRAD2, "   Du bist zu weit von deinem Geschäfft entfernt");
  872.                     return 1;
  873.                 }
  874.                 else
  875.                 {
  876.                     GivePlayerMoney(playerid,-cashdeposit);
  877.                     SBizzInfo[bouse-100][sbTill] += cashdeposit;
  878.                     ExtortionSBiz(bouse-100, cashdeposit);
  879.                     format(string, sizeof(string), "  Du hast $%d in die Kasse getan Total: $%d ", cashdeposit,SBizzInfo[bouse-100][sbTill]);
  880.                     OnPropUpdate();
  881.                     SendClientMessage(playerid, COLOR_YELLOW, string);
  882.                     return 1;
  883.                 }
  884.             }
  885.             else
  886.             {
  887.                 if (!IsPlayerInRangeOfPoint(playerid,100.0,BizzInfo[bouse][bExitX],BizzInfo[bouse][bExitY],BizzInfo[bouse][bExitZ]))
  888.                 {
  889.                     SendClientMessage(playerid, COLOR_GRAD2, "   Du bist zu weit von deinem Geschäfft entfernt");
  890.                     return 1;
  891.                 }
  892.                 else
  893.                 {
  894.                     GivePlayerMoney(playerid,-cashdeposit);
  895.                     BizzInfo[bouse][bTill] += cashdeposit;
  896.                     ExtortionBiz(bouse, cashdeposit);
  897.                     format(string, sizeof(string), "  Du hast $%d in die Kasse getan Total: $%d ", cashdeposit,BizzInfo[bouse][bTill]);
  898.                     OnPropUpdate();
  899.                     SendClientMessage(playerid, COLOR_YELLOW, string);
  900.                     return 1;
  901.                 }
  902.             }
  903.         }
  904.         return 1;
  905.     }
Advertisement
Add Comment
Please, Sign In to add comment