03.11.2015, 20:50
Download this
And extracts the content in the following path
Edit:
The first answer from me was to solve the problem of amx/os, you must include the include YSI/INI.
And extracts the content in the following path
Код:
pawno/amx/here
The first answer from me was to solve the problem of amx/os, you must include the include YSI/INI.
Код:
#include <a_samp> #include <YSI\y_ini> #define PATH "AAdmin/Users/%s.ini enum pData { pCash, pKills, pDeaths, pAdmin } new PlayerInfo[MAX_PLAYERS][pData]; forward LoadUser_data(playerid,name[],value[]); public LoadUser_data(playerid,name[],value[]) { INI_Int("Admin",PlayerInfo[playerid][pAdmin]; // error line 20! INT_Int("Kills",PlayerInfo[playerid][pKills]; // error line 21! INT_Int("Cash",PlayerInfo[playerid][pCash]; // error line 22! INT_Int("Deaths",PlayerInfo[playerid][pDeaths]; // error line 23! return 1; } UserPath(playerid) { new string[128],playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),PATH,playername); // error line 30! return string; } public OnPlayerConnect(playerid) { if(fexist(UserPath(playerid))) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); return 1; } public OnPlayerDisconnect(playerid, reason) { new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]; INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]); INI_WriteInt(File,"Cash",GetPlayerMoney(playerid)); INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]); INI_Close(File); return 1; }