[Pomoc] level

Započeo [GU:RP] ivica 156, Januar 09, 2012, 15:43:16 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Cyber
Detaljan opis problema:kako prebacit da kad netko ima 4/4 respekata da mu odma da lvl up da ne ide /buylevel
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):

daj nam komandu /buylevel i public payday

if (strcmp(cmd, "/buylevel", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if (gPlayerLogged[playerid] != 0)
{
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
if(PlayerInfo[playerid][pLevel] >= 0)
{
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
new costlevel = nxtlevel*levelcost;
new expamount = nxtlevel*levelexp;
new infostring[256];
if(GetPlayerMoney(playerid) < costlevel)
{
format(infostring, 256, "   You do not have enough Cash ($%d) !",costlevel);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
return 1;
}
else if (PlayerInfo[playerid][pExp] < expamount)
{
format(infostring, 256, "Trebate imati %d Respekata, trenutno imate [%d] !",expamount,PlayerInfo[playerid][pExp]);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
return 1;
}
else
{
format(string, sizeof(string), "~g~LEVEL UP~n~~w~Sada ste level %d", nxtlevel);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerPlayMusic(playerid);
GivePlayerMoney(playerid, (-costlevel));
PlayerInfo[playerid][pLevel]++;
if(PlayerInfo[playerid][twixDonatorRank] > 0)
{
    PlayerInfo[playerid][pExp] -= expamount;
    new total = PlayerInfo[playerid][pExp];
    if(total > 0)
    {
        PlayerInfo[playerid][pExp] = total;
    }
    else
    {
        PlayerInfo[playerid][pExp] = 0;
    }
}
else
{
PlayerInfo[playerid][pExp] = 0;
}
PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
GameTextForPlayer(playerid, string, 5000, 1);
format(infostring, 256, "Kupili ste level %d za ($%d) pisite /upgrade", nxtlevel, costlevel);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
format(infostring, 256, "   You gave %d unspent Upgrade Points",PlayerInfo[playerid][gPupgrade]);
SendClientMessage(playerid, COLOR_GRAD2, infostring);
}
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   You are not Logged in !");
}
}
return 1;
}

public PayDay()
{
new string[128];
new coordstring[128];
new coordstring1[128];
new coordstring2[128];
new coordstring3[128];
new coordstring4[128];
new coordstring5[128];
new coordstring6[128];
new coordstring7[128];
new coordstring8[128];
new payday[512];
new account,interest;
new rent = 0;
foreach (Player, i)
{
    if(PlayerInfo[i][pLevel] > 0)
    {
    if(MoneyMessage[i]==1)
{
    SendClientMessage(i, COLOR_LIGHTRED, "Niste uspjeli da vratite dug, idete u zatvor.");
    GameTextForPlayer(i, "~r~Uhapsen!", 2000, 1);
    SetPlayerInterior(i, 6);
    PlayerInfo[i][pInt] = 6;
    SetPlayerPos(i, 264.6288,77.5742,1001.0391);
            PlayerInfo[i][pJailed] = 1;
            ResetPlayerWeapons(i);
            ResetPlayerWeapons(i);
WantedPoints[i] = 0;
PlayerInfo[i][pJailTime] = 240;
format(string, sizeof(string), "Uhapseni ste na %d sekundi.   Kaucija: Nedostupna", 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];
if(key != 255)
{
rent = HouseInfo[key][hRent];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoney(i))
{
PlayerInfo[i][pPhousekey] = 255;
SendClientMessage(i, COLOR_WHITE, "Iseljeni ste.");
rent = 0;
}
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
}
new tmpintrate;
if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
    if(PlayerInfo[i][twixDonatorRank] > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
}
else
{
    if(PlayerInfo[i][twixDonatorRank] > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}
if(PlayerInfo[i][pPayDay] >= 5)
{
    Tax += TaxValue;//Should work for every player online
    PlayerInfo[i][pAccount] -= TaxValue;
new checks = PlayerInfo[i][pPayCheck] / 5;
if(PlayerInfo[i][twixDonatorRank] > 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]++;
PlayerInfo[i][pAccount] = account+interest;
format(coordstring, sizeof(coordstring), "{FFFFFF}Los Santos Banka\n\nPostovani, ovo je bankovno stanje za prosli sat{FFFFFF}\n\n{FFFFFF}Iznos place: $%d\n\n{FFFFFF} Porez: }-$%d", checks, TaxValue);
     if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
     {
         format(coordstring1, sizeof(coordstring1), "{FFFFFF}Racun za struju: -$%d", ebill);
     }
     format(coordstring2, sizeof(coordstring2), "  {FFFFFF}Stari iznos racuna: $%d\n", account - checks);
     format(coordstring3, sizeof(coordstring3), "  {FFFFFF}Kamata: 0.%d posto\n\n",tmpintrate);
     format(coordstring4, sizeof(coordstring4), "  {FFFFFF}Kamatni interes: $%d\n\n", interest);
     format(coordstring6, sizeof(coordstring6), "  {FFFFFF}Najamnina Kuce: -$%d\n\n", rent);
     format(coordstring7, sizeof(coordstring7), "  {FFFFFF}Ukupan Kredit: $%d\n\n", PlayerInfo[i][pKredit]);
     format(coordstring5, sizeof(coordstring5), "  {FFFFFF}Novo stanje na vasem racunu iznosi: $%d\n\n", PlayerInfo[i][pAccount]);
     if(PlayerInfo[i][pKredit] != 0)
     {
      format(coordstring8, sizeof(coordstring8), " {FFFFFF}Rata: %d\n\n", PlayerInfo[i][pAccount]);
      PlayerInfo[i][pKredit] -= 500;
      PlayerInfo[i][pAccount] -= 500;
     }
     format(payday, 512," %s%s%s%s%s%s%s%s%s",coordstring,coordstring1,coordstring2,coordstring3,coordstring4,coordstring5,coordstring6,coordstring7,coordstring8);
        ShowPlayerDialog(i, 667, DIALOG_STYLE_MSGBOX, "{00C0FF}LS Banka | Izvjestaj za protekli sat", payday , "U redu", "Odustani");
    rent = 0;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pConnectTime] += 1;
if(PlayerInfo[i][twixDonatorRank] > 0)
{
    PlayerInfo[i][pPayDayHad] += 1;
    if(PlayerInfo[i][pPayDayHad] >= 5)
    {
        PlayerInfo[i][pExp]++;
        PlayerInfo[i][pPayDayHad] = 0;
    }
}
}
else
{
    SendClientMessage(i, COLOR_LIGHTRED, "*G-Unit: Niste igrali dovoljno dugo da biste dobili placu.");
}
}
}
SaveAccounts();
Checkprop();
return 1;
}


a kad pise da bude level up nek bude kao SendClietMessage
Poslednja Izmena: Januar 09, 2012, 16:12:24 POSLE PODNE od [TG]$--L84S--$

Obrisi /buylevel i public payday zamjeni sa ovime

public PayDay()
{
   new string[128];
   new coordstring[128];
   new coordstring1[128];
   new coordstring2[128];
   new coordstring3[128];
   new coordstring4[128];
   new coordstring5[128];
   new coordstring6[128];
   new coordstring7[128];
   new coordstring8[128];
   new payday[512];
   new account,interest;
   new rent = 0;
   foreach (Player, i)
   {
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
if(PlayerInfo[playerid][pLevel] >= 0)
  {
    new nxtlevel = PlayerInfo[playerid][pLevel]+1;
      new costlevel = nxtlevel*levelcost;
      new expamount = nxtlevel*levelexp;
        new infostring[256];
        if(GetPlayerMoney(playerid) < costlevel)
        {
        format(infostring, 256, "   You do not have enough Cash ($%d) !",costlevel);
        SendClientMessage(playerid, COLOR_GRAD1, infostring);
        return 1;
        }
        else if (PlayerInfo[playerid][pExp] < expamount)
        {
        format(infostring, 256, "Trebate imati %d Respekata, trenutno imate [%d] !",expamount,PlayerInfo[playerid][pExp]);
          SendClientMessage(playerid, COLOR_GRAD1, infostring);
          return 1;
        }
        else
        {
    format(string, sizeof(string), "~g~LEVEL UP~n~~w~Sada ste level %d", nxtlevel);
      PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
        PlayerPlayMusic(playerid);
          GivePlayerMoney(playerid, (-costlevel));
          PlayerInfo[playerid][pLevel]++;
          if(PlayerInfo[playerid][twixDonatorRank] > 0)
          {
          PlayerInfo[playerid][pExp] -= expamount;
            new total = PlayerInfo[playerid][pExp];
              if(total > 0)
              {
                PlayerInfo[playerid][pExp] = total;
                }
                else
                {
                PlayerInfo[playerid][pExp] = 0;
                }
                else
                {
                PlayerInfo[playerid][pExp] = 0;
                }
                PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
                  GameTextForPlayer(playerid, string, 5000, 1);
                  format(infostring, 256, "Kupili ste level %d za ($%d) pisite /upgrade", nxtlevel, costlevel);
                  SendClientMessage(playerid, COLOR_GRAD1, infostring);
                  format(infostring, 256, "   You gave %d unspent Upgrade Points",PlayerInfo[playerid][gPupgrade]);
                  SendClientMessage(playerid, COLOR_GRAD2, infostring);
               }
    }
    if(PlayerInfo[pLevel] > 0)
      {
             if(MoneyMessage==1)
            {
                SendClientMessage(i, COLOR_LIGHTRED, "Niste uspjeli da vratite dug, idete u zatvor.");
                GameTextForPlayer(i, "~r~Uhapsen!", 2000, 1);
                SetPlayerInterior(i, 6);
                PlayerInfo[pInt] = 6;
                  SetPlayerPos(i, 264.6288,77.5742,1001.0391);
                  PlayerInfo[pJailed] = 1;
                  ResetPlayerWeapons(i);
                  ResetPlayerWeapons(i);
               WantedPoints = 0;
               PlayerInfo[pJailTime] = 240;
               format(string, sizeof(string), "Uhapseni ste na %d sekundi.   Kaucija: Nedostupna", 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 != 255)
            {
               rent = HouseInfo[key][hRent];
               if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
               {
                  rent = 0;
               }
               else if(rent > GetPlayerMoney(i))
               {
                  PlayerInfo[pPhousekey] = 255;
                  SendClientMessage(i, COLOR_WHITE, "Iseljeni ste.");
                  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; }//HouseInfo[key][hLevel]
            }
            else
            {
                if(PlayerInfo[twixDonatorRank] > 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[twixDonatorRank] > 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]++;
               PlayerInfo[pAccount] = account+interest;
               format(coordstring, sizeof(coordstring), "{FFFFFF}Los Santos Banka\n\nPostovani, ovo je bankovno stanje za prosli sat{FFFFFF}\n\n{FFFFFF}Iznos place: $%d\n\n{FFFFFF} Porez: }-$%d", checks, TaxValue);
     if(PlayerInfo[pPhousekey] != 255 || PlayerInfo[pPbiskey] != 255)
     {
         format(coordstring1, sizeof(coordstring1), "{FFFFFF}Racun za struju: -$%d", ebill);
     }
     format(coordstring2, sizeof(coordstring2), "  {FFFFFF}Stari iznos racuna: $%d\n", account - checks);
     format(coordstring3, sizeof(coordstring3), "  {FFFFFF}Kamata: 0.%d posto\n\n",tmpintrate);
     format(coordstring4, sizeof(coordstring4), "  {FFFFFF}Kamatni interes: $%d\n\n", interest);
     format(coordstring6, sizeof(coordstring6), "  {FFFFFF}Najamnina Kuce: -$%d\n\n", rent);
     format(coordstring7, sizeof(coordstring7), "  {FFFFFF}Ukupan Kredit: $%d\n\n", PlayerInfo[pKredit]);
     format(coordstring5, sizeof(coordstring5), "  {FFFFFF}Novo stanje na vasem racunu iznosi: $%d\n\n", PlayerInfo[pAccount]);
     if(PlayerInfo[pKredit] != 0)
     {
      format(coordstring8, sizeof(coordstring8), " {FFFFFF}Rata: %d\n\n", PlayerInfo[pAccount]);
      PlayerInfo[pKredit] -= 500;
      PlayerInfo[pAccount] -= 500;
     }
     format(payday, 512," %s%s%s%s%s%s%s%s%s",coordstring,coordstring1,coordstring2,coordstring3,coordstring4,coordstring5,coordstring6,coordstring7,coordstring8);
        ShowPlayerDialog(i, 667, DIALOG_STYLE_MSGBOX, "{00C0FF}LS Banka | Izvjestaj za protekli sat", payday , "U redu", "Odustani");
                rent = 0;
               PlayerInfo[pPayDay] = 0;
               PlayerInfo[pPayCheck] = 0;
               PlayerInfo[pConnectTime] += 1;
               if(PlayerInfo[twixDonatorRank] > 0)
               {
                   PlayerInfo[pPayDayHad] += 1;
                   if(PlayerInfo[pPayDayHad] >= 5)
                   {
                       PlayerInfo[pExp]++;
                       PlayerInfo[pPayDayHad] = 0;
                   }
               }
            }
            else
            {
                SendClientMessage(i, COLOR_LIGHTRED, "*G-Unit: Niste igrali dovoljno dugo da biste dobili placu.");
            }
         }
   }
   SaveAccounts();
   Checkprop();
   return 1;
}

Evo ti ovako bez placanja
public PayDay()
{
   new string[128];
   new coordstring[128];
   new coordstring1[128];
   new coordstring2[128];
   new coordstring3[128];
   new coordstring4[128];
   new coordstring5[128];
   new coordstring6[128];
   new coordstring7[128];
   new coordstring8[128];
   new payday[512];
   new account,interest;
   new rent = 0;
   foreach (Player, i)
   {
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
if(PlayerInfo[playerid][pLevel] >= 0)
  {
    new nxtlevel = PlayerInfo[playerid][pLevel]+1;
      new expamount = nxtlevel*levelexp;
        new infostring[256];
        else if (PlayerInfo[playerid][pExp] < expamount)
        {
        format(infostring, 256, "Trebate imati %d Respekata, trenutno imate [%d] !",expamount,PlayerInfo[playerid][pExp]);
          SendClientMessage(playerid, COLOR_GRAD1, infostring);
          return 1;
        }
        else
        {
    format(infostring, 256, "[Level Up +++]Sada ste level %d", nxtlevel);
    SendClientMessage(playerid, SVETLOPLAVA, infostring);
      PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
        PlayerPlayMusic(playerid);
          PlayerInfo[playerid][pLevel]++;
          if(PlayerInfo[playerid][twixDonatorRank] > 0)
          {
          PlayerInfo[playerid][pExp] -= expamount;
            new total = PlayerInfo[playerid][pExp];
              if(total > 0)
              {
                PlayerInfo[playerid][pExp] = total;
                }
                else
                {
                PlayerInfo[playerid][pExp] = 0;
                }
                else
                {
                PlayerInfo[playerid][pExp] = 0;
                }
                PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
                  GameTextForPlayer(playerid, string, 5000, 1);
                  format(infostring, 256, "Sada ste level %d pisite /upgrade", nxtlevel);
                  SendClientMessage(playerid, COLOR_GRAD1, infostring);
                  format(infostring, 256, "Imate %d nepotrosenih Upgrade Poena",PlayerInfo[playerid][gPupgrade]);
                  SendClientMessage(playerid, COLOR_GRAD2, infostring);
               }
    }
    if(PlayerInfo[pLevel] > 0)
      {
             if(MoneyMessage==1)
            {
                SendClientMessage(i, COLOR_LIGHTRED, "Niste uspjeli da vratite dug, idete u zatvor.");
                GameTextForPlayer(i, "~r~Uhapsen!", 2000, 1);
                SetPlayerInterior(i, 6);
                PlayerInfo[pInt] = 6;
                  SetPlayerPos(i, 264.6288,77.5742,1001.0391);
                  PlayerInfo[pJailed] = 1;
                  ResetPlayerWeapons(i);
                  ResetPlayerWeapons(i);
               WantedPoints = 0;
               PlayerInfo[pJailTime] = 240;
               format(string, sizeof(string), "Uhapseni ste na %d sekundi.   Kaucija: Nedostupna", 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 != 255)
            {
               rent = HouseInfo[key][hRent];
               if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
               {
                  rent = 0;
               }
               else if(rent > GetPlayerMoney(i))
               {
                  PlayerInfo[pPhousekey] = 255;
                  SendClientMessage(i, COLOR_WHITE, "Iseljeni ste.");
                  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; }//HouseInfo[key][hLevel]
            }
            else
            {
                if(PlayerInfo[twixDonatorRank] > 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[twixDonatorRank] > 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]++;
               PlayerInfo[pAccount] = account+interest;
               format(coordstring, sizeof(coordstring), "{FFFFFF}Los Santos Banka\n\nPostovani, ovo je bankovno stanje za prosli sat{FFFFFF}\n\n{FFFFFF}Iznos place: $%d\n\n{FFFFFF} Porez: }-$%d", checks, TaxValue);
     if(PlayerInfo[pPhousekey] != 255 || PlayerInfo[pPbiskey] != 255)
     {
         format(coordstring1, sizeof(coordstring1), "{FFFFFF}Racun za struju: -$%d", ebill);
     }
     format(coordstring2, sizeof(coordstring2), "  {FFFFFF}Stari iznos racuna: $%d\n", account - checks);
     format(coordstring3, sizeof(coordstring3), "  {FFFFFF}Kamata: 0.%d posto\n\n",tmpintrate);
     format(coordstring4, sizeof(coordstring4), "  {FFFFFF}Kamatni interes: $%d\n\n", interest);
     format(coordstring6, sizeof(coordstring6), "  {FFFFFF}Najamnina Kuce: -$%d\n\n", rent);
     format(coordstring7, sizeof(coordstring7), "  {FFFFFF}Ukupan Kredit: $%d\n\n", PlayerInfo[pKredit]);
     format(coordstring5, sizeof(coordstring5), "  {FFFFFF}Novo stanje na vasem racunu iznosi: $%d\n\n", PlayerInfo[pAccount]);
     if(PlayerInfo[pKredit] != 0)
     {
      format(coordstring8, sizeof(coordstring8), " {FFFFFF}Rata: %d\n\n", PlayerInfo[pAccount]);
      PlayerInfo[pKredit] -= 500;
      PlayerInfo[pAccount] -= 500;
     }
     format(payday, 512," %s%s%s%s%s%s%s%s%s",coordstring,coordstring1,coordstring2,coordstring3,coordstring4,coordstring5,coordstring6,coordstring7,coordstring8);
        ShowPlayerDialog(i, 667, DIALOG_STYLE_MSGBOX, "{00C0FF}LS Banka | Izvjestaj za protekli sat", payday , "U redu", "Odustani");
                rent = 0;
               PlayerInfo[pPayDay] = 0;
               PlayerInfo[pPayCheck] = 0;
               PlayerInfo[pConnectTime] += 1;
               if(PlayerInfo[twixDonatorRank] > 0)
               {
                   PlayerInfo[pPayDayHad] += 1;
                   if(PlayerInfo[pPayDayHad] >= 5)
                   {
                       PlayerInfo[pExp]++;
                       PlayerInfo[pPayDayHad] = 0;
                   }
               }
            }
            else
            {
                SendClientMessage(i, COLOR_LIGHTRED, "G-Unit: Niste igrali dovoljno dugo da biste dobili placu.");
            }
         }
   }
   SaveAccounts();
   Checkprop();
   return 1;
}

Citat: ...Nikola... poslato Januar 09, 2012, 16:14:18 POSLE PODNE
Evo ti ovako bez placanja
public PayDay()
{
   new string[128];
   new coordstring[128];
   new coordstring1[128];
   new coordstring2[128];
   new coordstring3[128];
   new coordstring4[128];
   new coordstring5[128];
   new coordstring6[128];
   new coordstring7[128];
   new coordstring8[128];
   new payday[512];
   new account,interest;
   new rent = 0;
   foreach (Player, i)
   {
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
if(PlayerInfo[playerid][pLevel] >= 0)
  {
    new nxtlevel = PlayerInfo[playerid][pLevel]+1;
      new expamount = nxtlevel*levelexp;
        new infostring[256];
        else if (PlayerInfo[playerid][pExp] < expamount)
        {
        format(infostring, 256, "Trebate imati %d Respekata, trenutno imate [%d] !",expamount,PlayerInfo[playerid][pExp]);
          SendClientMessage(playerid, COLOR_GRAD1, infostring);
          return 1;
        }
        else
        {
    format(infostring, 256, "[Level Up +++]Sada ste level %d", nxtlevel);
    SendClientMessage(playerid, SVETLOPLAVA, infostring);
      PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
        PlayerPlayMusic(playerid);
          PlayerInfo[playerid][pLevel]++;
          if(PlayerInfo[playerid][twixDonatorRank] > 0)
          {
          PlayerInfo[playerid][pExp] -= expamount;
            new total = PlayerInfo[playerid][pExp];
              if(total > 0)
              {
                PlayerInfo[playerid][pExp] = total;
                }
                else
                {
                PlayerInfo[playerid][pExp] = 0;
                }
                else
                {
                PlayerInfo[playerid][pExp] = 0;
                }
                PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
                  GameTextForPlayer(playerid, string, 5000, 1);
                  format(infostring, 256, "Sada ste level %d pisite /upgrade", nxtlevel);
                  SendClientMessage(playerid, COLOR_GRAD1, infostring);
                  format(infostring, 256, "Imate %d nepotrosenih Upgrade Poena",PlayerInfo[playerid][gPupgrade]);
                  SendClientMessage(playerid, COLOR_GRAD2, infostring);
               }
    }
    if(PlayerInfo[pLevel] > 0)
      {
             if(MoneyMessage==1)
            {
                SendClientMessage(i, COLOR_LIGHTRED, "Niste uspjeli da vratite dug, idete u zatvor.");
                GameTextForPlayer(i, "~r~Uhapsen!", 2000, 1);
                SetPlayerInterior(i, 6);
                PlayerInfo[pInt] = 6;
                  SetPlayerPos(i, 264.6288,77.5742,1001.0391);
                  PlayerInfo[pJailed] = 1;
                  ResetPlayerWeapons(i);
                  ResetPlayerWeapons(i);
               WantedPoints = 0;
               PlayerInfo[pJailTime] = 240;
               format(string, sizeof(string), "Uhapseni ste na %d sekundi.   Kaucija: Nedostupna", 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 != 255)
            {
               rent = HouseInfo[key][hRent];
               if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
               {
                  rent = 0;
               }
               else if(rent > GetPlayerMoney(i))
               {
                  PlayerInfo[pPhousekey] = 255;
                  SendClientMessage(i, COLOR_WHITE, "Iseljeni ste.");
                  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; }//HouseInfo[key][hLevel]
            }
            else
            {
                if(PlayerInfo[twixDonatorRank] > 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[twixDonatorRank] > 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]++;
               PlayerInfo[pAccount] = account+interest;
               format(coordstring, sizeof(coordstring), "{FFFFFF}Los Santos Banka\n\nPostovani, ovo je bankovno stanje za prosli sat{FFFFFF}\n\n{FFFFFF}Iznos place: $%d\n\n{FFFFFF} Porez: }-$%d", checks, TaxValue);
     if(PlayerInfo[pPhousekey] != 255 || PlayerInfo[pPbiskey] != 255)
     {
         format(coordstring1, sizeof(coordstring1), "{FFFFFF}Racun za struju: -$%d", ebill);
     }
     format(coordstring2, sizeof(coordstring2), "  {FFFFFF}Stari iznos racuna: $%d\n", account - checks);
     format(coordstring3, sizeof(coordstring3), "  {FFFFFF}Kamata: 0.%d posto\n\n",tmpintrate);
     format(coordstring4, sizeof(coordstring4), "  {FFFFFF}Kamatni interes: $%d\n\n", interest);
     format(coordstring6, sizeof(coordstring6), "  {FFFFFF}Najamnina Kuce: -$%d\n\n", rent);
     format(coordstring7, sizeof(coordstring7), "  {FFFFFF}Ukupan Kredit: $%d\n\n", PlayerInfo[pKredit]);
     format(coordstring5, sizeof(coordstring5), "  {FFFFFF}Novo stanje na vasem racunu iznosi: $%d\n\n", PlayerInfo[pAccount]);
     if(PlayerInfo[pKredit] != 0)
     {
      format(coordstring8, sizeof(coordstring8), " {FFFFFF}Rata: %d\n\n", PlayerInfo[pAccount]);
      PlayerInfo[pKredit] -= 500;
      PlayerInfo[pAccount] -= 500;
     }
     format(payday, 512," %s%s%s%s%s%s%s%s%s",coordstring,coordstring1,coordstring2,coordstring3,coordstring4,coordstring5,coordstring6,coordstring7,coordstring8);
        ShowPlayerDialog(i, 667, DIALOG_STYLE_MSGBOX, "{00C0FF}LS Banka | Izvjestaj za protekli sat", payday , "U redu", "Odustani");
                rent = 0;
               PlayerInfo[pPayDay] = 0;
               PlayerInfo[pPayCheck] = 0;
               PlayerInfo[pConnectTime] += 1;
               if(PlayerInfo[twixDonatorRank] > 0)
               {
                   PlayerInfo[pPayDayHad] += 1;
                   if(PlayerInfo[pPayDayHad] >= 5)
                   {
                       PlayerInfo[pExp]++;
                       PlayerInfo[pPayDayHad] = 0;
                   }
               }
            }
            else
            {
                SendClientMessage(i, COLOR_LIGHTRED, "G-Unit: Niste igrali dovoljno dugo da biste dobili placu.");
            }
         }
   }
   SaveAccounts();
   Checkprop();
   return 1;
}

prekini da spamas sa time sto maknes 1 red i kao ti si radio post!prijava SMODU


Citat: ...Nikola... poslato Januar 09, 2012, 16:22:22 POSLE PODNE
Pitao me je na skype da mu maknem da placa level ja sam mu maknuo i sad mu dolaze neki erori :S
aj prekini spamati po temama i postavljati isit code kao netko prije tebe...
ako ti jer ekoa na skype onda mu dadnes code na skype...
a Nepoznati psotaj sta ti treba i sta ti nevalja...

C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23715) : error 017: undefined symbol "playerid"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : error 029: invalid expression, assumed zero
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : warning 215: expression has no effect
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : error 001: expected token: ";", but found "if"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : error 017: undefined symbol "playerid"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : fatal error 107: too many error messages on one line

evo ovo mi izbaci na ove linije:
else if (PlayerInfo[playerid][pExp] < expamount);
   new nxtlevel = PlayerInfo[playerid][pLevel]+1;

OVO : else if (PlayerInfo[playerid][pExp] < expamount); zamjeni sa ovim  else if (PlayerInfo[playerid][pExp] < expamount)

sad mi ovo izbaci

\G-Unit.pwn(23695) : error 025: function heading differs from prototype
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : error 029: invalid expression, assumed zero
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : warning 215: expression has no effect
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : error 001: expected token: ";", but found "if"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23743) : error 029: invalid expression, assumed zero
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23755) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23757) : error 033: array must be indexed (variable "MoneyMessage")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23762) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23762) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23764) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23764) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23767) : error 033: array must be indexed (variable "WantedPoints")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23768) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23768) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23769) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23774) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23774) : error 006: must be assigned to an array
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23775) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23775) : error 033: array must be indexed (variable "-unknown-")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23785) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23785) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23794) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23799) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23802) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23805) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23805) : warning 215: expression has no effect
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23806) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23806) : error 033: array must be indexed (variable "PlayerInfo")

Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.

