Playerinfo Does'nt +1
#4

This works:
pawn Код:
forward RobBank(playerid);
public RobBank(playerid)
{
    new rand = random(130000)+0;
    new string[64];
    GivePlayerMoney(playerid,rand);
    format(string,sizeof string,"Your robbed $%d from the Bank",rand);
    SendClientMessage(playerid, -1, string);
    PlayerInfo[playerid][pRobberies] += 1; // error line
    SendClientMessage(playerid, COLOR_GREEN, "You Rob the bank and now have 3 wanted level!");
    TogglePlayerControllable(playerid,1);
    return 1;
}
The mistake is in doing '+', which doesn't works. It's '+=' which means current value + 1. You can also use '++' for doing +1 only and '--' for -1.

#Late post..
Reply


Messages In This Thread
Playerinfo Does'nt +1 - by AmsterdamCopsAndRobbers - 26.04.2013, 15:21
Re: Playerinfo Does'nt +1 - by AmsterdamCopsAndRobbers - 26.04.2013, 15:26
Re: Playerinfo Does'nt +1 - by MP2 - 26.04.2013, 15:29
Re: Playerinfo Does'nt +1 - by Lordzy - 26.04.2013, 15:32
Re: Playerinfo Does'nt +1 - by AmsterdamCopsAndRobbers - 26.04.2013, 15:38

Forum Jump:


Users browsing this thread: 1 Guest(s)