23.07.2015, 16:59
Under onplayerdisconnect
Код:
new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Cash",GetPlayerMoney(playerid)); INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]); INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]); INI_WriteInt(File,"Sex", PlayerInfo[playerid][pSex]); INI_WriteInt(File,"Skin", PlayerInfo[playerid][pSkin]); INI_WriteInt(File,"Location", PlayerInfo[playerid][pLocation]); INI_Close(File);
Код:
forward LoadUser_data(playerid,name[],value[]); public LoadUser_data(playerid,name[],value[]) { INI_Int("Password",PlayerInfo[playerid][pPass]); INI_Int("Cash",PlayerInfo[playerid][pCash]); INI_Int("Admin",PlayerInfo[playerid][pAdmin]); INI_Int("Sex", PlayerInfo[playerid][pSex]); INI_Int("Age",PlayerInfo[playerid][pAge]); INI_Int("Skin", PlayerInfo[playerid][pSkin]); INI_Int("Location", PlayerInfo[playerid][pLocation]); return 1; }