SA-MP Forums Archive
Wrong password after dini offline edit - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Wrong password after dini offline edit (/showthread.php?tid=227961)



Wrong password after dini offline edit - Daddy Yankee - 18.02.2011

Ok so I'm using the next command to unban people. After I use that the passwords are becoming invalid, it's like I edit the ini file with notepad. The passwords are encrypted, I'm using a very changed version of GodFather

This is my command, I have more but this is one of them
Код:
	if(strcmp(cmd, "/unban", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        new string2[256];
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GREY, "USAGE: /unban [full name(case sensative)]");
				return 1;
			}
			if (PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pBanAppealer])
			{
			    format(string, sizeof(string), "%s.ini",tmp);
	    	    if(dini_Exists(string))
	    	    {
	    	        if(dini_Int(string, "Band") > 0)
	    	        {
						new clearban[6];
	    	            format(clearban, sizeof(clearban),"None");
						dini_Set(string, "BanReason",clearban);
	    	            dini_IntSet(string, "Band", 0);
	    	            dini_IntSet(string, "Warnings", 0);
	    	            string2 = dini_Get(string, "IP");
	    	            format(string, sizeof(string),"unbanip %s", string2);
        	            SendRconCommand(string);
            		    SendRconCommand("reloadbans");
            		    format(string, 256, "AdmWarning: %s has unbanned account '%s' and IP '%s'.",PlayerName(playerid),tmp,string2);
                        ABroadCast(COLOR_LIGHTRED, string, 1);
            		    return 1;
            	    }
            	    else
            	    {
            	        SendClientMessage(playerid, COLOR_GRAD2, "That player is not account-banned. You have unbanned their IP.");
            	        string2 = dini_Get(string, "IP");
            		    format(string, sizeof(string), "unbanip %s", string2);
            		    SendRconCommand(string);
            		    SendRconCommand("reloadbans");
            		    return 1;
            	    }
	    	    }
	    	    else
	    	    {
	        	    SendClientMessage(playerid, COLOR_GRAD2, "That player does not exist!");
	    	    }
			}
		}
		return 1;
	}
I hope you can help me


Re: Wrong password after dini offline edit - MadeMan - 18.02.2011

Show your encrypt function.


Re: Wrong password after dini offline edit - Calgon - 18.02.2011

I can already tell what script you're using and you won't be able to use Dini to change integers without changing the Dini include alone, seeing as the way that the script you're using saves data to files and the way that Dini doesn't.


Re: Wrong password after dini offline edit - Daddy Yankee - 19.02.2011

So is there any other ini editor which makes the changes in that way ? I also tried to read them with dini under OnPlayerLogin but I was dying every time I logged in

Nevermind, I removed \r from dini include