How to script a money save like new SavedWantedLevel[MAX_PLAYERS]??
#4

Quote:
Originally Posted by UserName31
Посмотреть сообщение
i mean for money not wanted
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
How to script a money save like new SavedWantedLevel[MAX_PLAYERS]?? - by UserName31 - 29.06.2012, 19:15
Re: How to script a money save like new SavedWantedLevel[MAX_PLAYERS]?? - by Cxnnor - 29.06.2012, 19:25
Re: How to script a money save like new SavedWantedLevel[MAX_PLAYERS]?? - by UserName31 - 29.06.2012, 19:40
Re: How to script a money save like new SavedWantedLevel[MAX_PLAYERS]?? - by Cxnnor - 29.06.2012, 20:11

Forum Jump:


Users browsing this thread: 1 Guest(s)