SA-MP Forums Archive
loading bools using Y_INI - 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: loading bools using Y_INI (/showthread.php?tid=398950)



loading bools using Y_INI - [D]ry[D]esert - 12.12.2012

Hello every one.
i had saved player's bool, and i wanna load it.
i got no idea how to. i already search, but i cant find my point..
so here i am saving the bool.
pawn Код:
enum options
{
bool:Togglepm
//other var
};
new pOption[MAX_PLAYERS][options];
pawn Код:
stock SaveStats(playerid)
    {
        if(IsPlayerConnected(playerid))
        {
        new INI:File = INI_Open(UserPath(playerid));
        INI_SetTag(File,"data");
        INI_WriteBool(File,"Togglepm",pOption[playerid][Togglepm]);
             INI_Close(File);
        }
    }
and i wanna load it.
so what shall i do ?