20.12.2012, 16:26
(
Последний раз редактировалось zudokuxd10; 20.12.2012 в 18:42.
)
Quote:
Have you tried reading either the y_ini topic or the y_ini tutorial?
|
problem now is, don't load.
i use this in OnPlayerConnet
INI_Load(UserPath(playerid));
also i define this #define PATH "/SaveWeapons/%s.ini"
why don't load when i restart server?
this in OnPlayerDisconnect
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"WeaponsSaved");
INI_WriteInt(File,"weapon0",Infow[playerid][weapon0]);
INI_WriteInt(File,"weapon1",Infow[playerid][weapon1]);
INI_WriteInt(File,"weapon2",Infow[playerid][weapon2]);
INI_WriteInt(File,"weapon3",Infow[playerid][weapon3]);
INI_WriteInt(File,"weapon4",Infow[playerid][weapon4]);
INI_WriteInt(File,"weapon5",Infow[playerid][weapon5]);
INI_WriteInt(File,"weapon6",Infow[playerid][weapon6]);
INI_WriteInt(File,"weapon7",Infow[playerid][weapon7]);
INI_WriteInt(File,"weapon8",Infow[playerid][weapon8]);
INI_WriteInt(File,"weapon9",Infow[playerid][weapon9]);
INI_WriteInt(File,"weapon10",Infow[playerid][weapon10]);
INI_WriteInt(File,"weapon11",Infow[playerid][weapon11]);
INI_WriteInt(File,"weapon12",Infow[playerid][weapon12]);
INI_WriteInt(File,"bullet0",Infow[playerid][weapon0a]);
INI_WriteInt(File,"bullet1",Infow[playerid][weapon1a]);
INI_WriteInt(File,"bullet2",Infow[playerid][weapon2a]);
INI_WriteInt(File,"bullet3",Infow[playerid][weapon3a]);
INI_WriteInt(File,"bullet4",Infow[playerid][weapon4a]);
INI_WriteInt(File,"bullet5",Infow[playerid][weapon5a]);
INI_WriteInt(File,"bullet6",Infow[playerid][weapon6a]);
INI_WriteInt(File,"bullet7",Infow[playerid][weapon7a]);
INI_WriteInt(File,"bullet8",Infow[playerid][weapon8a]);
INI_WriteInt(File,"bullet9",Infow[playerid][weapon9a]);
INI_WriteInt(File,"bullet10",Infow[playerid][weapon10a]);
INI_WriteInt(File,"bullet11",Infow[playerid][weapon11a]);
INI_WriteInt(File,"bullet12",Infow[playerid][weapon12a]);
INI_Close(File);