saving mone system ?
#2

On top of your script.
pawn Код:
enum pInfo
{
    pCash(playerid)(pCash);
}

new PlayerInfo[MAX_PLAYERS][pInfo];

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    return 1;
}
Under OnPlayerDisconnect
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
    INI_Close(File);
    return 1;
}
Reply


Messages In This Thread
saving mone system ? - by UserName31 - 29.06.2012, 21:30
Re: saving mone system ? - by Cxnnor - 29.06.2012, 22:09
Re: saving mone system ? - by UserName31 - 30.06.2012, 02:45
Re: saving mone system ? - by UserName31 - 30.06.2012, 02:47
Re: saving mone system ? - by StrangeLove - 30.06.2012, 04:37
Re: saving mone system ? - by [A]ndrei - 30.06.2012, 06:24
Re: saving mone system ? - by UserName31 - 30.06.2012, 17:24

Forum Jump:


Users browsing this thread: 3 Guest(s)