Mit sampctl installieren
sampctl package install imshooter/SSI
Führe das in deinem Projektordner aus. sampctl lädt das Paket und alles herunter, wovon es abhängt.
Fügt seine Include-Dateien samt der Bibliotheken, von denen es abhängt, dem Pawn-Compiler in deinem Browser hinzu, bereit zum Einbinden in ein Skript.
Hängt von 2 Paketen ab
- openmultiplayer/omp-stdlib★ 53
- illidans4/pawnplusnicht in diesem Verzeichnis
README.md
SSI
[!NOTE] Experimental version, already running in production. Made with Claude Opus 5.5.
SSI is a set of Pawn libraries for open.mp, built the way YSI is: collections, iterators, hooks, inline functions, commands, groups and more. Each library is one include that works on its own, and the libraries talk to each other through events, so one can answer another without depending on it.
Installation
Simply install to your project:
sampctl package install imshooter/SSI
Or copy the SSI, SSI_Extra, SSI_Player, SSI_Vehicle and SSI_World folders into the include folder of your compiler, such as qawno/include.
Include in your code and begin using the library:
#include <SSI\collection>
A file that declares hooks includes SSI\hooks after every other include. See Installation for the requirements of each library.
Libraries
SSI
| Library | Description |
|---|---|
| amx | Access to the memory of the script beyond its data, for the libraries that read or write code at run time: the code as the server relocated it, and the header with its table of publics. |
| bits | Sets of bits, as y_bit keeps them: one bit for each id up to a size, 32 to a cell. |
| collection | Collections: the structures of these libraries under one name, as y_iterate keeps every iterator under Iterator:. |
| command | Commands, as Pawn.CMD and y_commands keep them: a function for each command, found by its name when a player types it. |
| dictionary | Dictionaries hold a value for each key. |
| extra | Extra data: values kept on the ids of something else, with a row of cells for each id and a column for each name. |
| group | Groups of players, as y_groups keeps them: a name, its members and what they may do. |
| hooks | Hooks, as in y_hooks: any number of functions for one callback, and hooks that replace a native or a function. |
| inline | Inline functions: a function written inside another, that reads and changes the arguments of the outer function and the locals it had where the inline is written, and can be called after the outer function returned, as by a timer. |
| iterator | The ids the server hands out, in collections this script walks with foreach, as y_foreach keeps its iterators. |
| queue | Queues hand out the rows of an array and take them back first in, first out. |
| schedule | Schedules hold a time for each id. |
| string | Strings changed in place and compared, beyond the natives of open.mp. |
| task | Functions that run on their own every so many milliseconds, as the tasks of y_timers. |
| test | Tests, as in y_testing: functions declared with test that the script runs one after another when it starts, with checks that print what failed and where. |
| unique | Unique names: every #include <SSI\unique> moves on to a new suffix of two characters, and SSI_UNIQUE<prefix...suffix> writes the current one where the ... is. |
| va | Variable arguments: ___(n) passes on the arguments a function got, from its nth on, anywhere among the arguments of a call, as y_va's ___. |
| version | The version shared by the SSI libraries and their startup banner. |
SSI_Extra
| Library | Description |
|---|---|
| inline-argon2 | Hashing and checking passwords with Argon2id through the async_crypto plugin, answered by an inline. |
| inline-bcrypt | Hashing and checking passwords with bcrypt, answered by an inline. |
| inline-dialog | Dialogs answered by an inline. |
| inline-mysql | Queries of the mysql component answered by an inline. |
| inline-object | Dynamic objects that call an inline when they finish moving, while a player edits them, or when a player selects one. |
| inline-pg | Queries of the omp-postgresql component answered by an inline, with every value sent apart from the query, so nothing is ever escaped. |
| inline-timers | Timers that call an inline. |
SSI_Player
| Library | Description |
|---|---|
| animation-preload | Animation libraries loaded ahead. |
| fps | Frames per second of each player's game. |
SSI_Vehicle
| Library | Description |
|---|---|
| colour | The 128 paint colours of the game, from carcols.dat, as RGBA for drawing a swatch of them. |
| components | The tuning parts of the game: their type, name, price, shop and pair, and which vehicle models take each one. |
| forklift | Crates a forklift lifts, carries and stacks. |
| freight | Freight that rides in the back of a vehicle, each piece in a slot of a grid set for that vehicle. |
| math | The geometry of a vehicle in the world: its speed, whether it lies on its roof, and where a point of its body, its bonnet, boot or a wheel is as it leans and turns. |
| model | Name, category and flags of every vehicle model, read by model id. |
| neon | Neon under a vehicle: two tubes of a colour along its sides, or one down the middle of a model narrower than VEHICLE_NEON_NARROW, such as a motorbike. |
| objective | Marks the vehicle a player was sent to with the yellow arrow and a radar blip. |
| parts | The parts of a vehicle one at a time: some parameters, a door, window, tyre, lamp or panel is set while the others keep what the game has. |
| speed-camera | Speed cameras: a pole by the road and a sphere of streamer area around it. |
SSI_World
| Library | Description |
|---|---|
| map-file | Loads a map file kept in scriptfiles, so a map is changed without touching the gamemode. |
| zone | The named zones of the map of San Andreas, the ones the story mode writes at the corner of the screen. |
Documentation
The wiki has a page for each library, with a quick start and every function, macro and event it declares. Each folder also has a .md file next to each include that links to its page.
Testing
The tests folder holds a game mode for each library that has tests, written with SSI\test. Compile one with the root of this repository and the open.mp includes in the include path, then run it on a server that allows at least one bot and loads the plugins the library needs:
pawncc tests/bits.pwn -i. -i<open.mp includes>
The test prints every failed check and a summary, then closes the server.
License
SSI is released under the MIT License, apart from SSI_Vehicle\model. Its model data comes from y_vehicledata of YSI, so that file stays under the Mozilla Public License 1.1, with the notice of YSI at its top.
Thanks to
- @Y-Less for YSI, the model for the layout of this repository and for many of its interfaces, and for the vehicle data of y_vehicledata.
- @IllidanS4 for PawnPlus, which
SSI\iteratoruses to follow vehicles and actors. - @Southclaws for samp-object-loader, the idea
SSI_World\map-filefollows.
Diese Seite wird aus dem erstellt, was GitHub über das Repository veröffentlicht. samp.directory hostet den Code nicht. Ein Problem mit diesem Eintrag melden