[Include] YSI 3.1
#1

Disclaimer: Whole YSI project was published under MPL 1.1 license

https://github.com/Misiur/YSI

Libraries

There are a range of libraries included in YSI, most described in their own topics, all included in the download at the end of this post. Those with no link below will hopefully get documentation soon. Some of the libraries are very low level programming, others are very high level extended SA:MP functionality. I've attempted to split the list up, but the divide is largely arbitrary.

Links marked as "Old" may have out of date information due to changed syntax etc, but could still be useful for getting an idea of how the library works.
  • Low Level
  • y_als - Slightly simplifies the use of the Advanced Library System.
  • y_amx - Low level AMX information access. Used by y_hooks, y_testing and y_timers to list public functions.
  • y_bintree - PAWN binary tree implementation.
  • y_bit - Bit arrays for PAWN - vastly reduces memory usage for true/false arrays.
  • y_cell - Some clever bit-level variable manipulations.
  • y_debug - Compile time macros for displaying, or not, debug information at run time.
  • y_files - A plugin with some useful file functions. Not included in the download below.
  • y_hooks - Allows you to hook any callback with no effort at all.
  • y_ini - This is the fastest ini file system around, designed to load entire files at once.
  • y_inline - Allows for the declaration of inline functions in PAWN.
  • y_iterate - foreach, but in YSI.
  • y_malloc - Allocate and free memory as required.
  • y_master - Code for the master system. See this topic and y_commands for more information.
  • y_php - Fast and efficient two-way communication with PHP. Requires shmop.
  • y_playerarray - Bit arrays optimised specifically for arrays of players.
  • y_playerset - Call functions passing groups, single players, arrays, or playerarrays as the "target" parameter.
  • y_remote - Wrappers for "CallRemoteFunction" and "CallLocalFunction".
  • y_scriptinit - Provides "OnScriptInit" for both gamemodes and filterscripts.
  • y_stringhash - Allows you to treat strings as numbers for things like "switch" statements.
  • y_testing - Allows for very simple unit testing production.
  • y_timers - Simplifies the creation of repeating timers, balancing them for optimal server performance. Also allows for the simple definition of functions to be called once after a delay.
  • y_utils - Random useful functions.
  • y_va - Variable argument functions such as va_printf and va_format.
  • y_writemem - WINDOWS ONLY! Write to arbitrary memory addresses in the server memory.
  • y_xml - XML file reading and writing.
  • High Level
  • y_areas - Manage zones on the map, with players entering and leaving.
  • y_classes - Allows for extra dynamic class selection screens, different users can have different skin options and you can add and remove classes dynamically.
  • y_colours - AKA y_colors. Defines a vast number of colours and provides both definition and string access to them.
  • y_commands - This is a commands system designed for managing hundreds of commands at once, unlike others which are only designed for small numbers of commands. It offers many improvements over other systems including the speed of ZCMD with dynamic command renaming, dynamic per-player permissions and dynamic /commands and /help abilities to list all commands and help on those commands.
  • y_dialog - Show dialogs to players with no worry about IDs and with inline functions available.
  • y_flooding - Restrict the number of connections from a single IP and set what happens if they go over that number (kick the new one, kick them all or ban the IP).
  • y_groups - Defines generic functions for groups, an abstraction from all other collections of users such as admin levels and gangs.
  • y_languages - Holds language information on all players, as well as languages loaded in the system.
  • y_lock - Restricts the server to run on only the IP specified by in "bind".
  • y_svar - Server information that is automatically saved and loaded.
  • y_td - Text draw style functions for better dynamic updates.
  • y_text - The biggest addition to this version. The y_text library provides functions for displaying, styling, and translating, messages dynamically. Allowing you to change the apperance of text entirely without editing or recompiling your mode. It also handles multiple languages transparently and adds features such as colour fades and new format specifiers.
  • y_users - Full user system with login and registration functions.
  • y_uvar - Per-player variables with automatic loading and saving.
  • y_zonepulse - Fade gang zones from one colour to another and back.
Generic Topics

Errors and Warnings
Writing libraries with YSI

Function List

The download now includes "YSI.inc". This file provides PAWNO with a complete function list for the WHOLE of YSI. It will also include most of YSI if you add it to your mode, but you can just use individual files as before.

Click here for a sneak-preview of the function list:

https://gist.github.com/Misiur/8c1831cdd729e2c1134f

The functions are divided by library, and also grouped by functionality, with the more advanced functions being lower down. Most of the time you can get away with only ever using the top couple of functions in a library.
Reply
#2

Nice, this will help many people
Reply
#3

Not much help. Most of the people don't know proper methods and way of using most of the libraries.
I could be good if we had those long page documentations he wrote a long time ago!
Reply
#4

You can always find cached versions of the threads with things such as cachedpages.com, which will allow you to access a (if applicable): ****** cache store, archive.org store, etc for most threads.
Reply
#5

@Misiur: You should go clone this - https://github.com/Crayder/YSI-Includes

That is the actual latest by Y-Less. I put that and sscanf 3 (both the very latest) on, though I'm not the type of person to take any responsibility. It seems you are so go take those! We need to all get together and bring back all of the cached tutorials and actual threads before they are gone completely.
Reply
#6

Ok, I've updated YSI.tl to latest ****** commit and started adding features onto that. Thanks Cryder!
Reply
#7

Does anyone still have the 3.1 of YSI. I can only find version 4 and up. Y_Classes doesnt work at all on version 4. but it did in version 3.1
Reply
#8

I see a lot of activity on that github page and i was wondering is that YSI stable? I have an old copy of YSI and it works for me so is there a reason to upgrade? Any bug fixes etc. ?

EDIT: I was thinking about this, not the link in the first post:
https://github.com/Misiur/YSI-Includes
Reply
#9

i include, and when i use the Y_ini it crashes my samp editor...

This only crashes samp editor, doesn't crash when I do it with pawno
Reply
#10

Is there any benchmark or performance/speed test for YSI libs?
Reply
#11

There were benchmarks (but I think ****** deleted them), at least for y_ini and y_commands (it still is on the top for large number of commands). Which ones exactly you have in mind?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)