Jump to content
  • 0

Problema payday


stefanutzu14

Question

Am si eu o problema la payday la ora fix nu mi-l da imi da doar urmatorul mesaj  :  You haven't played long enough to obtain a payday. Ma poate ajuta cineva ?? .

Am stat si 3 ore in continuu si tot la fel mi-a scris . va rog frumos cine are o rezolvare sa posteze cine nu sa nu comenteze aiurea .

public PayDay(playerid)

{

    new string[128];

    new account,interest;

    new rent = 0;

    foreach(Player, i) {

        if(PlayerInfo[pJailTime] == 0) {

            if(PlayerInfo[pLevel] > 0) {

                account = PlayerInfo[pAccount];

//new key = PlayerInfo[pHousekey];

//HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;

                new tmpintrate;

                switch(PlayerInfo[pDonateRank]) {

                    case 0:

                    {

                        tmpintrate = 1;

                    }

                    case 1:

                    {

                        tmpintrate = 1;

                    }

                    case 2:

                    {

                        tmpintrate = 2;

                    }

                    case 3:

                    {

                        tmpintrate = 3;

                    }

                }

                if(PlayerInfo[pPayDay] >= 1) {

                    Tax += TaxValue;

                    PlayerInfo[pAccount] -= TaxValue;

                    new checks = PlayerInfo[pPayCheck] / 8;

                    if(checks > 300) {

                        checks = 250;

                    }

                    if(PlayerInfo[pDonateRank] > 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;

                    SendClientMessage(i,COLOR_GREEN,"|____ BANK STATMENT ____|");

                    format(string, sizeof(string), "Tax Money: -$%d", TaxValue);

                    SendClientMessage(i, COLOR_WHITE, string);

                    format(string, sizeof(string), "Int Rate: 0.%d percent | Int Gained $%d",tmpintrate,interest);

                    SendClientMessage(i, COLOR_WHITE, string);

                    if(PlayerInfo[pHousekey] != 255 || PlayerInfo[pPbiskey] != 255) {

                        format(string, sizeof(string), "Electricity Bill: -$%d | Rent: -$%d", ebill,rent);

                        SendClientMessage(i, COLOR_WHITE, string);

                    }

                    else if(PlayerInfo[pHousekey] == 255 || PlayerInfo[pPbiskey] == 255) {

                        format(string, sizeof(string), "Rent: -$%d", rent);

                        SendClientMessage(i, COLOR_WHITE, string);

                    }

                    if(PlayerInfo[pMember] == 4||PlayerInfo[pMember] == 2||PlayerInfo[pMember] == 14) {

                        if(PlayerInfo[pRank] >= 0 && PlayerInfo[pRank] <= 3) {

                            SendClientMessage(i, COLOR_WHITE, "Bonus Check: $300");

                            PlayerInfo[pAccount] += 300;

                        }

                        else if(PlayerInfo[pRank] == 4) {

                            SendClientMessage(i, COLOR_WHITE, "Bonus Check: $400");

                            PlayerInfo[pAccount] += 400;

                        }

                        else if(PlayerInfo[pRank] >= 5 && PlayerInfo[pRank] <= 6) {

                            SendClientMessage(i, COLOR_WHITE, "Bonus Check: $500");

                            PlayerInfo[pAccount] += 500;

                        }

                    }

                    else if(PlayerInfo[pMember] == 1) {

                        if(PlayerInfo[pRank] >= 0 && PlayerInfo[pRank] <= 2) {

                            SendClientMessage(i, COLOR_WHITE, "Bonus Check: $200");

                            PlayerInfo[pAccount] += 200;

                        }

                        else if(PlayerInfo[pRank] == 3) {

                            SendClientMessage(i, COLOR_WHITE, "Bonus Check: $350");

                            PlayerInfo[pAccount] += 350;

                        }

                        else if(PlayerInfo[pRank] == 4) {

                            SendClientMessage(i, COLOR_WHITE, "Bonus Check: $375");

                            PlayerInfo[pAccount] += 375;

                        }

                        else if(PlayerInfo[pRank] == 5) {

                            SendClientMessage(i, COLOR_WHITE, "Bonus Check: $400");

                            PlayerInfo[pAccount] += 400;

                        }

                        else if(PlayerInfo[pRank] == 6) {

                            SendClientMessage(i, COLOR_WHITE, "Bonus Check: $425");

                            PlayerInfo[pAccount] += 425;

                        }

                        else if(PlayerInfo[pRank] == 7) {

                            SendClientMessage(i, COLOR_WHITE, "Bonus Check: $450");

                            PlayerInfo[pAccount] += 450;

                        }

                        else if(PlayerInfo[pRank] == 8) {

                            SendClientMessage(i, COLOR_WHITE, "Bonus Check: $475");

                            PlayerInfo[pAccount] += 475;

                        }

                        else if(PlayerInfo[pRank] >= 9 && PlayerInfo[pRank] <= 16) {

                            SendClientMessage(i, COLOR_WHITE, "Bonus Check: $500");

                            PlayerInfo[pAccount] += 500;

                        }

                    }

                    format(string, sizeof(string),"Paycheck : $%d",checks);

                    SendClientMessage(i, COLOR_WHITE,string);

                    format(string, sizeof(string), "Old Balance: $%d | New Balance: $%d", account - checks, PlayerInfo[pAccount]);

                    SendClientMessage(i, COLOR_WHITE, string);

                    SendClientMessage(i,COLOR_GREEN,"|--------------------------------------|");

                    format(string, sizeof(string),"~y~Paycheck~n~~g~$%d",checks);

                    GameTextForPlayer(i, string, 5000, 1);

                    rent = 0;

                    PlayerInfo[pPayDay] = 0;

                    PlayerInfo[pPayCheck] = 0;

                    PlayerInfo[pConnectTime] += 1;

                    new nxtlevel = PlayerInfo[pLevel]+1;

                    new expamount = nxtlevel*3;

                    if(PlayerInfo[pExp] == expamount) {

                        format(string, sizeof(string), "Level up! - New Level: %d", nxtlevel);

                        SendClientMessage(i,COLOR_WHITE, string);

                        PlayerInfo[pLevel]++;

                        PlayerInfo[pExp] = 0;

                    }

                    if(PlayerInfo[pExp] >= expamount) {

                        format(string, sizeof(string), "Level up! - New Level: %d", nxtlevel);

                        SendClientMessage(i,COLOR_WHITE, string);

                        PlayerInfo[pLevel]++;

                        PlayerInfo[pExp] = 0;

                    }

                }

                else {

                    SendClientMessage(i, COLOR_LIGHTRED, "{FFFFFF}* You haven't played long enough to obtain a {FFFFFF}payday.");

                }

            }

        }

        OnPlayerDataSave(i);

    }

    return 1;

}

SYNCTIME

public SyncTime()

{

new tmphour;

new tmpminute;

new tmpsecond;

gettime(tmphour, tmpminute, tmpsecond);

FixHour(tmphour);

tmphour = shifthour;

if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))

