[POMOC]Policija

Započeo L.U.X, Jul 13, 2011, 16:42:35 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Mod koji koristim:raven's
Problem:Kako da napravim kad je recimo neko u polijici ili drzavnoj org. da dobiva placu zavisno od njegovog ranka  da nemora imat drugi posao

Citat: Luka_Lučić poslato Jul 13, 2011, 16:42:35 POSLE PODNE
Mod koji koristim:raven's
Problem:Kako da napravim kad je recimo neko u polijici ili drzavnoj org. da dobiva placu zavisno od njegovog ranka  da nemora imat drugi posao


tako da procitas pravila :/ :-\ :-\ :-\ :-\ :-\ :-\

sta je on krivo napravio?

on: kod public PayDay (Valjda je tako) stavis da provjerava njegov rank, if(PlayerInfo[playerid][pRank] sta ja znam kako i tu mu dajes pare, onda else if ako je r2 pa mu vise para itd.
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

hmm evo kakav je pay day


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[pLevel] > 0)
          {
             if(MoneyMessage==1)
            {
                new bank = PlayerInfo[pAccount];
                SendClientMessage(i, COLOR_LIGHTRED, "U minusu si, pa ides u zatvor.");
                GameTextForPlayer(i, "~r~Uhicen!", 2000, 1);
                SafeSetPlayerInterior(i, 6);
                  SafeSetPlayerPos(i, 264.6288,77.5742,1001.0391);
                  PlayerInfo[pJailed] = 1;
                  SafeResetPlayerWeapons(i);
                  SafeResetPlayerMoney(i);
               SafeGivePlayerMoney(i, 1);
               WantedPoints = 0;
               PlayerInfo[pAccount] = (bank + DebtMoney);
               DebtMoney = 0;
               PlayerInfo[pJailTime] = 240;
               TextDrawShowForPlayer(i, Textdraw1);
               format(string, sizeof(string), "Zatvoren si na %d sekunda.", PlayerInfo[pJailTime]);
               SendClientMessage(i, COLOR_WHITE, string);
            }
            new playername2[MAX_PLAYER_NAME];
            GetPlayerName(i, playername2, sizeof(playername2));
            account = PlayerInfo[pAccount];
            new key = PlayerInfo[pPhousekey];
            if(key != 999)
            {
               rent = HouseInfo[key][hRent];
               if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
               {
                  rent = 0;
               }
               else if(rent > GetPlayerMoney(i))
               {
                  PlayerInfo[pPhousekey] = 999;
                  SendClientMessage(i, COLOR_WHITE, "Izbacen si iz kuce.");
                  rent = 0;
               }
               HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
            }
            new tmpintrate;
            if (key != 999 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
            {
                if(PlayerInfo[pRegularRank] > 0) { tmpintrate = intrate+4; }
               else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
            }
            else
            {
                if(PlayerInfo[pRegularRank] > 0) { tmpintrate = 3; }
               else { tmpintrate = 1; }
            }
            if(PlayerInfo[pPayDay] >= 5)
            {
                Tax += TaxValue;//Should work for every player online
                PlayerInfo[pAccount] -= TaxValue;
               new checks = PlayerInfo[pPayCheck] / 5;
               if(PlayerInfo[pRegularRank] > 0)
               {
                   new bonus = PlayerInfo[pPayCheck] / 10;
                   checks += bonus;
               }
                new ebill = (PlayerInfo[pAccount]/10000)*(PlayerInfo[pLevel]);
                account += checks;
                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, COLOR_GREEN, "|___ LOS SANTOS BANKA ___|");
               format(string, sizeof(string), "  Profit: $%d   Najam: -$%d", checks, TaxValue);
               SendClientMessage(i, COLOR_WHITE, string);
               if(PlayerInfo[pPhousekey] != 999 || PlayerInfo[pPbiskey] != 255)
               {
                   format(string, sizeof(string), "  Rezije: -$%d", ebill);
                  SendClientMessage(i, COLOR_GRAD1, string);
               }
               format(string, sizeof(string), "  Iznos Racuna: $%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), "  Dobijeno od kamate $%d", interest);
               SendClientMessage(i, COLOR_GRAD3, string);
               SendClientMessage(i, COLOR_GREEN, "|--------------------------------------|");
               format(string, sizeof(string), "  Novi iznos racuna: $%d", PlayerInfo[pAccount]);
               SendClientMessage(i, COLOR_GRAD5, string);
               format(string, sizeof(string), "  Rent: -$%d", rent);
               SendClientMessage(i, COLOR_GRAD5, string);
               format(string, sizeof(string), "~y~Placa~n~~w~Dobio si novce na svoj racun");
               GameTextForPlayer(i, string, 5000, 1);
               rent = 0;
               PlayerInfo[pPayDay] = 0;
               PlayerInfo[pPayCheck] = 0;
               if(FarmerVar == 0)
               {
                  FarmerPickup
  • = 0;
                   }
                   if(DrugFarmerVar == 0)
                   {
                      DrugFarmerPickup
    • = 0;
                     }
                     if(SmugglerWork == 0)
                     {
                        PayDaySecure = 0;
                     }
                     if(PlayerInfo[pRegularRank] > 0)
                     {
                         PlayerInfo[pPayDayHad] += 1;
                         if(PlayerInfo[pPayDayHad] >= 5)
                         {
                             PlayerInfo[pExp]++;
                             PlayerInfo[pPayDayHad] = 0;
                         }
                     }
                  }
                  else
                  {
                      SendClientMessage(i, COLOR_COOLRED, "* Nisi igrao dovoljno dugo da bi dobio placu.");
                  }
                  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[pRegularRank] > 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);
                  }
               }
            }
         }
         SaveAccounts();
         Checkprop();
         new rand = random(1000); rand += 545;
           Jackpot += rand;
         SaveStuff();
         format(string, sizeof(string), "Loto Vijesti: Jackpot nagrada: $%d.", Jackpot);
         OOCOff(COLOR_WHITE, string);
         return 1;
      }

Poslednja Izmena: Jul 13, 2011, 22:52:18 POSLE PODNE od Luka_Lučić

i sta s njim? Da ti ja uradim?
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √