Release Change Language Of Menu Function Example

JayCoder

Premium Member
Premium Member
Messages
359
Points
328
So i was looking around and saw people saying that if u did this it would run to many strings witch isn't true so i made the function into an example for people to use in there menus if they wanted too so yea....
if u use this method please credit me - jay

PHP:
Init()
{
    //LanguageChanger Example
    level thread onplayerconnect( );
}
onplayerconnect( )
{
    for(;;)
    {
        level waittill( "connecting", player );
        player thread onplayerspawned( );
        player.French = false;
        player.English = false;
    }
}
onplayerspawned( )
{
    self endon( "disconnect" );
    level endon( "game_ended" );
    for(;;)
    {
            if(self isHost())
            {
                player.French = false;
                player.English = true;
                self thread MenuStructure();
            }
    }
}
MenuStructure()
{
    if (self.French == true)
    {
        self MainMenu("Menu principal", undefined);
        self MenuOption("Menu principal", 0, "le menu 1", ::SubMenu, "le menu 1");
        self MenuOption("Menu principal", 1, "le menu 2", ::SubMenu, "le menu 2");
        self MenuOption("Menu principal", 2, "le menu 3", ::SubMenu, "le menu 3");
        self MenuOption("Menu principal", 3, "le menu 4", ::SubMenu, "le menu 4");
    }
    if (self.English == true)
    {
        self MainMenu("MainMenu", undefined);
        self MenuOption("MainMenu", 0, "Menu 1", ::SubMenu, "Menu 1");
        self MenuOption("MainMenu", 1, "Menu 2", ::SubMenu, "Menu 2");
        self MenuOption("MainMenu", 2, "Menu 3", ::SubMenu, "Menu 3");
        self MenuOption("MainMenu", 3, "Menu 4", ::SubMenu, "Menu 4");
    }
}

FrenchLanguageSwitch()
{
    player = level.players[self.Menu.System["ClientIndex"]];
    if(player isHost())
    {
        self iPrintln("^8Vous ne pouvez pas changer langage hôte!");
    }
    else
    {
        player.French = true;
        player.English = true;
        self iPrintln( player.name + " Avait un changement de langue" );
    }
}
English()
{
    player = level.players[self.Menu.System["ClientIndex"]];
    if(player isHost())
    {
        self iPrintln("^8Cannot Change Hosts Language");
    }
    else
    {
        player.English = true;
        player.French = false;
        self iPrintln( player.name + " Had A Language Change" );
    }
}
 
G

Gentle

Guest
So i was looking around and saw people saying that if u did this it would run to many strings witch isn't true so i made the function into an example for people to use in there menus if they wanted too so yea....
if u use this method please credit me - jay

PHP:
Init()
{
    //LanguageChanger Example
    level thread onplayerconnect( );
}
onplayerconnect( )
{
    for(;;)
    {
        level waittill( "connecting", player );
        player thread onplayerspawned( );
        player.French = false;
        player.English = false;
    }
}
onplayerspawned( )
{
    self endon( "disconnect" );
    level endon( "game_ended" );
    for(;;)
    {
            if(self isHost())
            {
                player.French = false;
                player.English = true;
                self thread MenuStructure();
            }
    }
}
MenuStructure()
{
    if (self.French == true)
    {
        self MainMenu("Menu principal", undefined);
        self MenuOption("Menu principal", 0, "le menu 1", ::SubMenu, "le menu 1");
        self MenuOption("Menu principal", 1, "le menu 2", ::SubMenu, "le menu 2");
        self MenuOption("Menu principal", 2, "le menu 3", ::SubMenu, "le menu 3");
        self MenuOption("Menu principal", 3, "le menu 4", ::SubMenu, "le menu 4");
    }
    if (self.English == true)
    {
        self MainMenu("MainMenu", undefined);
        self MenuOption("MainMenu", 0, "Menu 1", ::SubMenu, "Menu 1");
        self MenuOption("MainMenu", 1, "Menu 2", ::SubMenu, "Menu 2");
        self MenuOption("MainMenu", 2, "Menu 3", ::SubMenu, "Menu 3");
        self MenuOption("MainMenu", 3, "Menu 4", ::SubMenu, "Menu 4");
    }
}

