Results 1 to 10 of 13

Thread: [COD2] Random string hud

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    Alright, if you use libcod you can use use new makelocalizedstring function:
    PHP Code:
    // Find free localized string index
    index findFreeConfigStringIndex(1310256);

    // Set configstring
    setConfigString(indexlevel.mapcandidate[0]["mapname"]);

    // Your Hud Stuff
    level.votemap0 setText(makeLocalizedString(level.mapcandidate[0]["mapname"]));

    findFreeConfigStringIndex(startend)
    {
        for (
    start 1start endi++)
        {
            
    configstring getConfigString(i);
            if (!
    isDefined(configstring))
                return 
    i;
        }

        return 
    undefined;

    Just tested it, works quite nicely.

    Or you can use the old fashioned way and replace strings on a client (iznogod's settext wrapper)
    Last edited by voron00; 27th March 2017 at 16:14.
    sudo apt-get rekt

  2. The Following User Says Thank You to voron00 For This Useful Post:

    kung foo man (27th March 2017)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •