Payday not working.
#1

pawn Код:
forward payday(playerid);
public payday(playerid)
{
    new payday;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))// continue;
    {
   
    if(PlayerInfo[playerid][PayDay] == 1)
    {
    GivePlayerMoney(i, 3500);
    SendClientMessage(i, COLOR_GREEN, "_______ BANK OF LOS SANTOS _______ ");

    SendClientMessage(i, COLOR_GREEN, "BANK:{FFFFFF} You've received 3500$ from the goverment.");
    SendClientMessage(i, COLOR_LIGHTRED, "[ ! ] SERVER: As a new player, with play time: [ 3 ]. You've been given 750$.");

    SendClientMessage(i, COLOR_GREEN, "___________________________________");
    GameTextForPlayer(i, "~w~PAYDAY, USD 750.", 5000, 4);
    PlayerInfo[playerid][PayDay] +=payday;
    }
    if(PlayerInfo[playerid][PayDay] == 2)
    {
    GivePlayerMoney(i, 1500);
    SendClientMessage(i, COLOR_GREEN, "_______ BANK OF LOS SANTOS _______ ");

    SendClientMessage(i, COLOR_GREEN, "BANK:{FFFFFF} You've received 1500$ from the goverment.");
    SendClientMessage(i, COLOR_LIGHTRED, "[ ! ] SERVER: As a new player, with play time: [ 2 ]. You've been given 1500$.");

    SendClientMessage(i, COLOR_GREEN, "___________________________________");
    GameTextForPlayer(i, "~w~PAYDAY, USD 1500.", 5000, 4);
    }
    if(PlayerInfo[playerid][PayDay] == 3)
    {
    GivePlayerMoney(i, 750);
    SendClientMessage(i, COLOR_GREEN, "_______ BANK OF LOS SANTOS _______ ");

    SendClientMessage(i, COLOR_GREEN, "BANK:{FFFFFF} You've received 750$ from the goverment.");
    SendClientMessage(i, COLOR_LIGHTRED, "[ ! ] SERVER: As a new player, with play time: [ 3 ]. You've been given 750$.");

    SendClientMessage(i, COLOR_GREEN, "___________________________________");
    GameTextForPlayer(i, "~w~PAYDAY, USD 750.", 5000, 4);
    }
    if(PlayerInfo[playerid][PayDay] == 4)
    {
    GivePlayerMoney(i, 500);
    SendClientMessage(i, COLOR_GREEN, "_______ BANK OF LOS SANTOS _______ ");
   
    SendClientMessage(i, COLOR_GREEN, "BANK:{FFFFFF} You've received 500$ from the goverment.");
    SendClientMessage(i, COLOR_LIGHTRED, "[ ! ] SERVER: As a normal player, you'll only be given 500$.");
    SendClientMessage(i, COLOR_LIGHTRED, "[ ! ] SERVER: If you wish a raisen paycheck. Check forums donation section.");
   
    SendClientMessage(i, COLOR_GREEN, "___________________________________");
    GameTextForPlayer(i, "~w~PAYDAY, USD 500.", 5000, 4);
    }
    printf("SERVER: Payday has been executed. :)");
    }
    }
    return 1;
}
Okay, so I made this little piece of code, and I wanted to do like new players will get like 3500$ the first payday, and next 1500 and the third 750 and then normal 500$, but its like it doesnt give me anything, not even message, and then server crash or doesnt respond at all.

Any help?
Reply


Messages In This Thread
Payday not working. - by canip0000 - 15.07.2016, 16:15
Re: Payday not working. - by WhiteGhost - 15.07.2016, 16:16
Re: Payday not working. - by canip0000 - 15.07.2016, 16:17
Re: Payday not working. - by JustMe.77 - 15.07.2016, 16:18
Re: Payday not working. - by canip0000 - 15.07.2016, 16:20
Re: Payday not working. - by canip0000 - 15.07.2016, 16:27
Re: Payday not working. - by Luicy. - 15.07.2016, 16:33
Re: Payday not working. - by WhiteGhost - 15.07.2016, 16:37
Re: Payday not working. - by Vince - 15.07.2016, 16:40
Re: Payday not working. - by Shaktimaan - 15.07.2016, 16:51

Forum Jump:


Users browsing this thread: 1 Guest(s)