Dialog problem
#1

Well, I'm not sure really, but it seems I got problems with dialog

pawn Код:
#define password1 "gsaforever"

public OnPlayerSpawn(playerid)
{
if (gTeam[playerid] == 0)
        {
            ShowPlayerDialog( playerid, 104, DIALOG_STYLE_INPUT, "Authentication", "Code number please as Security Agent in trainee, given by Hamza, or any GSA high rank", "Spawn", "Cancel" );
        }
}

public bla bla bla
if(dialogid == 104)
         {
         if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "You didn't write anything!");
         if (response == 1)
            {
                  if (!strcmp(inputtext, password1)) //checking if it is the players password
                  {
                IsLogged[playerid] = 1;
                TogglePlayerControllable(playerid, 1);
                    }
                    else //incorrect password
                  {
                ShowPlayerDialog(playerid, 104, DIALOG_STYLE_INPUT, "Invalid Password", "Invalid Password, try again", "Login", "Cancel");
                     }
            }
         else
            {
                  SendClientMessage(playerid, 0xFFFFFFFF, "You canceled.");
                  Kick( playerid );
            }
        return 1; //returns 1, it has been handled
          }
The problem here, that whenever I click on login with empty password I just log in .. and if wrong password, I get kicked, and if right password, I log in too.

HELP would be appreciated
Reply


Messages In This Thread
Dialog problem - by Hamza' - 26.09.2010, 22:00
Re: Dialog problem - by Scenario - 26.09.2010, 22:06
Re: Dialog problem - by Hamza' - 26.09.2010, 22:12
Re: Dialog problem - by Scenario - 26.09.2010, 22:15
Re: Dialog problem - by Hamza' - 26.09.2010, 22:17
Re: Dialog problem - by Scenario - 26.09.2010, 22:21
Re: Dialog problem - by Hamza' - 26.09.2010, 22:26
Re: Dialog problem - by Scenario - 26.09.2010, 22:31
Re: Dialog problem - by Hamza' - 26.09.2010, 22:34
Re: Dialog problem - by Scenario - 26.09.2010, 22:40

Forum Jump:


Users browsing this thread: 1 Guest(s)