SAMP CEF

This project embeds CEF into SA:MP expanding abilities to express yourself with beauty in-game interfaces using HTML / CSS / JavaScript.

It is a FRAMEWORK (or SDK), not something that you download and use. To be able to create you should have some webdev basics (JS / HTML / CSS).

What you can do

Crates

Download

Latest builds from the master branch are placed in the Actions.

Currently there is those OS:

And also all client-side parts (cef.asi, client.dll, renderer.exe).

Building

Dependencies

Notes ...

If you get a linker error, you should change hard-coded links in the source code

Running Rust

and now

rustup toolchain install nightly-2022-11-06-i686-pc-windows-msvc
cargo build --release

Building the open.mp component

Use the helper script from the repository root:

scripts/build-openmp-component.sh --openmp-root /path/to/open.mp
scripts/build-openmp-component.sh --openmp-root /path/to/open.mp --server-root /path/to/omp-server

It builds openmp-component and installs it into <server>/components when --server-root is provided. More details are in docs/build.md and openmp-component/README.md.

Cross-compiling the Windows client (macOS/Linux)

Use scripts/build-client-win32.sh to build client, renderer, and loader for i686-pc-windows-msvc on non-Windows hosts. It relies on cargo-xwin (cargo install cargo-xwin --locked), 7z for extracting the DirectX SDK, and downloads libcef.lib if CEF_PATH is not set. The script can also download/extract the DirectX SDK if DX_SDK is not set.

also the client plugin can be built using OpenAL for sound (rodio by default). to do that compile the client without default features. for example:

cargo +nightly-i686 build --release --package client --no-default-features

to make it work you should place openal.dll as sound.dll in the cef folder. I do not remember what version is used exactly ... but I have it on the release page.

to build specific part you can add --package <NAME>

for example if you will try to build ALL crates on linux, you will get an error. so, pass --package server to build only server on linux.

CEF version

Current versions of CEF and Chromium: 89.0.5+gc1f90d8+chromium-89.0.4389.40 release branch 4389

Date:             February 26, 2021

CEF Version:      89.0.5+gc1f90d8+chromium-89.0.4389.40
CEF URL:          https://bitbucket.org/chromiumembedded/cef.git
                  @c1f90d8c933dce163b74971707dbd79f00f18219

Chromium Version: 89.0.4389.40
Chromium URL:     https://chromium.googlesource.com/chromium/src.git
                  @2c3400a2b467aa3cf67b4942740db29e60feecb8

Docs

Video examples

BIG TODO: EXAMPLES

But it's similar to fivem or ragemp implementations.