07.08.2018, 01:09
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case DIALOG_LANGUAGE:
{
if( response ) //They clicked 'OK'
{
switch( listitem ) //Checks through the available languages (Defined above)
{
case 0: //English
{
English[playerid] = 1;
Spanish[playerid] = 0;
SendClientMessage(playerid, COLOR_SUCCESS, "Your language has been set to English.");
ShowPlayerDialog(playerid, DIALOG_PASSWORD, DIALOG_STYLE_PASSWORD, "{0092FF}Register Panel", "\n{FFFFFF}Please put a password below:", "Register", "Cancel");
}
case 1: // Espaсol
{
English[playerid] = 0;
Spanish[playerid] = 1;
SendClientMessage(playerid, COLOR_SUCCESS, "Su idioma ha sido configurado a Espaсol.");
SendClientMessage(playerid, DIALOG_PASSWORD, DIALOG_STYLE_PASSWORD, "{0092FF}Panel de Registro", "\n{FFFFFF}pon tu contraseсa abajo", "Registrar", "Cancelar");
}
}
}
else return ShowPlayerDialog(playerid, DIALOG_LANGUAGE, DIALOG_STYLE_LIST, ""#CYAN"Select your language "#WHITE"(Seleccione su idioma)", LANGUAGE_SELECTION, "OK", ""); //If they hit ESC while on the dialog (trying to bug the system?)
}
}
return true;
}