El cуdigo no funciona correctamente.
#1

Estoy haciendo un sistema de idiomas pero tengo un pequeсo problema.
Cuando usar el comando y estas solo conociendo dicho idioma sale bien pero si hay otra persona cerca y no conoce el idioma a ti te sale idioma desconocido y a el el texto...
їQue falla ?.

pawn Код:
CMD:ejemplo(playerid, params[])
{
    if(PlayerInfo[playerid][pIdiomas][4] == 0)  return SendClientMessage(playerid, Color_Error, "{33CCFF}[ERROR]{FFFFFF} Tu no sabes este idioma.");
    if(sscanf(params,"s[128]",params[0]))       return SendClientMessage(playerid, Color_Info, "[USO] '/ejemplo' [Texto]");
    MandarMensaje(playerid, params[0], 4);
    return 1;
}
pawn Код:
funcion MandarMensaje(Jugador, Texto[], Idioma)
{
    new string[128];
    new string2[128];
    new Float:x, Float:y, Float:z;
    GetPlayerPos(Jugador,x,y,z);
    new Idioma2[10];
    switch(Idioma)
    {
        case 1: Idioma2 = "alemбn";
        case 2: Idioma2 = "бrabe";
        case 3: Idioma2 = "chino";
        case 4: Idioma2 = "espaсol";
        case 5: Idioma2 = "francйs";
        case 6: Idioma2 = "italiano";
        case 7: Idioma2 = "japonйs";
        case 8: Idioma2 = "portuguйs";
        case 9: Idioma2 = "ruso";
    }
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerToPoint(20,i, x, y, z))
            //if(JugadorEnArea(20, i, x, y, z))
            {
                if(PlayerInfo[i][pIdiomas][Idioma] == 1)
                {
                    if(strlen(Texto) > 75)
                    {
                        format(string2,256," ... %s ))",Texto[75]);
                        strdel(Texto,75,strlen(Texto));
                        format(string, sizeof(string), "%s dice: [%s] %s", NombreEx(Jugador), Idioma2, Texto);
                        ProxDetector(20.0, i, string,OOC1,OOC2,OOC3,OOC4,OOC5);
                        ProxDetector(20.0, i, string2,OOC1,OOC2,OOC3,OOC4,OOC5);
                        return 1;
                    }
                    else if(strlen(Texto) <= 75)
                    {
                        format(string, sizeof(string), "%s dice: [%s] %s", NombreEx(Jugador), Idioma2, Texto);
                        ProxDetector(20.0, i, string,OOC1,OOC2,OOC3,OOC4,OOC5);
                        return 1;
                    }
                }
                else
                {
                    format(string, sizeof(string), "%s dice: [Lenguaje Desconocido]", NombreEx(Jugador));
                    ProxDetector(20.0, i, string,OOC1,OOC2,OOC3,OOC4,OOC5);
                    return 1;
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)