03.09.2010, 21:33
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[256];
if(dialogid == 1)
{
if(response == 0)
{
SendClientMessage(playerid, COLOR_ALCAIDA, "Vocк saiu do servidor!");
Kick(playerid);
return 1;
}
if(response >= 1)
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Login", "Bem Vindo ao Brasil Play Twister v2.5\nDigite sua Senha para Logar!!!", "Logar", "Sair");
return 1;
}
if(strval(inputtext) > 0)
{
format(string,sizeof(string),"/logar %d",strval(inputtext));
OnPlayerCommandText(playerid,string);
return 1;
}
format(string,sizeof(string),"/logar %s",inputtext);
OnPlayerCommandText(playerid,string);
return 1;
}
return 1;
}
if(dialogid == 2)
{
if(response == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк saiu do servidor!");
Kick(playerid);
return 1;
}
if(response >= 1)
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Registrar", "Bem Vindo ao Brasil Play Twister v2.5\nDigite sua Senha para Registrar!!!", "Registrar", "Sair");
return 1;
}
if(strval(inputtext) > 0)
{
format(string,sizeof(string),"/registrar %d",strval(inputtext));
OnPlayerCommandText(playerid,string);
return 1;
}
format(string,sizeof(string),"/registrar %s",inputtext);
OnPlayerCommandText(playerid,string);
return 1;
}
return 1;
}
{
new string[256];
if(dialogid == 1)
{
if(response == 0)
{
SendClientMessage(playerid, COLOR_ALCAIDA, "Vocк saiu do servidor!");
Kick(playerid);
return 1;
}
if(response >= 1)
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Login", "Bem Vindo ao Brasil Play Twister v2.5\nDigite sua Senha para Logar!!!", "Logar", "Sair");
return 1;
}
if(strval(inputtext) > 0)
{
format(string,sizeof(string),"/logar %d",strval(inputtext));
OnPlayerCommandText(playerid,string);
return 1;
}
format(string,sizeof(string),"/logar %s",inputtext);
OnPlayerCommandText(playerid,string);
return 1;
}
return 1;
}
if(dialogid == 2)
{
if(response == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк saiu do servidor!");
Kick(playerid);
return 1;
}
if(response >= 1)
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Registrar", "Bem Vindo ao Brasil Play Twister v2.5\nDigite sua Senha para Registrar!!!", "Registrar", "Sair");
return 1;
}
if(strval(inputtext) > 0)
{
format(string,sizeof(string),"/registrar %d",strval(inputtext));
OnPlayerCommandText(playerid,string);
return 1;
}
format(string,sizeof(string),"/registrar %s",inputtext);
OnPlayerCommandText(playerid,string);
return 1;
}
return 1;
}