SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 11/02/2019, 06:15 PM   #1
Jaua10
Huge Clucker
 
Join Date: Apr 2011
Posts: 367
Reputation: 13
Default Help please

solved

Last edited by Jaua10; 12/02/2019 at 01:51 PM.
Jaua10 is online now   Reply With Quote
Old 11/02/2019, 06:28 PM   #2
Volumen
Little Clucker
 
Join Date: Dec 2018
Posts: 42
Reputation: 0
Default Re: Help please

PHP Code:
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

Volumen is offline   Reply With Quote
Old 11/02/2019, 06:59 PM   #3
Jaua10
Huge Clucker
 
Join Date: Apr 2011
Posts: 367
Reputation: 13
Default Re: Help please

That's not the solution man, but thank you anyway
Jaua10 is online now   Reply With Quote
Old 11/02/2019, 07:13 PM   #4
Volumen
Little Clucker
 
Join Date: Dec 2018
Posts: 42
Reputation: 0
Default Re: Help please

Clearly if it should work.

PHP Code:
//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 Code:
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;  

Volumen is offline   Reply With Quote
Old 11/02/2019, 07:43 PM   #5
Jaua10
Huge Clucker
 
Join Date: Apr 2011
Posts: 367
Reputation: 13
Default Re: Help please

still the same funtion, cuz i want when player press esc key show again the same dialog ontheplayerconnect
Jaua10 is online now   Reply With Quote
Old 11/02/2019, 08:10 PM   #6
Volumen
Little Clucker
 
Join Date: Dec 2018
Posts: 42
Reputation: 0
Default Re: Help please

Then you must use DIALOG_STYLE_LIST instead of DIALOG_STYLE_MSGBOX
Volumen is offline   Reply With Quote
Old 11/02/2019, 08:16 PM   #7
Jaua10
Huge Clucker
 
Join Date: Apr 2011
Posts: 367
Reputation: 13
Default Re: Help please

i cant use the msgbox? cuz my idea is use the same as onplayerconnect or can u tell me any other way please
Jaua10 is online now   Reply With Quote
Old 11/02/2019, 08:19 PM   #8
Florin48
Huge Clucker
 
Join Date: Nov 2015
Location: Romania
Posts: 260
Reputation: 4
Default Re: Help please

make a registration and logging system and put the player there to choose which language to play.
__________________
Quote:
If I helped you for a while, do not forget to reward me with a good reputation.
Discord: [ SherKan#8573 ]
Support me: [ http://swarife.com/4cpW ]
Gamemode for sale: [ http://ecleneue.com/3Jac ] check IP if you like it: [ 94.23.208.199:2515 ]
Florin48 is offline   Reply With Quote
Old 11/02/2019, 08:26 PM   #9
TokicMajstor
Big Clucker
 
TokicMajstor's Avatar
 
Join Date: Oct 2018
Location: Bosnia And Herzegovina
Posts: 101
Reputation: 1
Default Re: Help please

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
__________________


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 11/02/2019, 08:48 PM   #10
Jaua10
Huge Clucker
 
Join Date: Apr 2011
Posts: 367
Reputation: 13
Default Re: Help please

solved

Last edited by Jaua10; 12/02/2019 at 01:51 PM.
Jaua10 is online now   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:23 PM.


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