Release Change Language Of Menu Function Example

Discussion in 'Call of Duty: Black Ops 2 Scripts' started by JayCoder, Sep 9, 2016.

  1. JayCoder

    JayCoder Well-Known Member

    322
    138
    253
    Credits:
    1,763
    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 iPrintlnplayer.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 iPrintlnplayer.name " Had A Language Change" );
        }
    }    
     
    Zlink033, xTiibo, Tusta and 1 other person like this.
  2. Tusta

    Tusta Head Member Donator

    20
    11
    14
    Credits:
    3,242
    Nice Post :smile:
     
  3. JayCoder

    JayCoder Well-Known Member

    322
    138
    253
    Credits:
    1,763
    yup thank's
     
  4. Tusta

    Tusta Head Member Donator

    20
    11
    14
    Credits:
    3,242
    please :smile:
     
  5. Gentle

    Gentle Guest

    Credits:
    0
    Nothing new...
     
    The Dark Side and DF_AUS like this.
  6. JayCoder

    JayCoder Well-Known Member

    322
    138
    253
    Credits:
    1,763
    well aok then dick i don't like uuuu leave me alone - Hater = "u"
    u define hitler
     
  7. Gentle

    Gentle Guest

    Credits:
    0
    k
     
  8. Gentle

    Gentle Guest

    Credits:
    0
    I do define Hitler
    Please login or register to view links or downloads!
     
    swoon likes this.
  9. SeriousHD-

    SeriousHD- Guest

    Credits:
    0
    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.
     
  10. swoon

    swoon Trial Moderator Staff Member Premium Member

    480
    358
    348
    Credits:
    3,123
    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...
     
    THC Da God likes this.
  11. Harry

    Harry Software Engineer Premium Member

    1,198
    973
    398
    Credits:
    5,916
    English, French and German = Modding/Hacking/Cheating community <3
     
  12. iplaynothing

    iplaynothing Well-Known Member

    78
    39
    218
    Credits:
    130
    you forgot retard that language is used alot by liam mostly :smile:
     
    Harry and swoon like this.
  13. SeriousHD-

    SeriousHD- Guest

    Credits:
    0
    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.
     
  14. Harry

    Harry Software Engineer Premium Member

    1,198
    973
    398
    Credits:
    5,916
    [​IMG]

    You're still here but?!
     
  15. DF_AUS

    DF_AUS Head Moderator Staff Member Head Staff Team Donator

    557
    842
    303
    Credits:
    5,456
    My Hero :smile:
     
    The Dark Side likes this.
  16. JayCoder

    JayCoder Well-Known Member

    322
    138
    253
    Credits:
    1,763
    -_- h8 = :disappointed: but AOK In My Book
     
  17. DF_AUS

    DF_AUS Head Moderator Staff Member Head Staff Team Donator

    557
    842
    303
    Credits:
    5,456
    I
    I ain't showing hate....if you wanna post content / or speak it just do so,i couldn't careless to be honest,doesn't effect me mate :smile:
     
    Syndicate likes this.
  18. JayCoder

    JayCoder Well-Known Member

    322
    138
    253
    Credits:
    1,763
    I thot u were sorry
     
  19. Lucas123456789

    Lucas123456789 Known Member

    1
    0
    101
    Credits:
    24
    It doesn't work for me :/
     
  20. candy

    candy G59 Terrorist Donator

    1,242
    813
    398
    Credits:
    6,794
    Don't even try, it isn't a good idea.
    Either have your menu one language or make two separate menus with both languages.
     
    The Dark Side likes this.

Share This Page