SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 11/02/2019, 07:54 PM   #11
TokicMajstor
Big Clucker
 
TokicMajstor's Avatar
 
Join Date: Oct 2018
Location: Bosnia And Herzegovina
Posts: 177
Reputation: 1
Default Re: Help please

Code:
ShowPlayerDialog(playerid, DIALOG_LANGUAGE, DIALOG_STYLE_LIST, "{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\nEnglish, "OK", "X");
__________________


If Iam better than you = you're noob
If you're better than me = you're cheater
If everyone is better than me = I have lags
#Logic
TokicMajstor is offline   Reply With Quote
Old 12/02/2019, 01:23 AM   #12
Jaua10
Huge Clucker
 
Join Date: Apr 2011
Posts: 410
Reputation: 13
Default Re: Help please

But i want with the dialog msgbox with Two bottons spanish And english is that possible?
Jaua10 is offline   Reply With Quote
Old 12/02/2019, 05:05 AM   #13
TokicMajstor
Big Clucker
 
TokicMajstor's Avatar
 
Join Date: Oct 2018
Location: Bosnia And Herzegovina
Posts: 177
Reputation: 1
Default Re: Help please

Yes but you must add notice on it which says If you press enter you choose Español if you press esc you choose english and after he presses any of it you must make the next step you want if it is registation
__________________


If Iam better than you = you're noob
If you're better than me = you're cheater
If everyone is better than me = I have lags
#Logic
TokicMajstor is offline   Reply With Quote
Old 12/02/2019, 10:50 AM   #14
Jaua10
Huge Clucker
 
Join Date: Apr 2011
Posts: 410
Reputation: 13
Default Re: Help please

good

Last edited by Jaua10; 12/02/2019 at 12:50 PM.
Jaua10 is offline   Reply With Quote
Old 12/02/2019, 11:34 AM   #15
Autorojo
Little Clucker
 
Join Date: Mar 2015
Location: Santa Fe, Argentina
Posts: 14
Reputation: 0
Default Re: Help please

Must read this and this.

Pressing ESC is the same that pressing the right button. And pressing ENTER is equal to press the left button. So, if you use DIALOG_STYLE_MSGBOX, the player have just two options: ENTER (left button: Español) and ESC (right button: English).

I think you have to use DIALOG_STYLE_LIST, like this:

PHP Code:
ShowPlayerDialog(playeridDIALOG_LANGUAGEDIALOG_STYLE_LIST"{0092FF}Seleccione lenguaje | Select language""Español\nEnglish""Select""Exit"); 
PHP Code:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])    
{
    switch(
dialogid)
    {
        case 
DIALOG_LANGUAGE:    
        {    
            if(
response)
            {
                
// "Select" button (ENTER)

                
switch(listitem)
                {
                    case 
0// "Español"
                    
{
                        
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""");
                    }

                    case 
1// "English"
                    
{
                        
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""");
                    }
                }
            }   
            else   
            {
                
// "Exit" button (ESC)
                
SendClientMessage(playerid, -1"Use /language if you change your mind!");
            }   
        }
    }
    return 
1;    

Autorojo is offline   Reply With Quote
Old 12/02/2019, 12:01 PM   #16
Jaua10
Huge Clucker
 
Join Date: Apr 2011
Posts: 410
Reputation: 13
Default Re: Help please

alright thank you
Jaua10 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 02:05 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.