06.08.2018, 23:26
I'm making a GM from 0 roleplay multilingual and i decide to start with a dialog asking to player in what lenguage want to display the server so i put this on the top of the script
i have this in OnPlayerConnect:
now im trying to add when player press english or spanish botton this will check if the player is registered on server or not and will show you a register or a login dialog depends of the player account status and i got this in OnDialogResponse:
when i try to compile shows me this:
line 284:
line 286:
line 290:
any of you can give me some advice to make what i want and try to run this? thanks in advance
PHP код:
#define DIALOG_LANGUAGE 0
#define DIALOG_PASSWORD 1
PHP код:
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid, DIALOG_LANGUAGE, DIALOG_STYLE_MSGBOX, " {0092FF}Welcome","\n {FFFFFF}Please, choose a language you would like to display.\n\n Por favor, elija el idioma en el que desea visualizar.","{FFFFFF}English","{FFFFFF}Espaсol");
return 1;
}
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_LANGUAGE)
{
if(response)
{
English[playerid] = 1;
Spanish[playerid] = 0;
SendClientMessage(playerid, COLOR_SUCCESS, "Your language has been set to English.");
}
else
{
English[playerid] = 0;
Spanish[playerid] = 1;
SendClientMessage(playerid, COLOR_SUCCESS, "Su idioma ha sido configurado a Espaсol.");
}
return 1;
}
return 1;
}
if(dialogid == DIALOG_LANGUAGE)
{
if(response == 1)
{
SendClientMessage(playerid, DIALOG_PASSWORD, DIALOG_STYLE_PASSWORD, "{0092FF}Register Panel", "\n{FFFFFF}Please put a password below:", "Register", "Cancel");
}
else
{
SendClientMessage(playerid, DIALOG_PASSWORD, DIALOG_STYLE_PASSWORD, "{0092FF}Panel de Registro", "\n{FFFFFF}pon tu contraseсa abajo", "Registrar", "Cancelar");
}
}
Код:
C:\Users\Jaua\Desktop\Clean Server\gamemodes\Nuevo.pwn(284) : error 010: invalid function or declaration C:\Users\Jaua\Desktop\Clean Server\gamemodes\Nuevo.pwn(286) : error 010: invalid function or declaration C:\Users\Jaua\Desktop\Clean Server\gamemodes\Nuevo.pwn(290) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.
PHP код:
if(dialogid == DIALOG_LANGUAGE)
PHP код:
if(response == 1)
PHP код:
else