SA-MP Forums Archive
How can i put money in here? - 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: How can i put money in here? (/showthread.php?tid=151838)



How can i put money in here? - Ihsan_Cingisiz - 01.06.2010

How can i put money in this Dini file?
Quote:

dini_IntSet(file,"Cash", GetPlayerMoney(playerid));




Re: How can i put money in here? - (SF)Noobanatior - 01.06.2010

what wrong with that?


Re: How can i put money in here? - Antonio [G-RP] - 01.06.2010

Use enum?


Re: How can i put money in here? - DJDhan - 01.06.2010

Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
Use enum?
^^ :P Lol enum is for string player variables ingame. Din is to save them in the account file.

By the way, Ihsan, your code is correct. Do you get errors or wranings with that? If yes, please post them here.



Re: How can i put money in here? - Ihsan_Cingisiz - 01.06.2010

Quote:
Originally Posted by DJDhan
Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
Use enum?
^^ :P Lol enum is for string player variables ingame. Din is to save them in the account file.

By the way, Ihsan, your code is correct. Do you get errors or wranings with that? If yes, please post them here.
No, i want to add money to id.
Like GivePlayerMoney(playerid, 5000);
I only get Money =0 in the .ini but i want
to make it Money = 5000, in the start.


Re: How can i put money in here? - DJDhan - 01.06.2010

OnRegistration and log in:
Код:
dini_IntSet(file,Cash,"5000");
GivePlayerMoney(playerid,5000);



Re: How can i put money in here? - Conroy - 01.06.2010

Only use that on registration. On logins use GivePlayerMoney(dini_Int(file, "Cash"));