i put right password,but...
#1

Hello i have problems with my code as allways.

this time when i registered my acc its all OK,but wheni dissconect and conenct again (relog) and PUT the RIGHT PASSWORD in box it send me a message that i write wrong password,here is my code

Код:
if(dialogid == 2) // Login Dialog
	{
		TogglePlayerControllable(playerid, 0);
		new name[24], file[128];
		GetPlayerName(playerid, name, sizeof(name));
		format(file,sizeof(file),"/KA/Users/%s.ini",name);
		if(response == 1)
		{
			if(dini_Int(file, "Password") == udb_hash(inputtext))
			{
			 	SetPlayerMoney(playerid, dini_Int(file, "Cash"));
				PlayerInfo[playerid][pALevel] = dini_Int(file, "AdminLevel");
				SendClientMessage(playerid, 0x00ff41ff, "[System]: You successfuly loged in!");
				return 1;
			}
			else
			{
			  SendClientMessage(playerid, 0xff7000ff, "[System]: You entered wrong password!");
			  Kick(playerid);
			  return 1;
			}
		}
	}
Reply
#2

try this:
pawn Код:
if(dialogid == 2) // Login Dialog
    {
        TogglePlayerControllable(playerid, 0);
        new name[24], file[128];
        GetPlayerName(playerid, name, sizeof(name));
        format(file,sizeof(file),"/KA/Users/%s.ini",name);
        if(response == 1)
        {
            if(!strcmp(dini_Int(file, "Password"),udb_hash(inputtext),false) && strlen(inputtext))
            {
                SetPlayerMoney(playerid, dini_Int(file, "Cash"));
                PlayerInfo[playerid][pALevel] = dini_Int(file, "AdminLevel");
                SendClientMessage(playerid, 0x00ff41ff, "[System]: You successfuly loged in!");
                return 1;
            }
            else
            {
              SendClientMessage(playerid, 0xff7000ff, "[System]: You entered wrong password!");
              Kick(playerid);
              return 1;
            }
        }
    }
Reply
#3

Quote:
Originally Posted by wafffllesss
try this:
pawn Код:
if(dialogid == 2) // Login Dialog
    {
        TogglePlayerControllable(playerid, 0);
        new name[24], file[128];
        GetPlayerName(playerid, name, sizeof(name));
        format(file,sizeof(file),"/KA/Users/%s.ini",name);
        if(response == 1)
        {
            if(!strcmp(dini_Int(file, "Password"),udb_hash(inputtext),false) && strlen(inputtext))
            {
                SetPlayerMoney(playerid, dini_Int(file, "Cash"));
                PlayerInfo[playerid][pALevel] = dini_Int(file, "AdminLevel");
                SendClientMessage(playerid, 0x00ff41ff, "[System]: You successfuly loged in!");
                return 1;
            }
            else
            {
              SendClientMessage(playerid, 0xff7000ff, "[System]: You entered wrong password!");
              Kick(playerid);
              return 1;
            }
        }
    }
Код:
C:\Documents and Settings\samp\Desktop\Server 2\gamemodes\Roleplay.pwn(121) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
if(!strcmp(dini_Int(file, "Password"),udb_hash(inputtext),false) && strlen(inputtext))
Reply
#4

Try:
Quote:
Originally Posted by Lajko1
Код:
if(!(strcmp(dini_Int(file, "Password"),udb_hash(inputtext),false) && strlen(inputtext)))
Reply
#5

Quote:
Код:
C:\Documents and Settings\samp\Desktop\Server 2\gamemodes\Roleplay.pwn(121) : error 035: argument type mismatch (argument 1)
Where is this warning?
Reply
#6

Quote:
Originally Posted by rabit7
Quote:
Код:
C:\Documents and Settings\samp\Desktop\Server 2\gamemodes\Roleplay.pwn(121) : error 035: argument type mismatch (argument 1)
Where is this warning?
I have looked at all your posts and by the looks of things, you telling people to post their code is useless since you won't be able help because you're still learning.

Now if you actually READ THE POST, you would see he actually posted the line, so STOP SPAMMING YOU POST COUNT.

biltong
Reply
#7

How do you save the password?
Reply
#8

with inputtext

Dini_Set( blablablal ''password'',inputtext);

its something like this i am not on my computer so i can't show more code
Reply
#9

anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)