payday help
#2

I didn't exactly get what you ment but...
pawn Код:
forward PayDay();
public PayDay()
{
    new OwnerID;
    for(new r = 0; r <= MAX_RACKETS; r++)
    {
        if(RacketInfo[r][rOwner] != 0)//check if it's owned
        {
            OwnerID = RacketInfo[r][rOwner];
            OrgInfo[OwnerID][fCash] += RacketInfo[r][rCash];
            RacketInfo[r][rCash] = 0;//You might also want to reset the cash...
        }
    }
    for(new i = 0; i <= MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && PlayerInfo[i][Member] == OwnerID && PlayerInfo[i][Member] != 0)
        {
            SendClientMessage(i, COLOR_GRAD1, "Faction earnings");
            format(string, sizeof(string), "[INFO]: Old Balance: $%d | New Balance: $%d", OrgInfo[OwnerID][fCash] - RacketInfo[r][rCash], OrgInfo[OwnerID][fCash]);
            SendClientMessage(i, COLOR_GRAD1, string);
        }
    }
    return 1;
}
Reply


Messages In This Thread
payday help - by WardenCS - 18.03.2012, 20:38
Re: payday help - by Yvax - 18.03.2012, 21:37

Forum Jump:


Users browsing this thread: 1 Guest(s)