Skip to content

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

License

Notifications You must be signed in to change notification settings

bracetm/DETUtils-Old

Repository files navigation

Welcome to the DETUtils Wiki

Addition to the Pawn language features, open.mp API and Discord Connector plugin.

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.

Library Description
detutils.inc Entry point from which everything is included.

Pawn/Coding Libraries (13)

Libraries whose contain the new language features.

Library Description
d_vars.inc A 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.inc New ALS hooking system.
d_foreach.inc New foreach implementation.
d_tables.inc Excel-like table management system.
d_profile.inc Profile chunks of code and see how much does it take to execute it.
d_timers.inc A replacement for SetTimer(Ex) which now adds both automatic and manual timers (automatic timers defer themself on the script initialization).
d_events.inc A 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.inc A rewrite of y_va and Pawn sscanf implementation.
d_testing.inc Provides fast and easy way of testing.
d_global.inc A library which makes expressions possible on the global level - or in simple terms, code outside other functions.
d_ascii.inc ASCII character predefines.
d_core.inc The folder containing all the libraries used by the DETUtils system itself.
d_lambda.inc Provides new small lambda functions.

SA:MP Libraries (10)

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

Library Description
d_permissions.inc Edit player SA:MP server permissions.
d_commands.inc Command processor with a big amount of features.
d_properties.inc Create property entrances, with own and custom interiors.
d_visual.inc Generally smaller groups of random visual features.
d_anticheat.inc Anti cheat system.
d_mapeditor.inc In-game map editor.
d_factions.inc Player factions (groups of players) made easy.
d_dialog.inc A replacement ShowPlayerDialog and OnDialogResponse containing even more callbacks and functions to manipulate dialogs.
d_server.inc Generally server-related functions.
d_races.inc A racing system with many features.
d_editobject.inc New 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.

Library Description
d_discordapi.inc Addition to the Discord Connector plugin.

Storage Libraries (3)

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

Library Description
d_filequeries.inc Send file queries, save and load cache during runtime.
d_toml.inc Save, load and manage TOML files.
d_yaml.inc Save, 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!

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published