03.11.2014, 06:14
try this:
if not worked try updating you YSI library
https://sampforum.blast.hk/showthread.php?tid=321092
pawn Код:
enum pInfo
{
pC4
}
new PlayerInfo[MAX_PLAYERS][pInfo];
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("C4",PlayerInfo[playerid][pC4]);
return 1;
}
stock UserPath(playerid)
{
new string[35], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string,sizeof(string),"c4/%s.ini",playername);
return string;
}
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
}
else if(!fexist(UserPath(playerid)))
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"C4",0);
INI_Close(File);
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(fexist(UserPath(playerid)))
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"C4",PlayerInfo[playerid][pC4]);
INI_Close(File);
}
return 1;
}
https://sampforum.blast.hk/showthread.php?tid=321092