Removing amount from Ini File - 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: Removing amount from Ini File (
/showthread.php?tid=65305)
Removing amount from Ini File -
Robbin237 - 11.02.2009
Hi guys im making some kind of bank system but my question is how to do the current amount in the ini file minus the amount i give in:
BankMoney (Read from IniFile) - 5000
dini_Set("status.ini", "BankMoney",
);
Please help me.
Thanks!
Re: Removing amount from Ini File -
Nero_3D - 11.02.2009
pawn Код:
new money = dini_Int("status.ini", "BankMoney") + NumberWhichThePersonTypedIn;
dini_IntSet("status.ini", "BankMoney", money);
GetPlayerMoney(playerid, -money);
Ok that isnt what you exactly wanted but the first line should fit your question
because if the number that you typed is is minus the plus will turn to a minus because +- = -
Re: Removing amount from Ini File -
Robbin237 - 11.02.2009
EDIT: Got it, thanks!