#game-state #cs-go #config-file #builder #integration #installer #payload

csgo-gsi-builder

Build CSGO Game State Integration config files

2 releases

0.1.1 Jan 6, 2023
0.1.0 Dec 16, 2022

#486 in Configuration

MPL-2.0 license

16KB
191 lines

CSGO Game State Integration builder

CSGO Game State Integration configuration file builder and installer.

Docs

Documentation is available here.

Exemples

You can use one of the ready made components:

use csgo_gsi_builder::{config::Config, Builder, Components};

fn main() {
    let mut config_builder = Builder::with_config(Config {
        name: String::from("my_gsi_config_file"),
        data: Components::ALL.into(),
        ..Default::default()
    });
    config_builder
        .build()
        .install("C:\\Counter-Strike Global Offensive\\csgo\\cfg")
        .unwrap();
}

Or create your own set of components:

use csgo_gsi_builder::{
    config::{Config, Data},
    Builder, Components,
};

fn main() {
    let components: &[Components] = &[Components::Provider, Components::PlayerId];
    let mut config_builder = Builder::with_config(Config {
        name: String::from("my_gsi_config_file"),
        data: Data::from(components),
        ..Default::default()
    });
    config_builder
        .build()
        .install("C:\\Counter-Strike Global Offensive\\csgo\\cfg")
        .unwrap();
}

auto-install support

You can enable the auto_install feature to install automatically the config into CSGO's cfg folder:

use csgo_gsi_builder::{config::Config, Builder, Components};

fn main() {
    let mut config_builder = Builder::with_config(Config {
        name: String::from("my_gsi_config_file"),
        data: Components::ALL.into(),
        ..Default::default()
    });
    config_builder.build().auto_install().unwrap();
}

Server and Payload

Check out csgo-gsi-payload if you want an example of how to create and use a rust server to get payloads with auto-completion.

Dependencies

~1–12MB
~106K SLoC