Need help with OnDialogResponse
#2

Maybe it is happening because the lack of return 1;

I did it for you :

pawn Код:
if(dialogid == LOG)
{
    if(response == 1)
    {
        new pass[256];
        format(pass,sizeof(pass),dini_Get(file, "Password"));
        if(strcmp(inputtext, pass, true) == 0 && strlen(inputtext) > 0)
        {
            LoadPlayerData(playerid);
            TogglePlayerSpectating(playerid,0);
            SetPlayerColor(playerid,0xFFFFFFAA);
            PlayerPlaySound(playerid,1186,0,0,0);
            format(msg, sizeof(msg), "~w~welcome back~n~~p~%s", pname); GameTextForPlayer(playerid,msg,2000,0);
        }
        else
        {
            SendClientMessage(playerid, 0xFFFFFFAA, "{FFFF80}Wrong password.");
            format(msg, sizeof(msg), "{80FFE8}Welcome back {80A2FF}%s{80FFE8}!\nInsert your password into the line below\nto log in to your account.", pname);
            ShowPlayerDialog(playerid, LOG, DIALOG_STYLE_INPUT, " {8C80FF}Account Panel.", msg, "Login", "Cancel");
        }
    }
    else
    {
        Kick(playerid);
    }
    return 1;
}

I hope that i have helped
Reply


Messages In This Thread
Need help with OnDialogResponse - by Audiophr3ak - 05.03.2011, 14:23
Re: Need help with OnDialogResponse - by rjjj - 05.03.2011, 14:55
Re: Need help with OnDialogResponse - by Audiophr3ak - 05.03.2011, 15:18

Forum Jump:


Users browsing this thread: 2 Guest(s)