SA-MP Forums Archive
Help please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help please (/showthread.php?tid=663805)



Help please - Jaua10 - 11.02.2019

solved


Re: Help please - Volumen - 11.02.2019

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[]) 

    switch(
dialogid
    { 
        case 
DIALOG_LANGUAGE
        { 
            if(
response)  
            { 
                
player_Language[playerid] = 0
                
ShowPlayerDialog(playeridDIALOG_LANGUAGE_SUCCESSDIALOG_STYLE_MSGBOX"{0092FF}Ha configurado su idioma correctamente""{FFFFFF}Su cuenta ha sido establecido en {0092FF}espaсol. {FFFFFF}Si deseas cambiar el lenguaje, usa {0092FF}/lenguaje {FFFFFF}en cualquier momento.""Entiendo"""); 
            }
            else
            {
                
player_Language[playerid] = 1
                
ShowPlayerDialog(playeridDIALOG_LANGUAGE_SUCCESSDIALOG_STYLE_MSGBOX"{0092FF}You have successfully set your language""{FFFFFF}Your account has been set to {0092FF}inglйs. {FFFFFF}If you wish to change the language, type {0092FF}/language {FFFFFF}at any time.""Alright"""); 
            }
        }
    } 
    return 
1




Re: Help please - Jaua10 - 11.02.2019

That's not the solution man, but thank you anyway


Re: Help please - Volumen - 11.02.2019

Clearly if it should work.

PHP код:
//OnPlayerConnect 
ShowPlayerDialog(playeridDIALOG_LANGUAGEDIALOG_STYLE_MSGBOX"{0092FF}Bienvenido | Welcome""{FFFFFF}Por favor, elija el idioma en el que desea visualizar el servidor. | Please, select a language you would like to display this server.""Espaсol""English"); 
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])  
{  
    switch(
dialogid)  
    {  
        case 
DIALOG_LANGUAGE:  
        {  
            if(
response)   
            {  
                
player_Language[playerid] = 0;  
                
ShowPlayerDialog(playeridDIALOG_LANGUAGE_SUCCESSDIALOG_STYLE_MSGBOX"{0092FF}Ha configurado su idioma correctamente""{FFFFFF}Su cuenta ha sido establecido en {0092FF}espaсol. {FFFFFF}Si deseas cambiar el lenguaje, usa {0092FF}/lenguaje {FFFFFF}en cualquier momento.""Entiendo""");  
            } 
            else 
            { 
                
player_Language[playerid] = 1;  
                
ShowPlayerDialog(playeridDIALOG_LANGUAGE_SUCCESSDIALOG_STYLE_MSGBOX"{0092FF}You have successfully set your language""{FFFFFF}Your account has been set to {0092FF}inglйs. {FFFFFF}If you wish to change the language, type {0092FF}/language {FFFFFF}at any time.""Alright""");  
            } 
        } 
    }  
    return 
1;  




Re: Help please - Jaua10 - 11.02.2019

still the same funtion, cuz i want when player press esc key show again the same dialog ontheplayerconnect


Re: Help please - Volumen - 11.02.2019

Then you must use DIALOG_STYLE_LIST instead of DIALOG_STYLE_MSGBOX


Re: Help please - Jaua10 - 11.02.2019

i cant use the msgbox? cuz my idea is use the same as onplayerconnect or can u tell me any other way please


Re: Help please - Florin48 - 11.02.2019

make a registration and logging system and put the player there to choose which language to play.


Re: Help please - TokicMajstor - 11.02.2019

You must use dialog list bcz that style is supposed to ask a question like do you want to do something and options yes and no. In your case option english should close dialog not choose the language


Re: Help please - Jaua10 - 11.02.2019

solved