samp.directory
← Скрипты и библиотеки

bracesoftware/DETUtils-Old

:zap: ¤ Addition to the Pawn language features, SA:MP standard library package and Discord Connector plugin!

Библиотека★ 15обновлён авг. 2023 г.MPL-2.0Pawnsampctl
Открыть на GitHub

Установка через sampctl

sampctl package install bracesoftware/DETUtils-Old

Выполните в папке проекта. sampctl скачает пакет и его зависимости.

Зависит от 6 пакетов

README.md

Current library version: 2.0.7-R3

Hello scripter! Welcome to DEntisT's Utilities (or DETUtils for short) "read me" file. So, now, you may ask about - what's this? Well - in general, this addition to open.mp Standard Scripting package contains libraries that have in-game visible effects and libraries that contain new scripting features.

  • Below, you can find information about each library.
  • For better understanding of this, make sure you know Pawn and a_samp - read all the docs here...

Examples

Honestly, this package of libraries exists for show-off reasons, I made it for my own satisfication since I have a really big desire to code. You can still contribute and use it though. Example code:


Installation

  • Installation is simple, quick and easy - learn more here...

Documentation

Below is a list of all the libraries provided by the DETUtils package. They're all optional unless they're used internally, in that case you'll get a warning.

LibraryDescription
detutils.incEntry point from which everything is included.

Pawn/Coding Libraries (13)

Libraries whose contain the new language features.

LibraryDescription
d_vars.incA library which reserves up space for new variables you can dynamically allocate during run-time, which is really similar to malloc but can handle up to hundreds of variables, stacks and arrays of different types.
d_als.incNew ALS hooking system.
d_foreach.incNew foreach implementation.
d_tables.incExcel-like table management system.
d_profile.incProfile chunks of code and see how much does it take to execute it.
d_timers.incA replacement for SetTimer(Ex) which now adds both automatic and manual timers (automatic timers defer themself on the script initialization).
d_events.incA replacement for Call<Local/Remote>Function and forward/public which gives you more possibilities and automations, such as local and global functions (on file level), command events, property events and dialog events (extensions of DETUtils API itself).
d_fmargs.incA rewrite of y_va and Pawn sscanf implementation.
d_testing.incProvides fast and easy way of testing.
d_global.incA library which makes expressions possible on the global level - or in simple terms, code outside other functions.
d_ascii.incASCII character predefines.
d_core.incThe folder containing all the libraries used by the DETUtils system itself.
d_lambda.incProvides new small lambda functions.

SA:MP Libraries (10)

Libraries whose contain the new SA:MP functions and features.

LibraryDescription
d_permissions.incEdit player SA:MP server permissions.
d_commands.incCommand processor with a big amount of features.
d_properties.incCreate property entrances, with own and custom interiors.
d_visual.incGenerally smaller groups of random visual features.
d_anticheat.incAnti cheat system.
d_mapeditor.incIn-game map editor.
d_factions.incPlayer factions (groups of players) made easy.
d_dialog.incA replacement ShowPlayerDialog and OnDialogResponse containing even more callbacks and functions to manipulate dialogs.
d_server.incGenerally server-related functions.
d_races.incA racing system with many features.
d_editobject.incNew EditObject()/EditPlayerObject() system with many more features.

Discord API Libraries (1)

Libraries whose contain the new functions for Discord bot development - these are extensions to Discord Connector plugin and they require the plugin to work.

LibraryDescription
d_discordapi.incAddition to the Discord Connector plugin.

Storage Libraries (3)

Libraries whose provide storing (saving), loading and managing persistent data on your server.

LibraryDescription
d_filequeries.incSend file queries, save and load cache during runtime.
d_toml.incSave, load and manage TOML files.
d_yaml.incSave, load and manage YAML files.

Documentation contains some extra notes and tips.

Tests

  • I regularly make test scripts with all new features I added to the library to ensure everything is working as expected. If not, I write it down in to a test log.

Check out test script here:

  • Go to tests...

  • You can also run DETUtils test script directly from your includes, just use the definition below before including the libraries.

#define DETUTILS_TESTING_MODE

As I mentioned, DETUTILS_TESTING_MODE flag will enable the test script automatically.

Test artifacts

  • You can go to GitHub Actions page for this repository, select the latest workflow run from the list and download the sampctl auto-build artifact.

Filterscripts

  • If you're making a filterscript using the DETUtils includes, make sure to enable the DETUTILS_FILTERSCRIPT_MODE flag.
#define DETUTILS_FILTERSCRIPT_MODE
  • It'll also work if you just simply do:
#define FILTERSCRIPT

Limits

  • Everything has its limits, so does DETUtils - view them here...

Beta testing

  • Beta testing program is currently down since this project is far away from being done. Also, according to news - new open.mp is coming soon, so these libraries shall be updated regularly to keep up with the project.

Test log

  • Recently, I started test logging program in which I log every library issue I spotted during testing. You can check it here...

Versioning

  • Read more about DETUtils versioning system here...

More languages

  • English isn't the only language on the planet though, that's why I started language contribution program. I started it by making another library's core include called d_text.inc in which are all strings located. Your job as a language contributor is to simply translate it!

Check the file here...

Troubleshooting

If you're facing unusual problems, that aren't supposed to be here or were not happening ever before, or they magically appeared after the update - make sure you enable automatic debugging.

  • Automatic debugging literally sends debug messages whenever it needs to.
  • With this feature you can easily track problems and report them on Discord or try to troubleshoot them yourself.

To enable advanced debugging feature, use:

#define DETUTILS_DEBUG_MODE

To join Discord server, click this link!

NOTE: After you enabled advanced debugging, your console may be full with DETUtils debug messages - in that case, don't worry.

Compile-time issues

If you're facing issues with your code compilation after including the library, make sure you have updated Pawn Compiler and SA:MP Standard library package and libraries. Using them outdated can indeed cause issues while trying to implement newer libraries to your code.

  • You can get the latest version of SA:MP standard libraries here...

  • You can get the latest version of Pawn standard libraries here...

  • You can get the latest version of Pawn Compiler for SA:MP here...

DEntisT's Utilities

Legal:

  • Read the license here.

Other contributors:

  • No one yet.

Thanks to these people for:

  • aezzakmi (no GitHub account) - really productive testing
  • Y_Less & Zeex - fmargs #emit stuff, d_commands decorator concept
  • Zeex - ZCMD command processor concept
  • Y_Less - code parser, another amazing thing which you can get here
  • Kirima - command guesser, another cool thing you can get here
  • Zeex - AMX assembly

Contributions

  • Just fork the repository, apply your wanted changes and create a pull request!

codingdetutilsgta-salibrariespawnsa-mpscripting

Страница собрана из того, что GitHub публикует о репозитории. samp.directory не хранит этот код. Сообщить о проблеме с этой записью

bracesoftware/DETUtils-Old: Библиотека для SA-MP | samp.directory