{

ghour = tmphour;

foreach (Player, i)

{

    if(GetPVarInt(i, "PlayerLogged") == 1)

    {

        PayDay(i);

    }

}

if (realtime)

{

SetWorldTime(tmphour);

}

PayDayLoad(1);

}

for(new b = 0; b < sizeof(WeedInfo); b++)

{

if(WeedInfo[WeedPlanted] == 1 && WeedInfo[WeedTime] > 0)

{

    WeedInfo[WeedTime] -= 1;

    if(WeedInfo[WeedTime] >= 17 && WeedInfo[WeedTime] <= 20)

    {

                MoveDynamicObject(weedObject,WeedInfo[WeedX],WeedInfo[WeedY],WeedInfo[WeedZ]-2.2,100.0);

    }

            if(WeedInfo[WeedTime] >= 15 && WeedInfo[WeedTime] <= 17)

    {

                MoveDynamicObject(weedObject,WeedInfo[WeedX],WeedInfo[WeedY],WeedInfo[WeedZ]-2.1,100.0);

    }

    if(WeedInfo[WeedTime] >= 13 && WeedInfo[WeedTime] <= 15)

    {

                MoveDynamicObject(weedObject,WeedInfo[WeedX],WeedInfo[WeedY],WeedInfo[WeedZ]-2.0,100.0);

    }

    if(WeedInfo[WeedTime] >= 11 && WeedInfo[WeedTime] <= 13)

    {

                MoveDynamicObject(weedObject,WeedInfo[WeedX],WeedInfo[WeedY],WeedInfo[WeedZ]-1.9,100.0);

    }

    if(WeedInfo[WeedTime] >= 9 && WeedInfo[WeedTime] <= 11)

    {

                MoveDynamicObject(weedObject,WeedInfo[WeedX],WeedInfo[WeedY],WeedInfo[WeedZ]-1.8,100.0);

    }

    if(WeedInfo[WeedTime] >= 8 && WeedInfo[WeedTime] <= 9)

    {

                MoveDynamicObject(weedObject,WeedInfo[WeedX],WeedInfo[WeedY],WeedInfo[WeedZ]-1.7,100.0);

    }

    if(WeedInfo[WeedTime] >= 7 && WeedInfo[WeedTime] <= 8)

    {

                MoveDynamicObject(weedObject,WeedInfo[WeedX],WeedInfo[WeedY],WeedInfo[WeedZ]-1.6,100.0);

    }

    if(WeedInfo[WeedTime] >= 6 && WeedInfo[WeedTime] <= 7)

    {

                MoveDynamicObject(weedObject,WeedInfo[WeedX],WeedInfo[WeedY],WeedInfo[WeedZ]-1.5,100.0);

    }

    if(WeedInfo[WeedTime] >= 5 && WeedInfo[WeedTime] <= 6)

    {

                MoveDynamicObject(weedObject,WeedInfo[WeedX],WeedInfo[WeedY],WeedInfo[WeedZ]-1.4,100.0);

    }

    if(WeedInfo[WeedTime] >= 1 && WeedInfo[WeedTime] <= 5)

    {

                MoveDynamicObject(weedObject,WeedInfo[WeedX],WeedInfo[WeedY],WeedInfo[WeedZ]-1.3,100.0);

    }

}

}

}

94.176.96.37:7778 -->>> Server Role-Play !

add [email protected] pentru detalii !

Caut om cu playeri !

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.