Textdraw Dialog things
#1

Alrigh and now how can i do if any player press the "esc" key,"shift"key and "enter" key the server kicks you with a send u a message?

for example now i got when player enter in server ask you before registering in what lenguage u want to see the game mode,if player select english this will show u a dialog like "hello (name of the character) please put below the password u want, if player select spanish this will showu a dialog like hola (nombre del jugador) por favor escribe tu contraeсa abajo, and if player press "esc" key and "enter" key the server will kicks u too.

for the moment i got this:

PHP код:
public OnPlayerConnect(playerid)
{
    
ShowPlayerDialog(playeridLenguageDIALOG_STYLE_MSGBOX"                                     {FFFFFF}Welcome","\n{FFFFFF}\tPlease, choose a language you would like to display.\n\n\tPor favor, elija el idioma que desea mostrar.","{FFFFFF}English","{FFFFFF}Espaсol");
    
    return 
1;

can u explaint to me what can i do and where i have to place the code, thanks in advance
Reply
#2

Quote:
Originally Posted by Jaua10
Посмотреть сообщение
Alrigh and now how can i do if any player press the "esc" key,"shift"key and "enter" key the server kicks you with a send u a message?

for example now i got when player enter in server ask you before registering in what lenguage u want to see the game mode,if player select english this will show u a dialog like "hello (name of the character) please put below the password u want, if player select spanish this will showu a dialog like hola (nombre del jugador) por favor escribe tu contraeсa abajo, and if player press "esc" key and "enter" key the server will kicks u too.

for the moment i got this:

PHP код:
public OnPlayerConnect(playerid)
{
    
ShowPlayerDialog(playeridLenguageDIALOG_STYLE_MSGBOX"                                     {FFFFFF}Welcome","\n{FFFFFF}\tPlease, choose a language you would like to display.\n\n\tPor favor, elija el idioma que desea mostrar.","{FFFFFF}English","{FFFFFF}Espaсol");
    
    return 
1;

can u explaint to me what can i do and where i have to place the code, thanks in advance
#define DIALOG_LENGUAGE 4939 // This 4939 number of dialog.

PHP код:
ShowPlayerDialog(playeridDIALOG_LENGUAGE DIALOG_STYLE_MSGBOX"Choose Your langague""YPlease, choose a language you would like to display.\n\n\tPor favor, elija el idioma que desea mostrar.","English""Espaсol"); 
Try this.
Reply
#3

i got this and i dot have errors:

PHP код:
public OnPlayerConnect(playerid)
{
    
ShowPlayerDialog(playeridDIALOG_LENGUAGEDIALOG_STYLE_MSGBOX"                                     {0092FF}Welcome","\n{FFFFFF}\tPlease, choose a language you would like to display.\n\n\tPor favor, elija el idioma que desea visualizar.","{FFFFFF}English","{FFFFFF}Espaсol");
    return 
1;

now i want to know how can i do to if the player press esc key in that textdraw, i want to kicks him, and when player picks the lneguage boton check if the account is registered or not, and launch the respective textdraw to the selected language, can u help me with that? or explain to me how can i do. thanks in advance
Reply
#4

anyone can help me please?
Reply
#5

Add this at the top of your script:
PHP код:
#define logindialog 1010 
And also change OnPlayerConnect like this:
PHP код:
public OnPlayerConnect(playerid)
{
    
ShowPlayerDialog(playeridlogindialogDIALOG_STYLE_INPUT"{FFFFFF}Login Kon Kooni","{ffffff}Do {ff0000}Login! {ffffff}Idiot","Login","Close");   
    return 
1;

When a player have a dialog , and he press ESC , the response value of the dialog in OnDialogResponse will be 0 , so you can detect it:
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == logindialog)
    {
        if(!
response)return Kick(playerid);
        
//
        
..... 
    }

* dont forget rep , (i think) i explaned easy as possible , you should do what i said and test , then youll catch it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)