SA-MP Forums Archive
point's day [help needed] - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: point's day [help needed] (/showthread.php?tid=209250)



point's day [help needed] - Mr.Stranger - 10.01.2011

well my problem is my exp is not increasing. It's stay's on 0 all the time and in all the point's day. Well here is my code


pawn Код:
public pointsday()
{
    for(new i=0; i<=MAX_PLAYERS; i++)
    {
        GivePlayerMoney(i, 1000);
        PlayerInfo[i][pExp]++;
        GameTextForAll("It's Point's Day", 1000, 1);
    }
}
Please help me generously


Re: point's day [help needed] - Lorrden - 10.01.2011

Did you add a timer?


Re: point's day [help needed] - Mr.Stranger - 10.01.2011

yep added


Re: point's day [help needed] - Mr.Stranger - 10.01.2011

this is my whole code

At the top of the script:


pawn Код:
forward pointsday();

Under OnGameModeInit:

pawn Код:
SetTimer("pointsday", 900000, 1);
And at last:

pawn Код:
public pointsday()
{
    for(new i=0; i<=MAX_PLAYERS; i++)
    {
        GivePlayerMoney(i, 1000);
        PlayerInfo[i][pExp]++;
        GameTextForAll("It's Point's Day", 1000, 1);
    }
}
Well now can anyone help me


Re: point's day [help needed] - Mr.Stranger - 10.01.2011

Is my code alright or what?


Re: point's day [help needed] - _rAped - 10.01.2011

Your code is okei, but checkout foreach() by ******.

pawn Код:
PlayerInfo[i][pExp]++; // This should increase it by one
PlayerInfo[i][pExp] = PlayerInfo[i][pExp]+1; // You could try this, can't see why the other one shouldn't work tho.



Re: point's day [help needed] - Mr.Stranger - 10.01.2011

it's worked. Lol unique bug