23.02.2017, 19:59
(
Последний раз редактировалось grymtn; 23.02.2017 в 21:56.
Причина: news
)
topic can be locked problem wasnt in these blocks release was broken udb hash is used
entering game and after registering my passwords dont seem to work as it constantly says wrong password i thought it was because of udb hash so i removed the hash from code and doesnt seem like answer. Code is not mine im just editing a release and im not perfect with coding iin pwn please bear with me
im using y_ini
Edit: Apparently when i leave my password empty and try to login like that i can login like correct password. so entering the actual password doesnt work but leaving it blank logs me in
my code blocks
entering game and after registering my passwords dont seem to work as it constantly says wrong password i thought it was because of udb hash so i removed the hash from code and doesnt seem like answer. Code is not mine im just editing a release and im not perfect with coding iin pwn please bear with me
im using y_ini
Edit: Apparently when i leave my password empty and try to login like that i can login like correct password. so entering the actual password doesnt work but leaving it blank logs me in
my code blocks
Код:
case DIALOG_REGISTER: { if (!response) { Kick(playerid); return 1; } else if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register","You have entered an invalid password.\n""Type your password below to register a new account.","Register","Quit"); new IP[22]; GetPlayerIp(playerid, IP, sizeof(IP)); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); PlayerInfo[playerid][pName] = name; PlayerInfo[playerid][pPlate1] = 0; PlayerInfo[playerid][pPlate2] = 0; PlayerInfo[playerid][pPlate3] = 0; new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Password"); INI_WriteInt(File,"Cash",0); INI_WriteInt(File,"Admin",0); INI_WriteInt(File,"Kills",0); INI_WriteInt(File,"Deaths",0); INI_WriteInt(File,"LSD",0); INI_WriteInt(File,"Cocaine",0); INI_WriteInt(File,"Marijuana",0); INI_WriteInt(File,"Respect",0); INI_WriteInt(File,"Cigarettes",0); INI_WriteInt(File,"Beer",0); INI_WriteString(File, "Ip", IP); INI_WriteFloat(File,"Health",0); INI_WriteInt(File,"BankAccount",0); INI_WriteInt(File,"Datasaved",0); INI_WriteInt(File,"Number",0); INI_WriteInt(File,"Level",0); INI_WriteInt(File,"Crashed",0); INI_WriteInt(File,"Phone",0); INI_WriteInt(File,"Donator",0); INI_WriteInt(File, "Plate1", PlayerInfo[playerid][pPlate1]); INI_WriteInt(File, "Plate2", PlayerInfo[playerid][pPlate2]); INI_WriteInt(File, "Plate3", PlayerInfo[playerid][pPlate3]); INI_WriteString(File, "Name", PlayerInfo[playerid][pName]); INI_Close(File); FadeColorForPlayer(playerid,0,0,0,0,0,0,0,255,15,0); GivePlayerMoney(playerid, 2500); PlayerInfo[playerid][pSkin] = 26; PlayerInfo[playerid][pXPos] = 1742.9600; PlayerInfo[playerid][pYPos] = -1861.4019; PlayerInfo[playerid][pZPos] = 0.2426; PlayerInfo[playerid][pLevel] = 1; PlayerInfo[playerid][pBankAccount] = 1000; SetTimerEx("AgeSetup", 1000, false, "i", playerid); new Year, Month, Day; getdate(Year, Month, Day); PlayerLogged[playerid] = true; PlayerInfo[playerid][pYear] = Year; PlayerInfo[playerid][pMonth] = Month; PlayerInfo[playerid][pDay] = Day; } }
Код:
case DIALOG_LOGIN: { if(!response) { Kick(playerid); return 1; } else if(response) { if(strlen(inputtext) == PlayerInfo[playerid][pPass]) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); LoadFightingStyle(playerid); FadeColorForPlayer(playerid,0,0,0,255,0,0,0,0,15,0); SCM(playerid, COLOR_WHITE, "You have successfully logged in."); TogglePlayerSpectating(playerid, false); PlayerLogged[playerid] = true; SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]); new playername[24]; GetPlayerName(playerid, playername, sizeof(playername)); PlayerInfo[playerid][pName] = playername; new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteString(File, "Name", PlayerInfo[playerid][pName]); INI_Close(File); sInfo[playerid][Misc] = 0; sInfo[playerid][Head] = 0; sInfo[playerid][Chest] = 0; sInfo[playerid][Crotch] = 0; sInfo[playerid][LArm] = 0; sInfo[playerid][RArm] = 0; sInfo[playerid][LLeg] = 0; sInfo[playerid][RLeg] = 0; if(PlayerInfo[playerid][pTutorialDone] == 0) return SetTimerEx("AgeSetup", 1000, false, "i", playerid); if(PlayerInfo[playerid][pBanned] == 1) { SCM(playerid, COLOR_LIGHTRED, "AdmCmd: You have been banned for logging into a banned account."); SetTimerEx("UnsetBan", 500, 0, "i", playerid); } } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\n""Type your password below to login.","Login","Quit"); } return 1; } }