Y_INI INI_Int loop
#1

Hey, is it possible to run a loop like this (below), or similar to load information from .ini file? I tryed to run it arleady, but it didn't worked, what should I do?

pawn Код:
#define MAX_SKINS 200
new CID[MAX_PLAYERS][MAX_SKINS];
new SID[MAX_PLAYERS];

stock SaveData(playerid)
{
    new pini[32];
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(pini, sizeof(pini), "Users/%s.ini", playername);
    new INI:File = INI_Open(pini);

    new id = SID[playerid];
    new msg[10];
    format(msg, sizeof(msg), "Skin_%i", id);
   
    INI_SetTag(File, "clothes");
    INI_WriteInt(File, "ID", SID[playerid]);
    INI_WriteInt(File, msg, GetPlayerSkin(playerid));
    INI_Close(File);
    return 1;
}

public LoadUser_clothes(playerid, name[], value[])
{
    INI_Int("ID", SID[playerid]);

    for(new i=0; i<MAX_SKINS; i++)
    {
        new msg[10];
        format(msg, sizeof(msg), "Skin_%i", i);
        INI_Int(msg, CID[playerid][i]);
    }
    return 1;
}
Reply


Messages In This Thread
Y_INI INI_Int loop - by gagas - 14.09.2013, 09:08
Re: Y_INI INI_Int loop - by gagas - 15.09.2013, 12:34
Re: Y_INI INI_Int loop - by gagas - 15.09.2013, 14:11

Forum Jump:


Users browsing this thread: 1 Guest(s)