Dialog LOGIN
#1

Ok i have problem with my dialog login/register script.

When i try to login using password that i used to register: shows that password is incorrect.

SLOVED.

Now other problem - DIALOG ID`s

I have 2 FS with dialogs

1st- this
2nd - cmd list with dialogs

Now problem
Register/Login dialogs working Perfect - BUT cmd`s dialog wont work

how to fix id problems?

- Id`s are different !
Reply
#2

pawn Код:
if(dialogid == 1)
    {
        TogglePlayerControllable(playerid, 0);
        new pName[24], str[128];
        GetPlayerName(playerid,pName,sizeof(pName));
        format(str,sizeof(str),PlayerFile,pName);
        if(response == 1)
        {
            dini_Create(str);
            dini_IntSet(str, "Password", udb_hash(inputtext));
            dini_IntSet(str,"AdminLevel", 0);
            dini_IntSet(str,"Cash", 0);
            SendClientMessage(playerid, COLOR_GREEN, "[System]: Account Created!");
            PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
            TogglePlayerControllable(playerid, 1);
        }
        if(response == 0)
        {
          SendClientMessage(playerid, 0xFFFF0000, "You must log in or register to use this server");
            Kick(playerid);
        }
        return 1;
    }
    if(dialogid ==2)
    {
        TogglePlayerControllable(playerid, 0);
        new pName[24], str[128];
        GetPlayerName(playerid, pName, sizeof(pName));
        format(str, sizeof(str),PlayerFile,pName);
        if(response == 1)
        {
            if(dini_Int(str, "Password") == udb_hash(inputtext))
            {
                IsLogged[playerid] = 1;
                SetPlayerMoney(playerid, dini_Int(str, "Cash"));
                PlayerInfo[playerid][AdminLevel] = dini_Int(str, "AdminLevel");
                SendClientMessage(playerid, COLOR_GREEN, "[System]: Succeed!");
            }
            else
            {
              ShowPlayerDialog(playerid, 2, 1,"Wrong Password", "That Password is incorrect. Please try again.","login", "cancel");
            }
            return 1;
        }
    }
Reply
#3

:* :* :* :* :*
Thank You so MUCH

And One other thing.

How its done: if he pushes "Cancel" then he will be kicked?


Sorry i have scripted long long time ago and its hard to reremember all
Reply
#4

Srooy fo` DP

/\
|| - look upper post
Reply
#5

That was already in the post Mademan made:

Код:
if(response == 0)
{
  SendClientMessage(playerid, 0xFFFF0000, "You must log in or register to use this server");
Kick(playerid);
}
Reply
#6

Shame on me.. didnt saw

Now other problem - DIALOG ID`s

I have 2 FS with dialogs

1st- this
2nd - cmd list with dialogs

Now problem
Register/Login dialogs working Perfect - BUT cmd`s dialog wont work

how to fix id problems?

- Id`s are different !
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)