[POMOC]Koci mi

Započeo Axone, Septembar 05, 2012, 17:24:00 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Axone

Skripta koju koristim:Nebitno, jedan moj edit

Detaljan opis problema:Evo mene opet, izvinite, samo jos jedna pomoc pls. Sta mi se poremetilo i sta da uradim protiv toga jer mi kad se ulazi u biznis,kucu,stan, kada se renta motor, kada se kupi biznis,kuca,stan... zabaguje slika i mora da se ceka oko minut da se odbaguje da moze da se nastavi da igra, u cemu je problem i sta da uradim, pls neko pomoc tnx :) ?

Deo skripte: /
Neke slike/video za lakse dobivanje pomoci(neobavezno): /

Molim neko pomoc za ovo dvoje, hvala unapred.....


Axone

Pazi kada se kuca /enter izbaci ono da su koande /enterhouse i /enterbiz, i te su komande, a za rent eo:

if(strcmp(cmd, "/rentcar", true) == 0)
   {
        if(IsPlayerConnected(playerid))
      {
         if(GetPlayerVehicleID(playerid) >= 143 && GetPlayerVehicleID(playerid) <= 152)
         {
            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;
                }
            }
            /*if(PlayerInfo[playerid][pPbiskey] == 1)
            {
               GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
               TogglePlayerControllable(playerid, 1);
               return 1;
            }*/
            SafeGivePlayerMoney(playerid,-500);
            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;
            //TogglePlayerControllable(playerid, 1);
            GameTextForPlayer(playerid, string, 5000, 3);
         }
      }
      return 1;
   }



if(strcmp(cmd, "/rentbike", true) == 0)
   {
        if(IsPlayerConnected(playerid))
      {
         if(GetPlayerVehicleID(playerid) >= 153 && GetPlayerVehicleID(playerid) <= 177)
         {
            new hirefee = HireCost(GetPlayerVehicleID(playerid));
            if(SBizzInfo[0][sbProducts] == 0)
            {
               GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
               return 1;
            }
            /*if(PlayerInfo[playerid][pPbiskey] == 0)
            {
               GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
               TogglePlayerControllable(playerid, 1);
               return 1;
            }*/
            if (GetPlayerMoney(playerid) <  SBizzInfo[0][sbEntranceCost])
            {
               SendClientMessage(playerid, COLOR_GRAD2, "   Nemate dovoljno 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 motor !");
                    return 1;
                }
            }
            SafeGivePlayerMoney(playerid,-SBizzInfo[0][sbEntranceCost]);
            SBizzInfo[0][sbTill] += SBizzInfo[0][sbEntranceCost];
            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 ~b~/unrentbike~n~~g~/lock ~w~da zakljucate motor",hirefee);
            TogglePlayerControllable(playerid, 1);
            gEngine[GetPlayerVehicleID(playerid)] = 1;
            GameTextForPlayer(playerid, string, 5000, 3);
         }
      }
      return 1;
   }

Axone

e a vidi mi ovo za /enterbiz i /enterhouse u cemu je problem da se ceka mng dok se udje i kad se kupi kuca:

