Crates.io | csgo-gsi-payload |
lib.rs | csgo-gsi-payload |
version | 0.1.1 |
source | src |
created_at | 2023-01-06 08:39:47.184776 |
updated_at | 2023-01-06 08:53:58.147073 |
description | Data structures for CSGO Game State Integration |
homepage | |
repository | https://github.com/Aziks0/csgo-gsi-payload |
max_upload_size | |
id | 752159 |
size | 34,442 |
Data structures for CSGO Game State Integration payload.
Documentation is available here.
Using axum
:
use std::net::SocketAddr;
use axum::{extract::Json, routing::post, Router};
async fn root(Json(payload): Json<csgo_gsi_payload::Payload>) {
let steam_id_provider = match payload.provider {
Some(provider) => provider.steam_id,
None => String::from("unknown"),
};
println!("SteamID of the provider: {}", steam_id_provider);
}
#[tokio::main]
async fn main() {
let app = Router::new().route("/", post(root));
let address = SocketAddr::from(([127, 0, 0, 1], 3000));
axum::Server::bind(&address)
.serve(app.into_make_service())
.await
.unwrap();
}
Check out csgo-gsi-builder
if
you want to build game state integration cfg files.
It has not been tested in Danger Zone, nor Hostage Rescue modes.