[POMOC] PayDay

Započeo jura8308, Jun 30, 2013, 14:41:36 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: LARP edit
Detaljan opis problema:PayDay ne dolazi svakome, i ne dolazi svaki sat, nece se ukljucit poslije 7 sati ja mislim.....
Dio skripte:
public SyncTime()
{
   new string[64];
   new tmphour;
   new tmpminute;
   new tmpsecond;
   gettime(tmphour, tmpminute, tmpsecond);
   FixHour(tmphour);
   tmphour = shifthour;
   if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
   {
      format(string, sizeof(string), "{FFFFFF} Sada je {48E31C}%d:00 {FFFFFF}sati.",tmphour);
      BroadCast(COLOR_WHITE,string);
      ghour = tmphour;
      PayDay();
      if (realtime)
      {
         SetWorldTime(tmphour);
      }
   }
}







public PayDay()
{
   new string[500];
   new account,interest;
   new rent = 0;
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if(IsPlayerConnected(i))
      {
             if(MoneyMessage==1)
            {
            SendClientMessage(i, COLOR_ORANGE, "Niste uspjeli da vratite dug, idete u zatvor.");
                GameTextForPlayer(i, "~r~Uhapsen!", 3000, 5);
                new rand = random(sizeof(gRandomJailSpawns));
               SetPlayerPos(i, gRandomJailSpawns[rand][0], gRandomJailSpawns[rand][1], gRandomJailSpawns[rand][2]);
                    SetPlayerInterior(i, 0);
                  PlayerInfo[pJailed] = 1;
                  ResetPlayerWeapons(i);
                  ResetPlayerMoney(i);
               WantedPoints = 0;
               PlayerInfo[pJailTime] = 240;
               format(string, sizeof(string), "Zatvoren si %d sekundi.   Jamcevina: Ne", PlayerInfo[pJailTime]);
               SendClientMessage(i, COLOR_WHITE, string);
            }
            new playername2[MAX_PLAYER_NAME];
            GetPlayerName(i, playername2, sizeof(playername2));
            account = PlayerInfo[pAccount];
            new key = PlayerInfo[pPhousekey];

            new tmpintrate;
            if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
            {
                if(PlayerInfo[pDonateRank] > 0) { tmpintrate = intrate+4; }
               else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
            }
            else
            {
                if(PlayerInfo[pDonateRank] > 0) { tmpintrate = 3; }
               else { tmpintrate = 1; }
            }
            //PlayerInfo[pCash] = SafeJB_GivePlayerMoney(i);
         if(PlayerInfo[pPayDay] >= 5)
            {
                Tax += TaxValue;//Should work for every player online
                PlayerInfo[pAccount] -= TaxValue;
               new checks = PlayerInfo[pPayCheck] / 5;
               if(PlayerInfo[pDonateRank] > 0)
               {
                   new bonus = PlayerInfo[pPayCheck] / 10;
                   checks += bonus;
               }
                new ebill = (PlayerInfo[pAccount]/2500)/(PlayerInfo[pLevel]);
               new vodabill = (PlayerInfo[pAccount]/6500)/(PlayerInfo[pLevel]);
                ConsumingMoney = 1;
                if(PlayerInfo[pPbiskey] != 255 || PlayerInfo[pPsbiskey] != 255 )
                {
                   PlayerInfo[pAccount] -= ebill;
                     for(i = 0; i < sizeof(SBusinesses); i++)
                     {
                        if(SBusinesses[sbType] == 18)
                           {

                           SBusinesses[sbVault] += ebill/5;
                           SaveSBusiness(i);
                           }
                     }
                     PlayerInfo[pAccount] -= vodabill;
                     for(i = 0; i < sizeof(SBusinesses); i++)
                     {
                        if(SBusinesses[sbType] == 19)
                           {

                           SBusinesses[sbVault] += vodabill;
                           SaveSBusiness(i);
                           }
                  }
               }
               else
               {
                   ebill = 0;
               }
               interest = (PlayerInfo[pAccount]/1000)*(tmpintrate);
               PlayerInfo[pExp]++;
               PlayerPlayMusic(i);
               PlayerInfo[pAccount] = account+interest + checks;

               format( string, sizeof( string ), "Isplata: %d$\nPorez: %d$\nRacun za struju: %d$\nRacun za vodu:%d$ \nBanka: %d$\nKamatna stopa: 0.%d %\n{FFFF80}Kamata: %d$\nNovo stanje u Banci: %d $\nRent: %d$", checks, TaxValue, ebill, vodabill,account, tmpintrate, interest, PlayerInfo[pAccount], rent);
        ShowPlayerDialog( i, 250, DIALOG_STYLE_MSGBOX, "xTeam PayDay isplata", string, "Uredu", "" );
               if(PlayerInfo[pKreditOstalo] > 0)
               {
               new kredito[500];
                  format( kredito, sizeof( kredito ), "Isplata: %d$\nPorez: %d$\nRacun za struju: %d$\nRacun za vodu: %d$\nBanka: %d$\nKamatna stopa: 0.%d %\nKamata: %d$\nNovo stanje u Banci: %d $\nRent: %d$\nKredit: -1000$\nPreostalo rata: %d", checks, TaxValue, ebill, vodabill, account, tmpintrate, interest, PlayerInfo[pAccount], rent, PlayerInfo[pKreditOstalo]);
        ShowPlayerDialog( i, 250, DIALOG_STYLE_MSGBOX, "xTeam PayDay isplata", kredito, "Uredu", "" );
               PlayerInfo[pKreditOstalo] -= 1;
               PlayerInfo[pAccount] -=  1000;
               PlayerInfo[pKredit] += 1;
               }
               if(PlayerInfo[pKreditOstalo] == 0)
               {
               new kredito[128];
               format(kredito, sizeof(kredito), "  Kredit otplacen. Mozes ici da podignes novi!", PlayerInfo[pKreditOstalo]);
               SendClientMessage(i, COLOR_WHITE, kredito);
               PlayerInfo[pKreditOstalo] = -1;
               PlayerInfo[pKredit] = 0;
               }

               rent = 0;
               PlayerInfo[pPayDay] = 0;
               PlayerInfo[pPayCheck] = 0;
               PlayerInfo[pConnectTime] += 1;
               if(GetPVarInt(i, "DonatorRank")  > 0)
               {
                   PlayerInfo[pPayDayHad] += 1;
                   if(PlayerInfo[pPayDayHad] >= 5)
                   {
                       PlayerInfo[pExp]++;
                       PlayerInfo[pPayDayHad] = 0;
                   }
               }
         }
         else
            {
                SendClientMessage(i, COLOR_ORANGE, "* Nisi igrao dovoljno dugo da bi dobio platu.");
      }

      }
      }

   return 1;
}


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