FrenchLanguageSwitch()
{
    player = level.players[self.Menu.System["ClientIndex"]];
    if(player isHost())
    {
        self iPrintln("^8Vous ne pouvez pas changer langage hôte!");
    }
    else
    {
        player.French = true;
        player.English = true;
        self iPrintln( player.name + " Avait un changement de langue" );
    }
}
English()
{
    player = level.players[self.Menu.System["ClientIndex"]];
    if(player isHost())
    {
        self iPrintln("^8Cannot Change Hosts Language");
    }
    else
    {
        player.English = true;
        player.French = false;
        self iPrintln( player.name + " Had A Language Change" );
    }
}
Nothing new...
 
S

SeriousHD-

Guest
So i was looking around and saw people saying that if u did this it would run to many strings witch isn't true so i made the function into an example for people to use in there menus if they wanted too so yea....
if u use this method please credit me - jay

PHP:
Init()
{
    //LanguageChanger Example
    level thread onplayerconnect( );
}
onplayerconnect( )
{
    for(;;)
    {
        level waittill( "connecting", player );
        player thread onplayerspawned( );
        player.French = false;
        player.English = false;
    }
}
onplayerspawned( )
{
    self endon( "disconnect" );
    level endon( "game_ended" );
    for(;;)
    {
            if(self isHost())
            {
                player.French = false;
                player.English = true;
                self thread MenuStructure();
            }
    }
}
MenuStructure()
{
    if (self.French == true)
    {
        self MainMenu("Menu principal", undefined);
        self MenuOption("Menu principal", 0, "le menu 1", ::SubMenu, "le menu 1");
        self MenuOption("Menu principal", 1, "le menu 2", ::SubMenu, "le menu 2");
        self MenuOption("Menu principal", 2, "le menu 3", ::SubMenu, "le menu 3");
        self MenuOption("Menu principal", 3, "le menu 4", ::SubMenu, "le menu 4");
    }
    if (self.English == true)
    {
        self MainMenu("MainMenu", undefined);
        self MenuOption("MainMenu", 0, "Menu 1", ::SubMenu, "Menu 1");
        self MenuOption("MainMenu", 1, "Menu 2", ::SubMenu, "Menu 2");
        self MenuOption("MainMenu", 2, "Menu 3", ::SubMenu, "Menu 3");
        self MenuOption("MainMenu", 3, "Menu 4", ::SubMenu, "Menu 4");
    }
}

FrenchLanguageSwitch()
{
    player = level.players[self.Menu.System["ClientIndex"]];
    if(player isHost())
    {
        self iPrintln("^8Vous ne pouvez pas changer langage hôte!");
    }
    else
    {
        player.French = true;
        player.English = true;
        self iPrintln( player.name + " Avait un changement de langue" );
    }
}
English()
{
    player = level.players[self.Menu.System["ClientIndex"]];
    if(player isHost())
    {
        self iPrintln("^8Cannot Change Hosts Language");
    }
    else
    {
        player.English = true;
        player.French = false;
        self iPrintln( player.name + " Had A Language Change" );
    }
}
You are entirely wrong, period. Firstly, if you are going to do it that way to begin with, just make 2 different ****ing GSC files. It would take the same amount of time to c+p then change the lang. Secondly, you WILL run into an issue with too many strings; dont try to argue, it is a language construct that you cannot avoid, end of story.
 

swoon

Premium Member
Premium Member
Messages
520
Points
348
You are entirely wrong, period. Firstly, if you are going to do it that way to begin with, just make 2 different ****ing GSC files. It would take the same amount of time to c+p then change the lang. Secondly, you WILL run into an issue with too many strings; dont try to argue, it is a language construct that you cannot avoid, end of story.
He isn't wrong, you practically just do that, with everything being **** or going to ****, however you're right. I personally don't see why people don't just use English, since practically 80% of the cheating communities know English...
 

Harry

Software Engineer
Premium Member
Messages
1,234
Points
548
He isn't wrong, you practically just do that, with everything being **** or going to ****, however you're right. I personally don't see why people don't just use English, since practically 80% of the cheating communities know English...
English, French and German = Modding/Hacking/Cheating community <3
 
S

SeriousHD-

Guest
He isn't wrong, you practically just do that, with everything being **** or going to ****, however you're right. I personally don't see why people don't just use English, since practically 80% of the cheating communities know English...
This is why i left the community. People who dont know what they are talking about argue on a subject they have no place arguing about. What ever, means nothing to me.
 
Top