if(strcmp(cmd, "/enterbiz", true) == 0)
   {
         for(new i = 0; i < 150; i++)
         {
            if (PlayerToPoint(3, playerid,BizzInfo[bEntranceX], BizzInfo[bEntranceY], BizzInfo[bEntranceZ]))
            {
               //printf("Found House :%d",i);
               if(!IsACop(playerid) && i == 3)
               {
                   SendClientMessage(playerid, COLOR_GREY, "   Samo Policija !");
                   return 1;
               }
               if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[bEntranceCost])
               {
                  if(PlayerInfo[playerid][pPbiskey] != i)
                  {
                     if(BizzInfo[bLocked] == 1)
                     {
                        GameTextForPlayer(playerid, "~r~Zatvoreno", 5000, 1);
                        return 1;
                     }
                     if(BizzInfo[bProducts] == 0)
                     {
                        GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
                        return 1;
                     }
                     if (PlayerToPoint(3.0, playerid,1199.323974,-918.954528,43.116638))
                     {
                        OnPlayerEnterFood(playerid, 5);
                     }
                     else if (PlayerToPoint(3.0, playerid,811.321411,-1616.181030,13.546875))
                     {
                        OnPlayerEnterFood(playerid, 6);
                     }
                     else if (PlayerToPoint(3.0, playerid,927.906250,-1352.942626,13.343750))
                     {
                        OnPlayerEnterFood(playerid, 7);
                     }
                     SafeGivePlayerMoney(playerid,-BizzInfo[bEntranceCost]);
                     format(string, sizeof(string), "~r~-$%d~n~~w~kucajte /exit~n~da izadjete", BizzInfo[bEntranceCost]);
                     BizzInfo[bTill] += BizzInfo[bEntranceCost];
                     ExtortionBiz(i, BizzInfo[bEntranceCost]);
                     BizzInfo[bProducts]--;
                     OnPropUpdate();
                     GameTextForPlayer(playerid, string, 5000, 3);
                  }
                  SetPlayerVirtualWorld(playerid,i);
                  SetPlayerInterior(playerid,BizzInfo[bInterior]);
                  SetPlayerPos(playerid,BizzInfo[bExitX],BizzInfo[bExitY],BizzInfo[bExitZ]);
                  PlayerInfo[playerid][pInt] = BizzInfo[bInterior];
                  PlayerInfo[playerid][pLocal] = i+99;
                  new dood[MAX_PLAYER_NAME];
                  ubizu[playerid]=i;
                  GetPlayerName(playerid, dood, sizeof(dood));
                  format(string, sizeof(string), "%s je platio $%d da bi usao u biznis %d", dood, BizzInfo[bEntranceCost], i);
                  printf("%s", string);
                  PayLog(string);
                  if(BizzInfo[bTip]==1)
{
SendClientMessage(playerid, COLOR_GREY, "Prodavan:Da kupite listic koristite /listic!");
}
else if(BizzInfo[bTip]==2)
{
SendClientMessage(playerid, COLOR_GREY, "Prodavan:Da se osisate koristite /sisanje!");
}
else if(BizzInfo[bTip]==3)
{
SendClientMessage(playerid, COLOR_GREY, "Prodavan:Da popijete pice koristite /naruci!");
}
else if(BizzInfo[bTip]==4)
{
SendClientMessage(playerid, COLOR_GREY," Prodavan:Da pojedete nesto koristite /meni!");
}
else if(BizzInfo[bTip]==5)
{
SendClientMessage(playerid, COLOR_GREY, "Prodavan:Da pojedete nesto koristite /restoran!!");
}
else if(BizzInfo[bTip]==6)
{
SendClientMessage(playerid, COLOR_GREY," Prodavan:Da nadjete sebi odelo koristite /odeca!");
}
else if(BizzInfo[bTip]==7)
{
SendClientMessage(playerid, COLOR_GREY," Prodavan:Da kupite oruzije koristite /buygun!");
}
else if(BizzInfo[bTip]==8)
{
SendClientMessage(playerid, COLOR_GREY, "Prodavan:Da kupite stvari koristite /kupi");
}
                  //PlayerInfo[playerid][pLocal] = i;
               }
               else
               {
                  GameTextForPlayer(playerid, "~r~Nemate dovoljno novca", 5000, 1);
               }
            }
         }
         return 1;
   }






if(strcmp(cmd, "/entersbiz", true) == 0)
   {
         for(new i = 0; i < sizeof(SBizzInfo); i++)
         {
            if (PlayerToPoint(3, playerid,SBizzInfo[sbEntranceX], SBizzInfo[sbEntranceY], SBizzInfo[sbEntranceZ]))
            {
               if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[sbEntranceCost])
               {
                  if(PlayerInfo[playerid][pPbiskey] != i)
                  {
                     if(SBizzInfo[sbLocked] == 1)
                     {
                        GameTextForPlayer(playerid, "~r~Zatvoreno", 5000, 1);
                        return 1;
                     }
                     if(SBizzInfo[sbProducts] == 0)
                     {
                        GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
                        return 1;
                     }
                     if(i == 10)
                     {
                         PaintballPlayers ++;
                         PlayerPaintballing[playerid] = 1;
                         new rand = random(sizeof(PaintballSpawns));
                        SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
                        TogglePlayerControllable(playerid, 0);
                     }
                     else if(i == 11)
                     {
                         PlayerKarting[playerid] = 1;
                         SendClientMessage(playerid, TEAM_GROVE_COLOR, "Sada mozete ucestvovati u Karting Trci, sjednite u vozilo.");
                     }
                     else
                     {
                         return 1;
                     }
                     SafeGivePlayerMoney(playerid,-SBizzInfo[sbEntranceCost]);
                     gSpentCash[playerid] = GetPlayerMoney(playerid);
                     SBizzInfo[sbProducts]--;
                     SBizzInfo[sbTill] += SBizzInfo[sbEntranceCost];
                     ExtortionSBiz(i, SBizzInfo[sbEntranceCost]);
                     new dood[MAX_PLAYER_NAME];
                     GetPlayerName(playerid, dood, sizeof(dood));
                     format(string, sizeof(string), "%s je platio $%d da udje u sbiz %d", dood, SBizzInfo[sbEntranceCost], i);
                     printf("%s", string);
                     PayLog(string);
                     OnPropUpdate();
                  }
               }
               else
               {
                  GameTextForPlayer(playerid, "~r~Nemate dovoljno novca", 5000, 1);
               }
            }
         }
                  return 1;
}






