Payday
#10

I got the solution.

I forgot the check if the player is connected

Here is good solution:

pawn Код:
public Realtime(playerid)
{
    new hour, minute, second;
    gettime(hour, minute, second);
    SetWorldTime(hour);
    if(minute == 00 && second == 00)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                SendClientMessage(i, COLOR_WHITE, "------ PAYDAY");
                if(gPlayerInfo[playerid][pLevel] == 1)
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You received $1000");
                    GivePlayerMoney(playerid, 1000);
                }
                else if(gPlayerInfo[playerid][pLevel] == 2)
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You received $2000");
                    GivePlayerMoney(playerid, 2000);
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Payday - by Hipflop - 07.07.2011, 15:54
Re: Payday - by Vero - 07.07.2011, 15:58
Re: Payday - by Dirkon - 07.07.2011, 16:00
Re: Payday - by Hipflop - 07.07.2011, 16:01
Re: Payday - by Dirkon - 07.07.2011, 16:04
Re: Payday - by Hipflop - 07.07.2011, 16:09
Re: Payday - by Dirkon - 07.07.2011, 16:19
Re: Payday - by Hipflop - 07.07.2011, 16:40
Re: Payday - by dariusmare - 07.07.2011, 16:49
Re: Payday - by Hipflop - 07.07.2011, 16:50

Forum Jump:


Users browsing this thread: 1 Guest(s)