Probaj public PayDay()
{
new string[128];
new account,interest;
new rent = 0;

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
    if(PlayerInfo[i][pLevel] > 0)
    {
    if(MoneyMessage[i] == 1)
{
    new bank = PlayerInfo[i][pAccount];
    SendClientMessage(i, COLOR_LIGHTRED, "Niste vratili dug idete u zatvor.");
    GameTextForPlayer(i, "~r~Uhapsen", 2000, 1);
    SafeSetPlayerInterior(i, 6);
    SafeSetPlayerPos(i, 264.6288,77.5742,1001.0391);
            PlayerInfo[i][pJailed] = 1;
            SafeResetPlayerWeapons(i);
            SafeResetPlayerMoney(i);
SafeGivePlayerMoney(i, 1);
WantedPoints[i] = 0;
PlayerInfo[i][pAccount] = (bank + DebtMoney[i]);
DebtMoney[i] = 0;
PlayerInfo[i][pJailTime] = 240;
TextDrawShowForPlayer(i, Textdraw1[i]);
format(string, sizeof(string), "Zatvoren si %d sekundi.   Jamcevina: Ne", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_WHITE, string);
}

new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo[i][pAccount];
new key = PlayerInfo[i][pPhousekey];
new tmpintrate;
if (key != 9999 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
    if(PlayerInfo[i][pDonator] > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
}
else
{
    if(PlayerInfo[i][pDonator] > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}
if(PlayerInfo[i][pPayDay] >= 30)
{
    Tax += TaxValue;//Should work for every player online
    PlayerInfo[i][pAccount] -= TaxValue;
new checks = 150 + PlayerInfo[i][pPayCheck];
if(PlayerInfo[i][pDonator] > 0)
{
    new bonus = PlayerInfo[i][pPayCheck] / 10;
    checks += bonus;
}
    new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
    account += checks;
    if(PlayerInfo[i][pAccount] > 0)
    {
    PlayerInfo[i][pAccount] -= ebill;
    SBizzInfo[4][sbTill] += ebill;
}
else
{
    ebill = 0;
}
interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
PlayerInfo[i][pExp]++;
PlayerPlayMusic(i);
PlayerInfo[i][pAccount] = account+interest;
SendClientMessage(i, COLOR_GREEN, "|___ Izvestaj iz banke ___|");
format(string, sizeof(string), "  Plata: $%d   Taksa: -$%d", checks, TaxValue);
SendClientMessage(i, COLOR_WHITE, string);
if(PlayerInfo[i][pPhousekey] != 9999 || PlayerInfo[i][pPbiskey] != 9999)
{
    format(string, sizeof(string), "  Racun za struju: -$%d", ebill);
SendClientMessage(i, COLOR_GRAD1, string);
}
format(string, sizeof(string), "  Staro stanje: $%d", account - checks);
SendClientMessage(i, COLOR_WHITE, string);
format(string, sizeof(string), "  Kamata: 0.%d posto",tmpintrate);
SendClientMessage(i, COLOR_GRAD2, string);
format(string, sizeof(string), "  Kamatni Interes: $%d", interest);
SendClientMessage(i, COLOR_GRAD3, string);
SendClientMessage(i, COLOR_GREEN, "|--------------------------------------|");
format(string, sizeof(string), "  Novo stanje: $%d", PlayerInfo[i][pAccount]);
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), "  Rent: -$%d", rent);
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), "~y~PayDay~n~~w~Plata je stigla na vas racun");
GameTextForPlayer(i, string, 5000, 1);
rent = 0;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
if(FarmerVar[i] == 0)
{
FarmerPickup[i][0] = 0;
}
if(SmugglerWork[i] == 0)
{
PayDaySecure[i] = 0;
}
if(PlayerInfo[i][pDonator] > 0)
{
    PlayerInfo[i][pPayDayHad] += 1;
    if(PlayerInfo[i][pPayDayHad] >= 5)
    {
        PlayerInfo[i][pExp]++;
        PlayerInfo[i][pPayDayHad] = 0;
    }
}
}
else
{
    SendClientMessage(i, COLOR_WHITE, "* Nisi igrao dovoljno dugo da bi dobio platu!");
}
}
}
}

stavio sam tako, al sad kad upisem /payday pise mi SERVER: Unknown Command