Skip to content

pysamp/PySAMP-streamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 

Repository files navigation

PySAMP-streamer

Streamer plugin handler for PySAMP

Installation

  1. To install, you need to download the streamer plugin. After that you must put streamer.dll into your server folder (server/plugins).

  2. After that, download (or clone) the repository and put the pystreamer folder in your server folder.

git clone https://github.com/pysamp/PySAMP-streamer.git

Example

from pystreamer import register_callbacks
from pystreamer.dynamicobject import DynamicObject
from pysamp import on_gamemode_init

@on_gamemode_init
def on_ready():
    register_callbacks()
    global obj
    obj = DynamicObject.create(994, 1161.73767, -1741.43555, 13.06450, 0.0, 0.0, 0.0)

@DynamicObject.on_moved
def on_dynamic_object_moved(object: DynamicObject):
    ...

Important

Change the order in which plugins are loaded

# server.cfg
plugins streamer PySAMP

If you use open.mp

    "pawn": {
        "legacy_plugins": ["streamer", "PySAMP"],
        "main_scripts": [
            "empty"
        ]
    },

Otherwise, loading PySAMP before streamer leads to various bugs (double-triggering of callbacks, etc.)

Thanks to