Oprosti moja greska zaboravio sam dodat {

stavi ovako
else if (PlayerInfo[playerid][pExp] < expamount)
{
      new nxtlevel = PlayerInfo[playerid][pLevel]+1;

C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23712) : error 017: undefined symbol "playerid"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23713) : error 017: undefined symbol "playerid"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23715) : error 017: undefined symbol "playerid"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : error 029: invalid expression, assumed zero
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : warning 215: expression has no effect
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : error 001: expected token: ";", but found "if"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : error 017: undefined symbol "playerid"
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23718) : fatal error 107: too many error messages on one line

umjesto playerid staviš i
"I'm a loser and a user so I don't need no accuser" - Billie Joe Armstrong

sad mi ovo izbaci:

C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(3121) : warning 201: redefinition of constant/macro (symbol "vInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(5198) : warning 219: local variable "objective" shadows a variable at a preceding level
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(5204) : warning 219: local variable "objective" shadows a variable at a preceding level
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(5314) : warning 219: local variable "objective" shadows a variable at a preceding level
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(5352) : warning 219: local variable "objective" shadows a variable at a preceding level
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(12811) : warning 219: local variable "vehicle" shadows a variable at a preceding level
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23695) : error 025: function heading differs from prototype
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23740) : error 029: invalid expression, assumed zero
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23752) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23754) : error 033: array must be indexed (variable "MoneyMessage")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23759) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23759) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23761) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23761) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23764) : error 033: array must be indexed (variable "WantedPoints")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23765) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23765) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23766) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23771) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23771) : error 006: must be assigned to an array
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23772) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23772) : error 033: array must be indexed (variable "-unknown-")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23782) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23782) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23791) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23796) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23799) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23802) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23802) : warning 215: expression has no effect
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23803) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23803) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23804) : error 032: array index out of bounds (variable "PlayerInfo")
C:\Users\Barcelona\Desktop\G-Unit v1.0.7 0.3d\gamemodes\G-Unit.pwn(23804) : error 036: empty statement