[Pomoc] Firma

Započeo [UG]Cile, Novembar 17, 2011, 01:20:58 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Balkan Nations editiram
Detaljan opis problema: Nevalja komanda /kupifirmu, kad to kucam nece nista da izbaci :S
Dio skripte:
COMMAND:kupifirmu(playerid, params[])
{
   #pragma unused params
   new string[ 128 ], stringt[64];
   new bouse = PlayerInfo[playerid][pPbiskey];
   if( bouse != 255 || PlayerInfo[playerid][pPsbiskey] != 255)
   {
   SendClientMessage( playerid, WHITE, "Vec posjedujes firmu." );
   return 1;
   }
   if( bouse == 300 || PlayerInfo[playerid][pPsbiskey] == 300)
   {
      for(new b = 0; b < sizeof(Businesses); b++)
      {
          if(IsPlayerInRangeOfPoint( playerid, 5, Businesses[bExteriorX], Businesses[bExteriorY], Businesses[bExteriorZ]) )
          {
              if(strcmp(Businesses[bOwner1], "Niko", true) == 0 )
            {
               if(Businesses[bPrice] == -1)
               {
                   SendClientMessage( playerid, WHITE, "Zao nam je ova firma nije na prodaji." );
               }
               else
               {
                   if( GetPlayerCash(playerid) >= Businesses[bPrice] && PlayerInfo[playerid][pLevel] >= Businesses[bLevel])
                   {
                     new sendername[MAX_PLAYER_NAME];
                       GetPlayerName(playerid, sendername, sizeof(sendername));
                     strmid(Businesses[bOwner1], sendername, 0, strlen(sendername), 255);
                       GivePlayerCash(playerid, -Businesses[bPrice]);
                     KCijena[playerid] = TextDrawCreate(186.000000, 202.000000, "Kupili ste firmu za: -$");
      TextDrawBackgroundColor(KCijena[playerid], 255);
      TextDrawFont(KCijena[playerid], 1);
      TextDrawLetterSize(KCijena[playerid], 0.600000, 4.199999);
      TextDrawColor(KCijena[playerid], -1);
      TextDrawSetOutline(KCijena[playerid], 1);
      TextDrawSetProportional(KCijena[playerid], 1);
                     format( stringt, sizeof( stringt ), "~y~Kupili ste firmu za: ~g~%d$", Businesses[bPrice]);
                     TextDrawSetString(KCijena[playerid], stringt);
                     TextDrawShowForPlayer(playerid, Cestitka);
                     TextDrawShowForPlayer(playerid, KCijena[playerid]);
                     SetTimerEx("UnistikucaTxT",8000, false, "i", playerid);
                       PlayerInfo[playerid][pPbiskey] = b;
                     Businesses[bOwnedd] = 1;
                     OnPropTextdrawUpdate();
                     SacuvajIgraca(playerid);
                     SaveBusiness( b );
                     
                       if(Businesses[bType] == 1)
      {
      ShowPlayerDialog(playerid, PRODAVNICAMENU, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}24/7 Supermarket","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3", "Odaberi", "Ponisti");
      return 1;
      }
      if(Businesses[bType] == 2)
      {
      ShowPlayerDialog(playerid, CLOTHMENU, DIALOG_STYLE_LIST, "Odaberi interijer - {FFFF00}Clothes Shop","{0080C0}Binco\n{0080C0}Didier Sachs\n{0080C0}Sub Urban\n{0080C0}Victim \n{0080C0}ZIP", "Odaberi", "Ponisti");
      return 1;
      }
      if(Businesses[bType] == 7)
      {
      ShowPlayerDialog(playerid, 4891, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}Gun Shop","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3\n{0080C0}Interijer 4", "Odaberi", "Ponisti");
      return 1;
      }
      if(Businesses[bType] == 10)
      {
      ShowPlayerDialog(playerid, 5105, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}Teretana","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3", "Odaberi", "Ponisti");
      return 1;
      }
      if(Businesses[bType] == 3)
      {
      ShowPlayerDialog(playerid, 8504, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - Kafana","{0080C0}Interijer 1\n{0080C0}Interijer 2\n{0080C0}Interijer 3", "Odaberi", "Ponisti");
      return 1;
      }
      if(Businesses[bType] == 4)
      {
      ShowPlayerDialog(playerid, 8958, DIALOG_STYLE_LIST, "{FF0000}Odaberi Interijer - {FFFF00}Restoran","{0080C0}Interijer 1\n{0080C0}Interijer 2", "Odaberi", "Ponisti");
      return 1;
      }
                     if(Businesses[bType] == 5)
                     {
                     Businesses[bInteriorX] = - 100.42053222656;
                     Businesses[bInteriorY] = -24.546438217163;
                     Businesses[bInteriorZ] = 1000.71875;
                     Businesses[bInteriorID] = 3;
                     SaveBusiness( b );
                     return 1;
                     }
                     if(Businesses[bType] == 6)
                     {
                     Businesses[bInteriorX] = 363.72998046875;
                     Businesses[bInteriorY] = -74.745864868164;
                     Businesses[bInteriorZ] = 1001.5078125;
                     Businesses[bInteriorID] = 10;
                     SaveBusiness( b );
                     return 1;
                     }
                     if(Businesses[bType] == 8)
                     {
                     Businesses[bInteriorX] = 365.03305053711;
                     Businesses[bInteriorY] = -11.412439346313;
                     Businesses[bInteriorZ] = 1001.8515625;
                     Businesses[bInteriorID] = 9;
                     SaveBusiness( b );
                     return 1;
                     }
                     if(Businesses[bType] == 9)
                     {
                     Businesses[bInteriorX] = 493.4958190918;
                     Businesses[bInteriorY] = -24.089570999146;
                     Businesses[bInteriorZ] = 1000.6796875;
                     Businesses[bInteriorID] = 17;
                     SaveBusiness( b );
                     return 1;
                     }
                       SaveBusiness( b );
                     
                   }
                   else
                   {
                       SendClientMessage( playerid, WHITE, "Nemas dovoljno novca da kupis ovu firmu ili nemas dovoljno veliki level." );
                   }
                }
            }
          }
      }
   for(new b = 0; b < sizeof(SBusinesses); b++)
      {
          if(IsPlayerInRangeOfPoint( playerid, 5, SBusinesses[sbExteriorX], SBusinesses[sbExteriorY], SBusinesses[sbExteriorZ]) )
          {
              if(strcmp(SBusinesses[sbOwner1], "Niko", true) == 0 )
            {
               if(SBusinesses[sbPrice] == -1)
               {
                   SendClientMessage( playerid, WHITE, "Zao nam je ova firma nije na prodaji." );
               }
               else
               {
                   if( GetPlayerCash(playerid) >= SBusinesses[sbPrice] && PlayerInfo[playerid][pLevel] >= SBusinesses[sbLevel])
                   {
                     new sendername[MAX_PLAYER_NAME];
                     KCijena[playerid] = TextDrawCreate(186.000000, 202.000000, "Kupili ste kucu za: -$");
      TextDrawBackgroundColor(KCijena[playerid], 255);
      TextDrawFont(KCijena[playerid], 1);
      TextDrawLetterSize(KCijena[playerid], 0.600000, 4.199999);
      TextDrawColor(KCijena[playerid], -1);
      TextDrawSetOutline(KCijena[playerid], 1);
      TextDrawSetProportional(KCijena[playerid], 1);
                     format( stringt, sizeof( stringt ), "~y~Kupili ste firmu za: ~g~%d$", SBusinesses[sbPrice]);
                     TextDrawSetString(KCijena[playerid], stringt);
                     TextDrawShowForPlayer(playerid, Cestitka);
                     TextDrawShowForPlayer(playerid, KCijena[playerid]);
                       GetPlayerName(playerid, sendername, sizeof(sendername));
                     strmid(SBusinesses[sbOwner1], sendername, 0, strlen(sendername), 255);
                       GivePlayerCash(playerid, -SBusinesses[sbPrice]);
                       format( string, sizeof( string ), "Cestitamo! Sada ste vlasnik: %s.", SBusinesses[sbName] );
                     SetTimerEx("UnistikucaTxT",8000, false, "i", playerid);
                       SendClientMessage( playerid, ANNOUNCEMENT, string);
                       PlayerInfo[playerid][pPsbiskey] = b;
                     SBusinesses[sbOwnedd] = 1;
                     OnPropTextdrawUpdate();
                     SacuvajIgraca(playerid);
                     SaveSBusiness( b );
                   }
                   else
                   {
                       SendClientMessage( playerid, WHITE, "Nemas dovoljno novca da kupis ovu firmu ili nemas dovoljno veliki level." );
                   }
                }
            }
            else
            {
                SendClientMessage( playerid, WHITE, "Zao nam je ova firma nije na prodaji!" );
            }
          }
      }
   }
   return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno): /