Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
alt:V Rust Module
What is alt:V?
alt:V is a free third-party multiplayer modification for Grand Theft Auto: V. It allows you to play with your friends on dedicated servers with custom gamemodes with an ultimate experience.
The module allows you to write your own gamemode in Rust.
Setup
Before you start writing your own gamemode, setup an alt:V server following this tutorial:
To make the alt:V server compatible with rust, paste the rust-module into the modules/
folder and add this line to your server.cfg file:
modules: [ rust-module ]
If you want to use multiple modules e.g. the csharp-module or js-module, seperate them with a ,
:
modules: [ rust-module, csharp-module, js-module ]
Example
Create a rust lib project and add this line to your Cargo.toml file under [dependencies]:
= "0.2.0"
Alternatively, pull it from GitHub to obtain the latest version from develop:
= { = "https://github.com/DimaaIO/altv-rs" }
Then replace src/lib.rs with the following:
use ;
use ;
use *;
use State;
use Error;
;
We have several simple example projects included.
You can see the full list in the examples/
folder.
To compile any of the examples run:
$ cargo build
Now create a new folder for the resource: resource/example
and create a new file resource.cfg
with the following text:
type: rust,
main: libexample.so
To enable the resource, add a reference in the server.cfg file:
resources: [ example ]
Then copy the compiled lib from target/[debug/release]/libexample.so
to the example resource folder.