// Open Dialog
ShowPlayerDialog(playerid, DIALOG_ID, DIALOG_STYLE_INPUT, "~ Title ~", "Put you phrase.", "Accept", "Noothing");
// In OnDialogResponse
if(dialogid == DIALOG_ID)
{
if(response) // checks if player click in "Accept"
{
SendClientMessage(playerid, -1,"You Type: ");
SendClientMessage(playerid, -1, inputtext); // inputtext is input.
}
if(!response) // check if player click in "Noothing"
{
SendClientMessage(playerid, -1, "NoothingNoothingNoothingNoothingNoothingNoothing");
}
}
Try This
pawn Код:
|
ShowPlayerDialog(playerid,67,DIALOG_STYLE_INPUT,"Login Account","The account '%s' is Registered!\nLogin to acces your Account:","Login","Quit");
new str[128], nome[24]; GetPlayerName(playerid, nome, 24);
format(str, sizeof(str), "The account '%s' is Registered!\nLogin to acces your Account:", nome);
ShowPlayerDialog(playerid,67,DIALOG_STYLE_INPUT,"Login Account",str,"Login","Quit");
if(dialogid == 67)
if(dialogid == DIALOGID+67)
{
if(response)
{
cmd_login(playerid,inputtext);
if (PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: You are already logged in.");
if (!udb_Exists(PlayerName2(playerid))) return SendClientMessage(playerid,COLOR_RED,"ACCOUNT: Account doesn't exist, please use '/register [password]'.");
if (udb_CheckLogin(PlayerName2(playerid),inputtext))
{
new file[256], tmp3[100], lname[MAX_PLAYER_NAME];
GetPlayerName(playerid,lname,sizeof(lname));
format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(lname));
GetPlayerIp(playerid,tmp3,100);
dini_Set(file,"ip",tmp3);
LoginPlayer(playerid);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
if(PlayerInfo[playerid][Level] > 0) {
format(string,sizeof(string),"ACCOUNT: Successfully Logged In. (Level %d)", PlayerInfo[playerid][Level] );
return SendClientMessage(playerid,green,string);
} else return SendClientMessage(playerid,green,"ACCOUNT: Successfully Logged In");
}
return ShowPlayerDialog(playerid, DIALOGID0+2, DIALOG_STYLE_INPUT,"Password", "WRONG Password, Try Again", "OK", "Cancel");
}
return 1;
}