Cash in Bank after Job Paycheck - 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: Cash in Bank after Job Paycheck (
/showthread.php?tid=305787)
Cash in Bank after Job Paycheck -
12kelvin12 - 23.12.2011
Where should i place [pAccount] and how to make the money go to his pAccount (Bank) after he finished the job.
pawn Код:
else if(IsCollectingRubbish[playerid] == 22)
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Well Done! your Pay Check was added to your Bank Account of $175");
IsCollectingRubbish[playerid] = 0;
PlayerInfo[playerid][pCash] -= 175;
GivePlayerMoney(playerid, 175);
Gas[tmpcar] = GasMax;
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
}
}
}
Re: Cash in Bank after Job Paycheck -
Mini` - 23.12.2011
Код:
PlayerInfo[playerid][pCash] -= 175;
Changes to
Код:
PlayerInfo[playerid][pAccount] -= 175;
I asssume. And take out the GivePlayerMoney line...
Re: Cash in Bank after Job Paycheck -
12kelvin12 - 23.12.2011
Preciate ur answer bro, tried it out now.
But instead of givin 175$
It takes 175$ from the bank.
oh jesus.. sorry man i didnt notice the -
what a fail thanks alot for the help.
Re: Cash in Bank after Job Paycheck -
Mini` - 23.12.2011
Oh yeah, my bad. I should have noticed that... What do you think you should do? :/ Try to learn something while you work on things... It's a simple fix... Change the - to a +...
Код:
PlayerInfo[playerid][pAccount] += 175;