5 releases
0.2.1 | Sep 13, 2020 |
---|---|
0.2.0 | Sep 12, 2020 |
0.1.2 | Sep 12, 2020 |
0.1.1 | Sep 12, 2020 |
0.1.0 | Sep 4, 2020 |
#6 in #game-console
695KB
17K
SLoC
Rust SDK for BakkesMod plugins
Example
use bakkesmod::prelude::*;
use bakkesmod::wrappers::unreal::*;
use bakkesmod::{game, console};
#[plugin_init]
pub fn on_load() {
console::register_notifier("get_ball_location", Box::new(move |_: Vec<String>| {
let game = match bakkesmod::get_game_event_as_server() {
Some(g) => g,
None => {
log_console!("game is null!");
return;
}
};
match game.get_ball() {
Some(ball) => log_console!("{}", ball.get_location()),
None => log_console!("ball is NULL")
};
}));
}
View more examples in the examples directory.
Dependencies
~1.5MB
~35K SLoC