if(strcmp(cmd, "/buyhouse", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
             if(PlayerToPoint(50.0, playerid,0.0,0.0,0.0))
{
SendClientMessage(playerid, COLOR_WHITE, "Greska!");
return 1;
}
         new Float:oldposx, Float:oldposy, Float:oldposz;
         GetPlayerName(playerid, playername, sizeof(playername));
         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
         for(new h = 0; h < sizeof(HouseInfo); h++)
         {
            if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
            {
               if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
               {
                  format(string, sizeof(string), "   Morate biit Level %d da biste kupili ovo !", HouseInfo[h][hLevel]);
                  SendClientMessage(playerid, COLOR_GRAD5, string);
                  return 1;
               }
               if(PlayerInfo[playerid][pPhousekey] != 999 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
               {
                  SendClientMessage(playerid, COLOR_WHITE, "   Vec posjedujete kucu, kucajte /sellhouse ako zelite da kupite ovu !");
                  return 1;
               }
               if(GetPlayerMoney(playerid) >= HouseInfo[h][hValue])
               {
                        //DestroyDynamic3DTextLabel(Text3D:housesale);
                  PlayerInfo[playerid][pPhousekey] = h;
                  HouseInfo[h][hOwned] = 1;
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
                  SafeGivePlayerMoney(playerid,-HouseInfo[h][hValue]);
                  /*SetPlayerInterior(playerid,HouseInfo[h][hInt]);
                  SetPlayerVirtualWorld(playerid,HouseInfo[h][hWorld]);
                  SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);*/
                  GameTextForPlayer(playerid, "~w~Dobrodosli Kuci~n~Mozete uvjek izaci tako sto cete doci do ulaznih vrata i kucati /exit", 5000, 3);
                  PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
                  PlayerInfo[playerid][pLocal] = h;
                  DestroyPickup(houspc[h]);
                  HouseInfo[h][hNeakt] = 0;
                  houspc[h] =   CreatePickup(1272, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
                  DestroyDynamicMapIcon(housmark[h]);
                  housmark[h] =  CreateDynamicMapIcon(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],32,0);
                  new result[500];
       format(result,sizeof(result),"{0a92fa}Vlasnik {FFFFFF}%s\n{0a92fa}Neaktivnost:{FFFFFF}%d {0a92fa}h\n{0a92fa}Vrsta: {FFFFFF}%s\n{0a92fa}Level: {FFFFFF}%d\n{0a92fa}Rent:{FFFFFF} $%d\n {0a92fa}Da rentate: {FFFFFF}/rentroom", HouseInfo[h][hOwner],HouseInfo[h][hNeakt],HouseInfo[h][hDiscription],HouseInfo[h][hLevel], HouseInfo[h][hRent]);
                  UpdateDynamic3DTextLabelText(housesale[h], 0x00FFFFFF,result);
                  SendClientMessage(playerid, COLOR_WHITE, "Cestitamo vam na kupovini nove kuce !");
                  SendClientMessage(playerid, COLOR_WHITE, "Kucajte /help da biste dobili pomoc vezanu za kucu !");
                  //DestroyDynamic3DTextLabel(Text3D:housesale);
                        DateProp(playerid);
                  SaveKuce();
                  OnPlayerUpdateCustom(playerid);
                  return 1;
               }
               else
               {
                  SendClientMessage(playerid, COLOR_WHITE, "   Nemate dovoljno novca za kupovinu !");
                  return 1;
               }
            }
         }
      }
      return 1;
   }