77[ <img alt =" kofi " src =" https://img.shields.io/badge/kofi-sreyas-blue?style=for-the-badge&logo=kofi " height =" 20 " >] ( https://ko-fi.com/sreyas )
88
99
10- omprs is a tool to develop open.mp gamemodes in Rust.
10+ omprs is a tool to develop open.mp gamemodes and components in Rust.
1111
1212## Structure
1313| ** Crate** | ** Description** |
1414| -----| ----------------------------------------------------------------------|
1515| ` omp-codegen ` | Generates exported functions and FFI related code automatically|
1616| ` omp-sdk ` | GDK crate, that does the core functionality like loading function address, executing, providing necessary types etc|
17- |` omp ` | The main crate the is supposed to be used by the players , neatly exposing all of the functionalities and APIs.
17+ |` omp ` | The main crate the is supposed to be used by the component or server developers , neatly exposing all of the functionalities and APIs.
1818
1919
2020## Writing my first gamemode in Rust
21- 1 . Download the omprs component from [ here] ( https://github.com/Sreyas-Sreelal/omprs/releases )
22- 2 . Place the ` Rust.dll ` or ` Rust.so ` component in ` components ` folder
23- 3 . Create a new rust project
21+ 1 . Download and install latest open.mp C-API component from [ here] ( https://github.com/openmultiplayer/omp-capi/releases )
22+ 2 . Create a new rust project
2423 ` cargo new mygm --lib `
25- 4 . Add ` omp ` to dependecies
24+ 3 . Add ` omp ` to dependecies
2625 ` cargo add omp `
27- 5 . Add this to your ` Cargo.toml `
26+ 4 . Add this to your ` Cargo.toml `
2827 ``` toml
2928 [lib ]
3029 crate-type = [" cdylib" ]
3130 ```
32- 6 . Write a basic code like this
31+ 5 . Write a basic code like this
3332 ```Rust
3433 use omp::{events::Events, main, register, types::colour::Colour};
3534
@@ -46,17 +45,12 @@ omprs is a tool to develop open.mp gamemodes in Rust.
4645 register!(MyGM);
4746 }
4847 ```
49- 7 . Build the gamemode
48+ 6 . Build your gamemode or component
5049
5150 `cargo +stable-i686 build`
52- 8. Put the compile `mygm.dll` or `mygm.so` to `gamemodes` folder
53- 9. Goto `config.json` add following to it
54- ```json
55- "rust":{
56- "gamemode":"mygm"
57- }
58- ```
59- 10. Run your server
51+ 7. Put the compile `mygm.dll` or `mygm.so` to `components` folder
52+
53+ 8. Run your server
6054
6155
6256
0 commit comments