Filterscript not using server side money? [Help]
#6

Basically, doing this:

pawn Код:
SetPVarInt(playerid, "Money", 100);
... is the same as doing this:

pawn Код:
PlayerInfo[playerid][pMoney] = 100;
So, you would basically need to change every line like this:

pawn Код:
PlayerInfo[playerid][pMoney]++;
to this:

pawn Код:
SetPVarInt(playerid, "Money", GetPVarInt(playerid, "Money")++);
So, your code...

pawn Код:
PlayerInfo[i][pCash] -= cost;
Could easily become:

pawn Код:
SetPVarInt(playerid, "Money", GetPVarInt(playerid, "Money") - cost);
NOTE: The variable names you use in PVars (i.e. "Money") are case sensitive. So, MONEY, is not equal to Money. I would recommend to make everything a CAPITAL variable, just to be on the safe side.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)