[pomo]rent auta

Započeo Aldin Begovic, Oktobar 20, 2011, 16:36:39 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: gta rp
Detaljan opis problema:ovako evo pocelo mi se desavat cudni problemi a to su nemogu da rentam auto pise nemamo robe nezz sto ??? moze neko pomoc
Dio skripte:
   CMD:rent(playerid, params[])
   {
         new carid = GetPlayerVehicleID(playerid);
            if(IsARentCar(carid))
            {
               if(!IsPlayerInAnyVehicle(playerid))
               return SCM(playerid, GREY, "Nisi u vozilu!");
               if(SBusinesses[8][sbSupplies] == 0)
               {
                  GameTextForPlayer(playerid, "~r~Nemamo robe", 5000, 1);
                  return 1;
               }
               if (GetPlayerCash(playerid) <  SBusinesses[8][sbProductPrice1])
               {
                  SendClientMessage(playerid, COLOR_GRAD2, "  *Nemas dovoljno novca !");
                  return 1;
               }
               
               TextDrawHideForPlayer(playerid,Cijena1[playerid]);
               
               TextDrawHideForPlayer(playerid, Rentcar);
               GivePlayerCash(playerid,-SBusinesses[8][sbProductPrice1]);
               
               SBusinesses[8][sbVault] += SBusinesses[8][sbProductPrice1];
               SBusinesses[8][sbSupplies]--;
               HireCar[playerid] = GetPlayerVehicleID(playerid);
               OnPropTextdrawUpdate();
               SaveSBusiness(8);
               SetVehicleNumberPlate(HireCar[playerid], "{800000}Rentano");
               PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
               TogglePlayerControllable(playerid, 1);
               SendClientMessage(playerid, COLOR_GRAD2, "   {FFFFFF}*Iznajmio si vozilo! Koristi {3198FF}/lock  {FFFFFF}da ga zakljucas !");
               return 1;
               
               }
            else if(IsAnAvioRent(carid))
            {
               if(!IsPlayerInAnyVehicle(playerid))
               return SCM(playerid, GREY, "Nisi u vozilu!");
               if(SBusinesses[32][sbSupplies] == 0)
               {
                  GameTextForPlayer(playerid, "~r~Nemamo robe", 5000, 1);
                  return 1;
               }
               if (GetPlayerCash(playerid) <  SBusinesses[32][sbProductPrice1])
               {
                  SendClientMessage(playerid, COLOR_GRAD2, "  *Nemas dovoljno novca !");
                  return 1;
               }
               
               TextDrawHideForPlayer(playerid,Cijena1[playerid]);
               
               TextDrawHideForPlayer(playerid, Rentcar);
               GivePlayerCash(playerid,-SBusinesses[32][sbProductPrice1]);
               
               SBusinesses[32][sbVault] += SBusinesses[32][sbProductPrice1];
               SBusinesses[32][sbSupplies]--;
               HireCar[playerid] = GetPlayerVehicleID(playerid);
               OnPropTextdrawUpdate();
               SaveSBusiness(32);
               PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
               TogglePlayerControllable(playerid, 1);
               SendClientMessage(playerid, COLOR_GRAD2, "   {FFFFFF}*Iznajmio si letjelicu! Koristi {3198FF}/lock  {FFFFFF}da je zakljucas !");
               return 1;
               
               }
               else if(IsABike25(carid))
            {
               if(!IsPlayerInAnyVehicle(playerid))
               return SCM(playerid, GREY, "Nisi u vozilu!");
               if(SBusinesses[25][sbSupplies] == 0)
               {
                  GameTextForPlayer(playerid, "~r~Nemamo robe", 5000, 1);
                  return 1;
               }
               if (GetPlayerCash(playerid) <  SBusinesses[25][sbProductPrice1])
               {
                  SendClientMessage(playerid, COLOR_GRAD2, "  *Nemas dovoljno novca !");
                  return 1;
               }
               
               TextDrawHideForPlayer(playerid,Cijena1[playerid]);
               
               TextDrawHideForPlayer(playerid, Rentcar);
               GivePlayerCash(playerid,-SBusinesses[25][sbProductPrice1]);
               
               SBusinesses[25][sbVault] += SBusinesses[25][sbProductPrice1];
               SBusinesses[25][sbSupplies]--;
               HireCar[playerid] = GetPlayerVehicleID(playerid);
               OnPropTextdrawUpdate();
               SaveSBusiness(25);
               PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
               TogglePlayerControllable(playerid, 1);
               SendClientMessage(playerid, COLOR_GRAD2, "   {FFFFFF}*Iznajmio si Biciklu! Koristi {3198FF}/lock {FFFFFF}je ga zakljucas !");
               return 1;
               
               }
         else if(IsARentBike(carid) || IsARentBike1(carid))
               {
               if(!IsPlayerInAnyVehicle(playerid))
               return SCM(playerid, GREY, "Nisi u vozilu!");
               if(SBusinesses[7][sbSupplies] == 0)
               {
                  GameTextForPlayer(playerid, "~r~Nemamo robe", 5000, 1);
               return 1;
               }
               if (GetPlayerCash(playerid) <  SBusinesses[7][sbProductPrice1])
               {
                  SendClientMessage(playerid, COLOR_GRAD2, "   *Nemas dovoljno novca !");
                  return 1;
               }
               TextDrawHideForPlayer(playerid,Cijena1[playerid]);
               
               TextDrawHideForPlayer(playerid, Rentcar);
               GivePlayerCash(playerid,-SBusinesses[7][sbProductPrice1]);
               SBusinesses[7][sbVault] += SBusinesses[7][sbProductPrice1];
               
               SBusinesses[7][sbSupplies]--;
               TogglePlayerControllable(playerid, 1);
               HireCar[playerid] = GetPlayerVehicleID(playerid);
               OnPropTextdrawUpdate();
               SaveSBusiness(7);
               PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
               SendClientMessage(playerid, COLOR_GRAD2, "   {FFFFFF}*Iznajmio si vozilo! Koristi {3198FF}/lock  {FFFFFF}da ga zakljucas !");
               TogglePlayerControllable(playerid, 1);
               
               return 1;
               }
      return 1;
   }
Neke slike/video za lakse dobivanje pomoci(neobavezno): Nadam se da ste razumjeli

dragan12

               if(SBusinesses[8][sbSupplies] == 0)
               {
                  GameTextForPlayer(playerid, "~r~Nemamo robe", 5000, 1);
                  return 1;
               }

Ili ukloni za produkte to iz komande ili uzmi kamion i odvezi kamionom produkte tamo to je posao.

hvala gagi nez po koji put rijesio sam :D