Little help
#3

Using
Код:
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
pawn Код:
enum PInfo
{
pDeaths,
pKills
pCash,
}
new PlayerInfo[MAX_PLAYERS][PInfo];

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
 
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 1;
}
stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),"/YOURPATH/%s.ini",playername);
    return string;
}
public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))//Login
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);

//And all other code
Reply


Messages In This Thread
Little help - by jotan. - 15.08.2012, 15:14
Re: Little help - by detter - 15.08.2012, 15:31
Re: Little help - by [MM]RoXoR[FS] - 15.08.2012, 15:31
Re: Little help - by jotan. - 15.08.2012, 17:31

Forum Jump:


Users browsing this thread: 1 Guest(s)