24.09.2012, 22:55
(
Последний раз редактировалось trapstar2020; 25.09.2012 в 02:57.
)
Код:
if(CheckPassword(playerid, inputtext)) <<<<<<<<<< my problem ****** gave me 0 answers to my problem how to define this????
pawn Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Please enter your password:", "Login", "Cancel");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_LOGIN)
{
if(!response) // If they clicked 'Cancel' or pressed esc
{
SendClientMessage(playerid, COLOR_RED, "You MUST login to play here. Please change your name.");
Kick(playerid);
}
else // Pressed ENTER or clicked 'Login' button
{
if(CheckPassword(playerid, inputtext))
{
SendClientMessage(playerid, COLOR_RED, "You are now logged in!");
}
else
{
SendClientMessage(playerid, COLOR_RED, "LOGIN FAILED.");
// Re-show the login dialog
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Please enter your password:", "Login", "Cancel");
}
}
return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
}
return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}