Money from payday
#1

Hi,
I have this payday(In 1 hour give money to players online)(Script Down) ok.I want the players who are members of Police Department [ if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) ] in every payday to get money 1000$ (INFO: You have got 1000$ for working for PD.)
How can i make that ??


Here is the payday...



PHP код:
                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][pDonateRank] > 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(coordstringsizeof(coordstring),  "{FFFFFF}Plata: $%d\n Taksi: -$%d\n"checksTaxValue);
                    if(
PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
                    {
                        
format(coordstring1sizeof(coordstring1), "{FFFFFF}Smetka za struja: -$%d\n"ebill);
                    }
                    
format(coordstring2sizeof(coordstring2), "{FFFFFF}Stara smetka: $%d\n"account checks);
                    
format(coordstring3sizeof(coordstring3), "{FFFFFF}Kamata: 0.%d posto\n",tmpintrate);
                    
format(coordstring4sizeof(coordstring4), "{FFFFFF}Interes: $%d\n"interest);
                    
format(coordstring5sizeof(coordstring5), "{FFFFFF}Nova smetka: $%d\n"PlayerInfo[i][pAccount]);
                    
format(coordstring6sizeof(coordstring6), "{FFFFFF}Rent: -$%d\n"rent);
                    
/*format(coordstring7, sizeof(coordstring7), "{FFFFFF}Kredit: $%d\n", PlayerInfo[i][pKredit]);
                    if(PlayerInfo[i][pKredit] != 0)
                    {
                        format(coordstring8, sizeof(coordstring8), "{FFFFFF}Rata: %d\n", PlayerInfo[i][pAccount]);
                        PlayerInfo[i][pKredit] -= 500;
                        PlayerInfo[i][pAccount] -= 500;
                    }*/
                    
format(payday512,"%s%s%s%s%s%s%s%s%s",coordstring,coordstring1,coordstring2,coordstring3,coordstring4,coordstring5,coordstring6,coordstring7,coordstring8);
                    
ShowPlayerDialog(i667DIALOG_STYLE_MSGBOX"Payday | Plata"payday "OK""");
                    
format(stringsizeof(string), "~y~Plata~n~~w~Platata stigna na vasata smetka.");
                    
GameTextForPlayer(istring50001);
                    
rent 0;
                    
PlayerInfo[i][pPayDay] = 0;
                    
PlayerInfo[i][pPayCheck] = 0;
                    
PlayerInfo[i][pConnectTime] += 1;
                    
BankRobbedRecently 0;
                    
BankRobbedRecently1 0;
                    
BankRobbedRecently2 0;
                    
BankRobbedRecently3 0;
                    if(
FarmerVar[i] == 0)
                    {
                        
FarmerPickup[i][0] = 0;
                    }
                }
                else
                {
                    
SendClientMessage(iCOLOR_WHITE"{37F906}INFO:{FFFFFF}Ne igravte dovolno za da dobiete plata.");
                }
            }
    }
    
SaveAccounts();
    return 
1;

Reply
#2

BUMP
Reply
#3

BUMP help
Reply
#4

bump
Reply
#5

pawn Код:
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][pDonateRank] > 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}Plata: $%d\n Taksi: -$%d\n", checks, TaxValue);
                    if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
                    {
                        format(coordstring1, sizeof(coordstring1), "{FFFFFF}Smetka za struja: -$%d\n", ebill);
                    }
                    format(coordstring2, sizeof(coordstring2), "{FFFFFF}Stara smetka: $%d\n", account - checks);
                    format(coordstring3, sizeof(coordstring3), "{FFFFFF}Kamata: 0.%d posto\n",tmpintrate);
                    format(coordstring4, sizeof(coordstring4), "{FFFFFF}Interes: $%d\n", interest);
                    format(coordstring5, sizeof(coordstring5), "{FFFFFF}Nova smetka: $%d\n", PlayerInfo[i][pAccount]);
                    format(coordstring6, sizeof(coordstring6), "{FFFFFF}Rent: -$%d\n", rent);
                    /*format(coordstring7, sizeof(coordstring7), "{FFFFFF}Kredit: $%d\n", PlayerInfo[i][pKredit]);
                    if(PlayerInfo[i][pKredit] != 0)
                    {
                        format(coordstring8, sizeof(coordstring8), "{FFFFFF}Rata: %d\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, "Payday | Plata", payday , "OK", "");
                    format(string, sizeof(string), "~y~Plata~n~~w~Platata stigna na vasata smetka.");
                    GameTextForPlayer(i, string, 5000, 1);
                    rent = 0;
                    PlayerInfo[i][pPayDay] = 0;
                    PlayerInfo[i][pPayCheck] = 0;
                    PlayerInfo[i][pConnectTime] += 1;
                    BankRobbedRecently = 0;
                    BankRobbedRecently1 = 0;
                    BankRobbedRecently2 = 0;
                    BankRobbedRecently3 = 0;
                    if(PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 2 || PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pLeader] == 3 || PlayerInfo[i][pMember] == 3) // 1. PD 2. MBI/FBI 3. ARM
{
PlayerInfo[i][pAccount] += 2000;
SendClientMessage(i, COLOR_WHITE, "{37F906}INFO:{FFFFFF}MVR vi isplati 2000$ na vasata smetka");
}
                    if(FarmerVar[i] == 0)
                    {
                        FarmerPickup[i][0] = 0;
                    }
                }
                else
                {
                    SendClientMessage(i, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Ne igravte dovolno za da dobiete plata.");
                }
            }
    }
    SaveAccounts();
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)