Login and Register system problem, doesn't save passwords.
#5

OnPlayerDisconnect

Код:
public OnPlayerDisconnect(playerid, reason)
{
    if(IsBeingSpeced[playerid] == 1)
    {
        foreach(Player,i)
        {
            if(spectatorid[i] == playerid)
            {
                TogglePlayerSpectating(i, 0);
            }
        }
    }
	new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    INI_WriteInt(File,"VIP",PlayerInfo[playerid][pVIP]);
    INI_WriteInt(File,"Wanted",GetPlayerWantedLevel(playerid));
    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_WriteInt(File,"Jailed",PlayerInfo[playerid][pJailed]);
    INI_WriteInt(File,"Muted",PlayerInfo[playerid][pMuted]);
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
	INI_WriteInt(File,"Score",GetPlayerScore(playerid));
	INI_WriteInt(File,"Banned",PlayerInfo[playerid][pBanned]);
    INI_Close(File);
    
    IsOnDuty[playerid] = 0;
    IsGodMode[playerid] = 0;
	return 1;
}
enum

Код:
enum pInfo
{
	pPass,
	pAdmin,
	pVIP,
	pWanted,
	pKills,
	pDeaths,
	pJailed,
	pMuted,
	pCash,
	pScore,
	pBanned
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)