SA-MP Forums Archive
Payday Problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Payday Problem. (/showthread.php?tid=348439)



Payday Problem. - Yordan_Kronos - 05.06.2012

I Have problem.When is Payday time.My money become 0.I dont know why..

Example in 10:50 i have 1500 $ .. in 11:00 on payday my money automatic become 0 .. ?? Why ?

pawn Код:
{
        format(string, sizeof(string), "SERVER: Time now is %d:00 ffff",tmphour);
        SendClientMessageToAll(COLOR_WHITE,string);
        ghour = tmphour;
        Payday();
        if (realtime)
        {
            SetWorldTime(tmphour);
        }
    }
}
pawn Код:
public Payday()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new nxtlevel;
            nxtlevel = PlayerInfo[i][pLevel]+1;
            new string[128];
            format(string, sizeof(string), "~y~PayDay~n~~w~Paycheck");
            GameTextForPlayer(i, string, 5000, 1);
            new payday = nxtlevel*1000;
            GivePlayerCash(i,payday);
            PlayerInfo[i][pExp]++;
        }
    }
    return 1;
}



Re: Payday Problem. - Roel - 05.06.2012

Show us your GivePlayerCash methode.


Re: Payday Problem. - Yordan_Kronos - 05.06.2012

This ?

pawn Код:
GivePlayerCash(playerid, PlayerInfo[playerid][pCash]);



Re: Payday Problem. - Yordan_Kronos - 05.06.2012

Maybe problem is in my Anticheat