-
Notifications
You must be signed in to change notification settings - Fork 92
Home
samp-incognito edited this page Apr 13, 2021
·
63 revisions
Language: English, Russian
- Create a directory called
plugins
inside of the server directory if one does not already exist. - Place the plugin file (
streamer.dll
orstreamer.so
) inside of the directory that was just created. - Add the following line to
server.cfg
so that the plugin will load the next time the server starts:-
plugins streamer.dll
(Windows) -
plugins streamer.so
(Linux)
-
- On Windows, add
streamer.inc
to thepawno\include
folder. - Add the following line to any of the scripts the server is running:
#include <streamer>
The Windows version requires the Microsoft Visual C++ 2015 Redistributable Package (x86).
- Download and install the following:
- CMake (3.0+)
- C++ Compiler
- Optionally, download and install the following (or, as explained below, download the latest versions automatically from GitHub):
- Clone the repository:
git clone https://github.com/samp-incognito/samp-streamer-plugin.git
- Navigate to the cloned respository (
cd samp-streamer-plugin
). - Update the submodules:
git submodule update --init --recursive
- Note that Boost will take quite a while to initially download. If Boost is already installed elsewhere, this process can be skipped by entering the following command instead:
git submodule update --init --recursive . ":(exclude)lib/boost"
- Note that Boost will take quite a while to initially download. If Boost is already installed elsewhere, this process can be skipped by entering the following command instead:
- Proceed to build the Boost.System library if Boost is not already installed somewhere else. Otherwise, skip the next section.
- Navigate to the Boost directory (
cd lib/boost
). - Enter
./bootstrap.sh
if on Linux, orbootstrap
if on Windows, to prepare the Boost.Build system. - Enter
./b2 --with-system
if on Linux, orb2 --with-system
if on Windows, to build the Boost.System library. - Navigate back to the repository (
cd ../..
) when done.
For more information, read the Getting Started guide on the Boost website.
- Enter the following commands:
If on Windows:
mkdir build && cd build
If on Linux:cmake .. cmake --build . --config Release --target streamer_unity
cmake .. -DCMAKE_BUILD_TYPE=Release make streamer_unity
- Note that CMake will attempt to find Boost and Eigen automatically. If one or both cannot be located, then the correct
path(s) will need to be specified manually by passing the
BOOST_ROOT
and/orEIGEN3_INCLUDE_DIR
option(s) to CMake prior to building. For example, entering this command (rather than justcmake ..
) would provide both of these paths to CMake:cmake .. -DBOOST_ROOT=/path/to/boost -DEIGEN3_INCLUDE_DIR=/path/to/eigen
- Note that CMake will attempt to find Boost and Eigen automatically. If one or both cannot be located, then the correct
path(s) will need to be specified manually by passing the
- Navigate to the
bin
directory (cd bin
). Thestreamer.dll
orstreamer.so
file should be placed here when the plugin has finished compiling.
sampgdk Support
samp-streamer-plugin-sampgdk-invoke can be used to invoke this plugin's natives as well as hook its callbacks from within another plugin that uses sampgdk.