Where i wrong this payday code
#1

Hi.I wanna when it's xx:00 all players to get Exp,Money and etc.I make code but no one get payday.
pawn Код:
forward PayDay();
public PayDay()
{
    gettime(hour, minute);
    if(minute == 20)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
                         if(PlayerInfo[i][pDonateRank] > 4)
                         {
                            GivePlayerMoney(i,30000);
                            PlayerInfo[i][Exp] += 3;
                         }
                         if(PlayerInfo[i][pDonateRank] < 4)
                         {
                            new String[2000];
                            new nxtlevel = PlayerInfo[i][Level];
                            new payday = nxtlevel*0;
                            GivePlayerMoney(i,payday);
                            PlayerInfo[i][Exp]++;
                            GameTextForPlayer(i,"~p~ PayDay",6,5000);
                            format(String, sizeof(String), "Взети пари:%d $", payday);
                            SendClientMessage(i,COLOR_GREEN,String);
                            if(PlayerInfo[i][pMember] == TEAM_BALLAS && PlayerInfo[i][pRank] == 6)
                            {
                                GivePlayerMoney(i,10000);
                                PlayerInfo[i][Exp] += 6;
                                SendClientMessage(i,COLOR_GREEN,"Rolling Height Ballas:6 Exp,$10000");
                            }
                            if(PlayerInfo[i][pMember] == TEAM_BRAIN && PlayerInfo[i][pRank] == 1)
                            {
                                GivePlayerMoney(i,2000);
                                PlayerInfo[i][Exp] += 2;
                                SendClientMessage(i,COLOR_GREEN,"No Brain:2 Exp,$2000");
                            }
                            if(PlayerInfo[i][pMember] == TEAM_BRAIN && PlayerInfo[i][pRank] == 2)
                            {
                                GivePlayerMoney(i,3000);
                                PlayerInfo[i][Exp] += 3;
                                SendClientMessage(i,COLOR_GREEN,"No Brain:3 Exp,$3000");
                            }
                            if(PlayerInfo[i][pMember] == TEAM_BRAIN && PlayerInfo[i][pRank] == 3)
                            {
                                GivePlayerMoney(i,4000);
                                PlayerInfo[i][Exp] += 4;
                                SendClientMessage(i,COLOR_GREEN,"No Brain:4 Exp,$4000");
                            }
                            if(PlayerInfo[i][pMember] == TEAM_BRAIN && PlayerInfo[i][pRank] == 4)
                            {
                                GivePlayerMoney(i,5000);
                                PlayerInfo[i][Exp] += 5;
                                SendClientMessage(i,COLOR_GREEN,"No Brain:5 Exp,$5000");
                            }
                            if(PlayerInfo[i][pMember] == TEAM_BRAIN && PlayerInfo[i][pRank] == 5)
                            {
                                GivePlayerMoney(i,6000);
                                PlayerInfo[i][Exp] += 6;
                                SendClientMessage(i,COLOR_GREEN,"No Brain:6 Exp,$6000");
                            }
                            if(PlayerInfo[i][pMember] == TEAM_BRAIN && PlayerInfo[i][pRank] == 6)
                            {
                                GivePlayerMoney(i,15000);
                                PlayerInfo[i][Exp] += 8;
                                SendClientMessage(i,COLOR_GREEN,"No Brain:8 Exp,$15000");
                            }
                            SendClientMessage(i,COLOR_GREEN,"Взето Exp:1 Exp");
                            format(String, sizeof(String), "Нова обща сума:%d $", PlayerInfo[i][pCash]);
                            SendClientMessage(i,COLOR_GREEN,String);


                }
        }
    }

}
Reply


Messages In This Thread
Where i wrong this payday code - by MrTinder - 22.03.2013, 10:00
Re: Where i wrong this payday code - by LarzI - 22.03.2013, 10:12
Re: Where i wrong this payday code - by MrTinder - 22.03.2013, 10:21
Re: Where i wrong this payday code - by LarzI - 22.03.2013, 10:27
Re: Where i wrong this payday code - by MrTinder - 22.03.2013, 10:29
Re: Where i wrong this payday code - by MrTinder - 22.03.2013, 14:58
Re: Where i wrong this payday code - by MrTinder - 23.03.2013, 07:13
Re: Where i wrong this payday code - by [ABK]Antonio - 23.03.2013, 09:30
Re: Where i wrong this payday code - by MrTinder - 23.03.2013, 13:59
Re: Where i wrong this payday code - by MrTinder - 30.03.2013, 14:02

Forum Jump:


Users browsing this thread: 6 Guest(s)