SA-MP Forums Archive
y_ini empty 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)
+--- Thread: y_ini empty file (/showthread.php?tid=405510)



y_ini empty file - printer - 06.01.2013

pawn Код:
if(dialogid == 1)
    {
        if(!strlen(inputtext))
            return ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Registration","Type your password please:","Yes","No");
        new File:fi = fopen(UserPath(playerid), io_write);
        fclose(fi);
        new INI:File = INI_Open(UserPath(playerid));
        INI_SetTag(File,"Stats");
        INI_WriteString(File,"Password",inputtext);
        INI_WriteInt(File,"Rank",1);
        INI_WriteInt(File,"Faction",0);
        INI_WriteInt(File,"Admin",0);
        INI_Close(File);
        SetCameraBehindPlayer(playerid);
        SpawnPlayer(playerid);
    }
The file creates, but it's empty for some reason.