Payday system not working
#3

I don't understand your problem explain more please , and why you used to check each player rank 'pFacRank' and used them by spaming and many useless function not used ,you can simply use this
pawn Код:
public Payday()
{
     //random pay MAX: $40,000

    new string[128], string2[128];
    new payday = PlayerInfo[i][pBank] * 3/100;
    new factionpay = random(30000);
    new factionpay6 = random(100000) + 50000;
    new tax = payday + factionpay * 3/100;
    new tax2 = payday * 3/100;
    new total = payday + factionpay - tax;
    new total2= payday - tax2;
    new factotal1 = factionpay6 - tax2;
    new factotal2 = factotal1 + payday;
    for(new i = 0; i < MAX_PLAYERS; i++)
   {
        if(IsPlayerConnected(i))
        {

            format(string,sizeof(string),"~b~Payday: ~p~$%d", payday);
            GameTextForAll(string, 5000, 5);
            SendClientMessage(i, -1, "=====================Payday========================");
            if(PlayerInfo[i][pFaction] == 1)
            {
                if(PlayerInfo[i][pFacRank] >= 1)
                {
                    new string3[128], str4[128], str5[128];
                 //   new factionpay = random(30000);
                    format(string3, sizeof(string3), "Salary: $%d", factionpay);
                    SendClientMessage(i, -1, string3);
                    format(str5, sizeof(str5), "Taxes: $%d", tax);
                    SendClientMessage(i, -1, str5);
                    format(string2, sizeof(string2), "Your paycheck: $%d", payday);
                    SendClientMessage(i, -1, string2);
                    SendClientMessage(i, -1, "--------------------------------");
                    format(str4, sizeof(str4), "Total payday: $%d", total);
                    SendClientMessage(i, -1, str4);
                    PlayerInfo[i][pBank] += total;
                }
            }
            else
            {
                new str3[128], str4[128];
            //    new factionpay = random(30000);
                format(string2, sizeof(string2), "Your paycheck: $%d", payday);
                SendClientMessage(i, -1, string2);
                format(str3, sizeof(str3), "Taxes: $%d", tax2);
                SendClientMessage(i, -1, str3);
                SendClientMessage(i, -1, "--------------------------------");
                format(str4, sizeof(str4), "Total: $%d", total2);
                SendClientMessage(i, -1, str4);
                PlayerInfo[i][pBank] += total;
            }
            SendClientMessage(i, -1, "---------------------------------------------------");
        }
    }
    return 1;
}
Reply


Messages In This Thread
Payday system not working - by Blademaster680 - 17.12.2013, 19:07
Re: Payday system not working - by Blademaster680 - 22.12.2013, 17:16
Re: Payday system not working - by SilentSoul - 22.12.2013, 17:24
Re: Payday system not working - by Blademaster680 - 22.12.2013, 18:26

Forum Jump:


Users browsing this thread: 1 Guest(s)