[HELP] Y_INI Does not save accounts
#1

My Code

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{

       if(IsPlayerConnected(playerid) && PlayerInfo[playerid][Logued] == 1)
    {
      Date(playerid);
    }
    else
    if(IsPlayerConnected(playerid) && PlayerInfo[playerid][Logued] == 0)
    {
    SendClientMessage(playerid,0xFF0000C8,"* This account is not saved.");
    }

       return 1;
}

Date(playerid)
{
if(PlayerInfo[playerid][Logueado] == 1)
{
new INI:FileCE = INI_Open(UserPath(playerid));
INI_SetTag(FileCE,"data");
INI_WriteInt(FileCE,"Oro",PlayerInfo[playerid][Oro]);
INI_WriteInt(FileCE,"Admin",PlayerInfo[playerid][Level]);
INI_WriteInt(FileCE,"Vip",PlayerInfo[playerid][Kit]);
INI_WriteInt(FileCE,"Score",GetPlayerScore(playerid));
INI_WriteInt(FileCE,"Kills",PlayerInfo[playerid][Kills]);
INI_WriteInt(FileCE,"Incremento",PlayerInfo[playerid][Incremento]);
INI_WriteInt(FileCE,"Deaths",PlayerInfo[playerid][Deaths]);
INI_WriteInt(FileCE,"Color", GetPlayerColor(playerid));
INI_WriteInt(FileCE,"Skin", GetPlayerSkin(playerid));
INI_WriteInt(FileCE,"HeadShoots", PlayerInfo[playerid][HeadShoot]);
INI_WriteInt(FileCE,"Nivel", PlayerInfo[playerid][LevelUp]);
INI_WriteInt(FileCE,"Faction", PlayerInfo[playerid][Clan]);
INI_WriteInt(FileCE,"SpecialUser", PlayerInfo[playerid][SpecialUser]);
INI_Close(FileCE);
}
}

stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),GuardarInfo,playername);
    return string;
}
stock udb_hash(buf[]) {
    new length=strlen(buf);
    new s1 = 1;
    new s2 = 0;
    new n;
    for (n=0; n<length; n++)
    {
       s1 = (s1 + buf[n]) % 65521;
       s2 = (s2 + s1)     % 65521;
    }
    return (s2 << 16) + s1;
}
Reply


Messages In This Thread
[HELP] Y_INI Does not save accounts - by INKISICION - 06.02.2017, 03:10
Re: [HELP] Y_INI Does not save accounts - by JesterlJoker - 06.02.2017, 05:31

Forum Jump:


Users browsing this thread: 1 Guest(s)