Crates.io | csgo-gsi-builder |
lib.rs | csgo-gsi-builder |
version | 0.1.1 |
source | src |
created_at | 2022-12-16 20:56:35.292875 |
updated_at | 2023-01-06 09:18:32.57335 |
description | Build CSGO Game State Integration config files |
homepage | |
repository | https://github.com/Aziks0/csgo-gsi-builder |
max_upload_size | |
id | 739237 |
size | 42,951 |
CSGO Game State Integration configuration file builder and installer.
Documentation is available here.
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();
}
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();
}
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.