(Pomoc)RentCar

Započeo David003, Maj 17, 2012, 23:12:33 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:City Life
Opis problema: Kako da stavim aute na rent?  :(
Dio skripte: /
Video/Slika: /

Uskoro!
Usput trazim mapera,inbox zainteresirani!

Snich

Jesi koristio trazilicu, vjerujem da ima nekakav TuT  ::)

Koristio sam i nasao sam 1 Tut ali je lose objasneno  :'(
Meni treba samo kako da stavim auto na rent a komande /rent i /unrent vec imam

Uskoro!
Usput trazim mapera,inbox zainteresirani!

sch

*

IsARentACar ili IsARentABike i ubacuj,i na komandu staviš /rent i /unrent to,i ubaciš ono sa kolima,kako ide System u City Life skripti ono npr new rentcar [2]
I onda kada ono dodajes vehicle
rentcar [1] = AddStaticVeh (...........)
Pawn Scripting Arbaiter
Willfried Schafer

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      if(newcar >= ID VOZILA && newcar <= ID VOZILA)
      {
         if (HireCar[playerid] != newcar)
         {
            format(string, sizeof(string), "~w~Mozete iznajmiti ovaj auto~n~Cena:~g~$200~n~~w~Da iznajmite kucajte ~g~/rentcar~w~~n~da izadjete kucajte ~r~/exit");
            TogglePlayerControllable(playerid, 0);
            GameTextForPlayer(playerid, string, 5000, 3);
         }
      }
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   if(strcmp(cmd, "/rentcar", true) == 0)
   {
        if(IsPlayerConnected(playerid))
      {
         if(GetPlayerVehicleID(playerid) >= ID VOZILA && GetPlayerVehicleID(playerid) <= ID VOZILA)
         {
            new hirefee = HireCost(GetPlayerVehicleID(playerid));
            if(SBizzInfo[0][sbProducts] == 0)
            {
               GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
               return 1;
            }
            if (GetPlayerMoney(playerid) <  500)
            {
               SendClientMessage(playerid, COLOR_GRAD2, "   Nemate toliko novca !");
               return 1;
            }
            if(HireCar[playerid] != 299)
            {
               gCarLock[HireCar[playerid]] = 0;
               UnLockCar(HireCar[playerid]);
               SendClientMessage(playerid, COLOR_GREY, "Morate prvo da vratite iznajmljeni auto/motor/camac !");
               return 1;
            }
            foreach (Player, i)
            {
                if(HireCar == GetPlayerVehicleID(playerid))
                {
                    SendClientMessage(playerid, COLOR_GREY, "    Neko je vec iznajmio ovaj auto !");
                    return 1;
                }
            }
            SafeGivePlayerMoney(playerid,-200);
            SBizzInfo[0][sbTill] += 500;
            ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]);
            SBizzInfo[0][sbProducts]--;
            HireCar[playerid] = GetPlayerVehicleID(playerid);
            OnPropUpdate();
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            format(string, sizeof(string), "~w~Nemojte zaboraviti da ~r~/unrentcar~n~~g~/lock ~w~da zakljucate auto.",hirefee);
            SendClientMessage(playerid, COLOR_YELLOW2, "Sada mozete upaliti motor !");
            gEngine[playerid] = 0;
            engineOn[GetPlayerVehicleID(playerid)] = false;
            GameTextForPlayer(playerid, string, 5000, 3);
         }
      }
      return 1;
   }
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Ako bude izbacivalo erore reci :D