Y_INI output
#6

Show all the code.

pawn Код:
#include <a_samp>
#include <YSI\y_ini>
#include <YSI\y_dialog>
#include <YSI\y_inline>

static skin[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    if(fexist(FolderSkins(playerid)))
    {
        inline loadskin(string:name[], string:value[])
        {
            INI_Int("skin", skin[playerid]);
        }
        INI_ParseFile(FolderSkins(playerid), "loadskin");
    }
    return true;
}

public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(FolderSkins(playerid));
    INI_SetTag(File, "Information");
    INI_WriteInt(File, "skin", GetPlayerSkin(playerid));
    INI_Close(File);
   
    return true;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerSkin(playerid, skin[playerid]);
    return true;
}

FolderSkins(playerid)
{
    new string[65], name[24];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "/skins/%s.ini", name);
    return string;
}
Reply


Messages In This Thread
Y_INI output - by TazmaNiax - 02.03.2015, 06:20
Re: Y_INI output - by MikE1990 - 02.03.2015, 06:23
Re: Y_INI output - by TazmaNiax - 02.03.2015, 07:02
Re: Y_INI output - by MikE1990 - 02.03.2015, 07:07
Re: Y_INI output - by TazmaNiax - 02.03.2015, 08:24
Respuesta: Y_INI output - by JuanStone - 02.03.2015, 08:33

Forum Jump:


Users browsing this thread: 1 Guest(s)