31.12.2014, 20:20
When a person registers on my server it says their character is saved in console until they leave and when they try to join back, it says incorrect password for them, why?
Saving :
Saving :
Код:
forward SaveChar(playerid); public SaveChar(playerid) { if(!IsPlayerConnected(playerid)) return 1; GetPlayerPos(playerid, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ]); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File, "data"); INI_WriteInt(File, "Cash", GetPlayerMoney(playerid)); INI_WriteFloat(File,"PosX",PlayerInfo[playerid][pX]); INI_WriteFloat(File,"PosY",PlayerInfo[playerid][pY]); INI_WriteFloat(File,"PosZ",PlayerInfo[playerid][pZ]); INI_WriteInt(File, "Admin", PlayerInfo[playerid][pAdmin]); INI_WriteInt(File, "Helper", PlayerInfo[playerid][pHelper]); INI_WriteInt(File, "Prisoned", PlayerInfo[playerid][pPrisonReason]); INI_WriteInt(File, "Wanted", PlayerInfo[playerid][pWantedLevel]); INI_WriteInt(File, "Arrests", PlayerInfo[playerid][pArrests]); INI_WriteInt(File, "Crimes", PlayerInfo[playerid][pCrimes]); INI_WriteInt(File, "Jailed", PlayerInfo[playerid][pJailed]); INI_WriteInt(File, "Level", PlayerInfo[playerid][pLevel]); INI_WriteInt(File, "Warnings", PlayerInfo[playerid][pWarns]); INI_WriteInt(File, "CSR", PlayerInfo[playerid][pShopTech]); INI_WriteInt(File, "Order", PlayerInfo[playerid][pOrder]); INI_WriteInt(File, "Character", PlayerInfo[playerid][pChar]); INI_WriteInt(File, "Interior", PlayerInfo[playerid][pInt]); INI_WriteInt(File, "VirtualWorld", PlayerInfo[playerid][pVW]); INI_WriteInt(File, "Pot", PlayerInfo[playerid][pPot]); INI_WriteInt(File, "Heroin", PlayerInfo[playerid][pHeroin]); INI_WriteInt(File, "Crack", PlayerInfo[playerid][pCrack]); INI_WriteInt(File, "Meth", PlayerInfo[playerid][pMeth]); INI_WriteInt(File, "GiftTime", PlayerInfo[playerid][pGiftTime]); INI_WriteInt(File, "PlayingHours", PlayerInfo[playerid][pTime]); INI_WriteInt(File, "Exp", PlayerInfo[playerid][pExp]); INI_WriteInt(File, "Faction", PlayerInfo[playerid][pTeam]); INI_WriteInt(File, "Rank", PlayerInfo[playerid][pRank]); INI_WriteInt(File, "Leader", PlayerInfo[playerid][pLeader]); INI_WriteInt(File, "Member", PlayerInfo[playerid][pMember]); INI_WriteInt(File, "Accept", PlayerInfo[playerid][pAcceptID]); INI_WriteInt(File, "FMember", PlayerInfo[playerid][pFMember]); INI_WriteInt(File, "Division", PlayerInfo[playerid][pDivision]); INI_WriteInt(File, "Restricted", PlayerInfo[playerid][pWRestricted]); INI_WriteInt(File, "AGuns", PlayerInfo[playerid][pAGuns]); INI_WriteInt(File, "Guns", PlayerInfo[playerid][pGuns]); INI_WriteInt(File, "GunAmmo", PlayerInfo[playerid][pGunAmmo]); INI_WriteInt(File, "AMSSent", PlayerInfo[playerid][pAMSSent]); INI_WriteInt(File, "ReportsAccepted", PlayerInfo[playerid][pReportsAccepted]); INI_WriteInt(File, "BadgeNumber", PlayerInfo[playerid][pBadgeNum]); INI_Close(File); new str[128]; format(str, sizeof(str), "%s Character has been saved", GetPlayerNameEx(playerid)); print(str); return 1; }