[Pomoc] payday

Započeo [G-Unit] Mich, Maj 09, 2011, 21:30:22 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Cyber
Detaljan opis problema:Zanima me kako da se payday stavi da bude u dijalogu?
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):

Mene zanima kako da nam das PayDay();

EDIT: I da, zanima me da pocnes koristiti trazilicu
Poslednja Izmena: Maj 09, 2011, 21:33:34 POSLE PODNE od [AG] BloodMaster

evo:
public PayDay()
{
   new string[128];
   new account,interest;
   new rent = 0;
   foreach(Player, i)
   {

          if(PlayerInfo[pLevel] > 0)
          {
                    new nxtlevel = PlayerInfo[pLevel]+1;
                    new expamount = nxtlevel*levelexp;
               if (PlayerInfo[pExp] >= expamount)
               {
                  format(string, sizeof(string), "~g~LEVEL UP~n~~w~sada si level %d", nxtlevel);
                  PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
                  PlayerPlayMusic(i);
                  PlayerInfo[pLevel]++;
                  if(PlayerInfo[twixDonatorRank] > 0)
                  {
                      PlayerInfo[pExp] -= expamount;
                      new total = PlayerInfo[pExp];
                      if(total > 0)
                      {
                          PlayerInfo[pExp] = total;
                      }
                      else
                      {
                          PlayerInfo[pExp] = 0;
                      }
                  }
                  else
                  {
                     PlayerInfo[pExp] = 0;
                  }
                  PlayerInfo[gPupgrade] = PlayerInfo[gPupgrade]+2;
                  GameTextForPlayer(i, string, 5000, 1);
               }
            }
             if(MoneyMessage==1)
            {
                SendClientMessage(i, CRVENA, "[INFO]: Nisi uspio platiti dug | Zatvor");
                GameTextForPlayer(i, "~r~Busted!", 2000, 1);
                SetPlayerInterior(i, 6);
                  SetPlayerPos(i, 263.7133,81.4963,1001.0391);
                  PlayerInfo[pJailed] = 1;
                  ResetPlayerWeapons(i);
               WantedLevel = 0;
               PlayerInfo[pJailTime] = 240;
               format(string, sizeof(string), "Zatvoren si na %d sekundi | Nagodba: -", PlayerInfo[pJailTime]);
               SendClientMessage(i, COLOR_TEXT, string);
            }
            new playername2[MAX_PLAYER_NAME];
            GetPlayerName(i, playername2, sizeof(playername2));
            account = PlayerInfo[pAccount];
            new key = PlayerInfo[pPhousekey];
            if(key != 255)
            {
               rent = HouseInfo[key][hRent];
               if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
               {
                  rent = 0;
               }
               else if(rent > JB_GetPlayerMoney(i))
               {
                  PlayerInfo[pPhousekey] = 255;
                  SendClientMessage(i, CRVENA, "[INFO]: Upravo ste iseljeni!");
                  rent = 0;
               }
               HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
            }
            new tmpintrate;
            if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
            {
                if(PlayerInfo[twixDonatorRank] > 0) { tmpintrate = intrate+4; }
               else { tmpintrate = intrate+2; }
            }
            else
            {
                if(PlayerInfo[twixDonatorRank] > 0) { tmpintrate = 3; }
               else { tmpintrate = 1; }
            }
            if(PlayerInfo[pPayDay] >= 5)
            {
                Tax += TaxValue;
                PlayerInfo[pAccount] -= TaxValue;
                if(PlayerInfo[twixDonatorRank] > 0)
               {
                   new bonus = PlayerInfo[pPayCheck] / 2;
                   PlayerInfo[pPayCheck] += bonus;
               }
               new checks = PlayerInfo[pPayCheck];
                new ebill = (PlayerInfo[pAccount]/10000)*(PlayerInfo[pLevel]);
                ConsumingMoney = 1;
                JB_GivePlayerMoney(i, checks/5);
                if(PlayerInfo[pAccount] > 0)
                {
                   PlayerInfo[pAccount] -= ebill;
                   SBizzInfo[4][sbTill] += ebill;
               }
               else
               {
                   ebill = 0;
               }
               interest = (PlayerInfo[pAccount]/1000)*(tmpintrate);
               PlayerInfo[pExp]++;
               PlayerPlayMusic(i);
               PlayerInfo[pAccount] = account+interest;
               SendClientMessage(i, CRVENA, "[===============[ PLACA ]===============]");
               format(string, sizeof(string), "Plata: %d$   Porez: -%d$", checks/5, TaxValue);
               SendClientMessage(i, BELA, string);
               if(PlayerInfo[pPhousekey] != 255 || PlayerInfo[pPbiskey] != 255)
               {
                   format(string, sizeof(string), "Racuni: -%d$", ebill);
                  SendClientMessage(i, BELA, string);
               }
               format(string, sizeof(string), "Stanje: %d$", account);
               SendClientMessage(i, BELA, string);
               format(string, sizeof(string), "Kamatna stopa: 0.%d",tmpintrate);
               SendClientMessage(i, BELA, string);
               format(string, sizeof(string), "Stecenih kamata: %d$", interest);
               SendClientMessage(i, BELA, string);
               SendClientMessage(i, CRVENA, "[======================================]");
               format(string, sizeof(string), "Novo stanje: %d$", PlayerInfo[pAccount]);
               SendClientMessage(i, BELA, string);
               format(string, sizeof(string), "Rent: -%d$", rent);
               SendClientMessage(i, BELA, string);
               format(string, sizeof(string), "~g~Placa");
               GameTextForPlayer(i, string, 5000, 1);
               rent = 0;
               PlayerInfo[pPayDay] = 0;
               PlayerInfo[pPayCheck] = 0;
               PlayerInfo[pConnectTime] += 1;
               if(PlayerInfo[pKredit]== 0)
                   {
                   PlayerInfo[pKredit] = 0;
               }
                   else if (PlayerInfo[pKredit]> 0)
                    {
               PlayerInfo[pKredit] = PlayerInfo[pKredit]-500;
               JB_GivePlayerMoney(i,500);
               SendClientMessage(i, PLAVA, "* Rata kredita -500$.");
                    }
               if(PlayerInfo[twixDonatorRank] > 0)
               {
                   PlayerInfo[pPayDayHad] += 1;
                   if(PlayerInfo[pPayDayHad] >= 5)
                   {
                       PlayerInfo[pExp]++;
                       PlayerInfo[pPayDayHad] = 0;
                   }
               }
            }
            else
            {
                SendClientMessage(i, COLOR_LIGHTRED, "G-Unit: Nisi dovoljno igrao da dobijes platu.");
            }
        }
   //   }
   //   }
   Checkprop();
   return 1;
}