[Pomoc]Bankovni račun ode u minus,Drugi problem dionice u minusu

Započeo Danny Williams, Januar 10, 2012, 22:10:37 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim:NX
Detaljan opis problema:Pa znači kad se igrač registrira i igra malo na serveru dobije respekt i pogleda kad ono bankovni račun 40.000-50.000$ u minusu.Kao da to namjestim?
Dio skripte:Koji treba?
Neke slike/video za lakse dobivanje pomoci(neobavezno)://


Skripta koju koristim:NX
Detaljan opis problema:Kad dobiješ payday i imaš dionicu u dionici isto ode u minus.Znate šta je problem?
Dio skripte:Koji treba?
Neke slike/video za lakse dobivanje pomoci(neobavezno)://

Bug je u skripti , konzultiraj se sa autorom moda , vjerojatno će znati riješiti.
"I'm a loser and a user so I don't need no accuser" - Billie Joe Armstrong



Evo public payday pa probajte rijesiti ako mozete ima negdje minusa ali ipak to vi vidite:

public PayDay()
{
new string[256];
new account,interest;
new rent = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo[i][pLevel] > 0)
    {
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo[i][pAccount];
if(GetPVarInt(i, "Posao") != 0)
{
SetPVarInt(i, "Ugovor", GetPVarInt(i, "Ugovor") +1);
}
new tmpintrate;
if (PlayerInfo[i][pPhousekey] != 255 && strcmp(playername2, Houses[PlayerInfo[i][pPhousekey]][hOwner], true) == 0)
{
    if(GetPVarInt(i, "DonatorRank")  > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//Houses[key][hLevel]
}
else
{
    if(GetPVarInt(i, "DonatorRank")  > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}
if(PlayerInfo[i][pPayDayPoeni] >= 30)
{
Tax += TaxValue;//Should work for every player online
    PlayerInfo[i][pAccount] -= TaxValue;
    if(GetPVarInt(i, "DonatorRank")  > 0)
{
    new bonus = PlayerInfo[i][pPayCheck] / 2;
    PlayerInfo[i][pPayCheck] += bonus;
}
new checks = PlayerInfo[i][pPayCheck];
    new ebill = (PlayerInfo[i][pAccount]/50)+(PlayerInfo[i][pLevel]*5)/3;
new vodabill = (PlayerInfo[i][pAccount]/500)+(PlayerInfo[i][pLevel]*5)/30;
    ConsumingMoney[i] = 1;

    if(PlayerInfo[i][pPbiskey] != 255 || PlayerInfo[i][pPsbiskey] != 255 || PlayerInfo[i][pPhousekey] != 255)
    {
for(new d = 0; d < sizeof(Dionice); d++)
{
if(Dionice[d][dType] == 2)
{
Dionice[d][dKasa1] += ebill/10;
Dionice[d][dKasa2] += ebill/10;
Dionice[d][dKasa3] += ebill/10;
Dionice[d][dKasa4] += ebill/10;
Dionice[d][dKasa5] += ebill/10;
Dionice[d][dKasa6] += ebill/10;
Dionice[d][dKasa7] += ebill/10;
Dionice[d][dKasa8] += ebill/10;
Dionice[d][dKasa9] += ebill/10;
Dionice[d][dKasa10] += ebill/10;
SaveDionice(d);
}
if(Dionice[d][dType] == 3)
{
Dionice[d][dKasa1] += vodabill/10;
Dionice[d][dKasa2] += vodabill/10;
Dionice[d][dKasa3] += vodabill/10;
Dionice[d][dKasa4] += vodabill/10;
Dionice[d][dKasa5] += vodabill/10;
Dionice[d][dKasa6] += vodabill/10;
Dionice[d][dKasa7] += vodabill/10;
Dionice[d][dKasa8] += vodabill/10;
Dionice[d][dKasa9] += vodabill/10;
Dionice[d][dKasa10] += vodabill/10;
SaveDionice(d);
}
}
}
else
{
    ebill = 0;
}
PlayerInfo[i][pAccount] += ebill;
interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
PlayerInfo[i][pExp]++;
PlayerPlayMusic(i);
PlayerInfo[i][pAccount] = account+interest + checks;
new nxtlevel = PlayerInfo[i][pLevel]+1;
new expamount = nxtlevel*levelexp;
if(PlayerInfo[i][pExp] >= expamount)
{
format(string, sizeof(string), "{FFFF80}Noxicus| {00FF40}LEVEL UP! {69FF8F}Sada si level {FFFF80}%d", nxtlevel);
SCM(i, WHITE, string);
PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
PlayerPlayMusic(i);
PlayerInfo[i][pLevel]++;
if(GetPVarInt(i, "DonatorRank")  > 0)
{
    PlayerInfo[i][pExp] -= expamount;
    new total = PlayerInfo[i][pExp];
    if(total > 0)
    {
        PlayerInfo[i][pExp] = total;
    }
    else
    {
        PlayerInfo[i][pExp] = 0;
    }
}
else
{
PlayerInfo[i][pExp] = 0;
}
PlayerInfo[i][gPupgrade] = PlayerInfo[i][gPupgrade]+2;
}

format( string, sizeof( string ), "{FFFF80}Isplata: %d$ \n{FFFF80}Porez: %d$ \n{FFFF80}Racun za struju: %d$ \n{FFFF80}Racun za vodu: %d$\n{FFFF80}Banka: %d$\n{FFFF80}Kamatna stopa: 0.%d %\n{FFFF80}Kamata: %d$\n{FFFF80}Novo stanje u Banci: %d $\n{FFFF80}Rent: %d$", checks, TaxValue, ebill, vodabill, account, tmpintrate, interest, PlayerInfo[i][pAccount], rent);
        ShowPlayerDialog( i, 250, DIALOG_STYLE_MSGBOX, "{FF0000}Noxicus PayDay isplata", string, "Uredu", "" );

if(PlayerInfo[i][pKreditOstalo] > 0)
{
new string1[128 ];
format( string1, sizeof( string1 ), "\n{FFFF80}Kredit: -1000$\n{FFFF80}Preostalo rata: %d", PlayerInfo[i][pKreditOstalo]);
new kredito[256];
format( kredito, sizeof( kredito ), "{FFFF80}Isplata: %d$\n{FFFF80}Porez: %d$\n{FFFF80}Racun za struju: %d$\n{FFFF80}Racun za vodu: %d$\n{FFFF80}Banka: %d$\n{FFFF80}Kamatna stopa: 0.%d %\n{FFFF80}Kamata: %d$\n{FFFF80}Novo stanje u Banci: %d $\n{FFFF80}Rent: %d$ %s", checks, TaxValue, ebill,vodabill, account, tmpintrate, interest, PlayerInfo[i][pAccount], rent, string1);
        ShowPlayerDialog( i, 250, DIALOG_STYLE_MSGBOX, "{FF0000}Noxicus PayDay isplata", kredito, "Uredu", "" );

PlayerInfo[i][pKredit] += 1;
PlayerInfo[i][pKreditOstalo] -= 1;
PlayerInfo[i][pAccount] -=  1000;
}
if(PlayerInfo[i][pKreditOstalo] == 0)
{
new kredito[128];
format(kredito, sizeof(kredito), "  Kredit otplacen. Mozes ici da podignes novi!", PlayerInfo[i][pKreditOstalo]);
SendClientMessage(i, COLOR_WHITE, kredito);
PlayerInfo[i][pKredit] = 0;
PlayerInfo[i][pKreditOstalo] = -1;
}

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

return 1;
}



To si ti nesto dirao, jer ja nikada nisam imao sa time problema...
Just one more time.

Citat: [PG] Pacino poslato Januar 11, 2012, 00:12:21 PRE PODNE
To si ti nesto dirao, jer ja nikada nisam imao sa time problema...

Brate,nisam ni ja ništa dirao jedino što sam bio dodavao neke komande preimenovo mjenjao boje i to.Ali to nije ništa puno.Jel znaš do čeg je problem odprilike i imam isto problem sa registracijom crasha mi??

Da i ja sam to koristio i nisam imao problema imao sam protblema za to da racun na dionicama poraste na 45000000 ili vise toi je bug kod svakog ;)


Preporucujem ti da uklonis dionice i rijesis se problem a sto se tice bankovnog racuna to je do tebe
Poslednja Izmena: Januar 11, 2012, 00:21:08 PRE PODNE od DJeronimo
big respect 4 Blaeks Vuzimir  Shoorty Scripter HamZa

Ma neznam ne bih uklanjo dionice jer je sistem extra,ali ovaj bankovni račun neznam ni ja do čega je...