SA-MP Forums Archive
How to save things with DIni - 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: How to save things with DIni (/showthread.php?tid=282819)



How to save things with DIni - BloodGod - 12.09.2011

Hi, i made a VIP system. You can select a [DONATE] tag for your name. But i want if you disable it, that if you login again, it keeps disabled. It needs to save! I used this code for if you enable/disable. Everything works fine, only i want that it saves

Код:
if(listitem == 1)
        	{
        	    if(donate[playerid] == 0)
        	    {
        	    	donate[playerid] = 1;
           			SendClientMessage(playerid, COLOR_RED, "[V.I.P] "green"The donators tag have now been turned "white"off!");
           			return 1;
           		}
				else if(donate[playerid] == 1)
        	    {
        	    	donate[playerid] = 0;
           			SendClientMessage(playerid, COLOR_RED, "[V.I.P] "green"The donators tag have now been turned "white"on!");
           			return 1;
           		}
        	}
So, it needs to save. If its disabled, in your next visit it should be disabled to. How to make that ?
may be ini to, idk whats faster?


Re: How to save things with DIni - Kingunit - 12.09.2011

y_ini is the best solution I think.


Re: How to save things with DIni - BloodGod - 12.09.2011

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
y_ini is the best solution I think.
U have a nice tut that i also can use for this?


Re: How to save things with DIni - Kingunit - 12.09.2011

Click here! Also you can play around with my gamemode in my signature.