SA-MP Forums Archive
Idiomas - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Idiomas (/showthread.php?tid=315809)



Idiomas - BlackLeopard - 04.02.2012

EDIT : Ya lo solucione,cierren plz


Respuesta: Idiomas - godoy32 - 04.02.2012

Colocar un servidor en dos idiomas es mucho trabajo. Pero si de verdad lo quieres hacer te voy a decir como lo hice yo.
Primero cree un comando para elegir el idioma:
pawn Код:
new Idioma[MAX_PLAYERS];
#define EIdioma2 1
COMMAND:cambiaridioma(playerid,params[])
{
    ShowPlayerDialog(playerid,EIdioma2,DIALOG_STYLE_MSGBOX,"Idioma","Porfavor seleciona tu idioma \n\n Please select your language","Espaсol","Ingles");
    return 1;
}
Ahora cuando responde al dialog
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == EIdioma2)
    {
        switch(response)
        {
            case 1:
            {
                SendClientMessage(playerid,0xFF7D00FF,"Has escogido el idioma espaсol. Para cambiarlo usa /cambiaridioma");
                Idioma[playerid]=1
            }
            case 0:
            {
                SendClientMessage(playerid,0xFF7D00FF,"You selected english. To change it use /cambiaridioma");
                Idioma[playerid]=2
            }
        }
    }
    return 1;
}
Ahora te voy a poner un comando ejemplo para que veas como funciona
pawn Код:
COMMAND:abike(playerid,params[])
{
    if(Informacion[playerid][Admin] >= 1)
    {
        if (!IsPlayerInAnyVehicle(playerid))
        {
            CarSpawner(playerid,522);
            if(Idioma[playerid]== 1) SendClientMessage(playerid,0xFFFF00,"|- Moto creada! -|");
            if(Idioma[playerid]== 2) SendClientMessage(playerid,0xFFFF00,"|- Bike created! -|");
            return 1;
        }
        else return SendClientMessage(playerid,0xFF0000,"Error: Ya tienes un auto");
    }
    else return 0;
}
Ahora como lo quieres hacer tu, serнa algo como esto
pawn Код:
public OnPlayerConnect(playerid)
{
    ShowPlayerDialog(playerid,EIdioma2,DIALOG_STYLE_MSGBOX,"Idioma","Porfavor seleciona tu idioma \n\n Please select your language","Espaсol","Ingles");
}
Espero que te aya ayudado


Re: Idiomas - BlackLeopard - 04.02.2012

Muchas gracias


Re: Idiomas - digman - 04.02.2012

Me Imagino Cuando Te Pesara el GM con todo eso jeje...

Creo que hay otras formas mas optimizables xD.