29.06.2012, 19:15
hey i need help how to scrip new Save money like = SavedWantedLevel[MAX_PLAYERS]
really simple please help
really simple please help
enum pInfo
{
pWanted(playerid)(pWanted);
}
new PlayerInfo[MAX_PLAYERS][pInfo];
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Wanted",PlayerInfo[playerid][pWanted]);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Wanted",PlayerInfo[playerid][pWanted]);
INI_Close(File);
return 1;
}
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;
}
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;
}