SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Thread Tools Display Modes
Old 25/02/2012, 09:55 PM   #1
Beta Tester
Y_Less's Avatar
Join Date: Jun 2008
Location: 629 -
Posts: 19,403
Reputation: 2705
Default YSI 3.1, now with a wiki

YSI 3.1


The latest version of YSI makes some changes to y_user index files (ind_a.YSI etc).

To upgrade safely first BACK UP your scriptfiles/YSI/users directory - this upgrade makes non-reversable updates to player password hashes for security, so if you don't have any backups and the upgrade fails then no-one will be able to login!

Next run this mode just once:

#define PP_YSI

#define MODE_NAME "RunMeOnceOnly"

#include <YSI\y_users>


This enables the upgrade code, making it very explicit that you want to do the update. Run that mode once and wait for it to tell you that the upgrade is complete (there may be two at once). Then use your other modes as normal.

I COULD have made the upgrade automatic so you don't need to mess about with that mini mode, but then people might not realise and might have issues with corrupted files. This way you KNOW you are upgrading, and the server will give an error if you don't and you need to.


YSI 3.1 is the latest major release of my YSI library. I've been working on this for a long time and am very pleased to see this released. There are still MANY things I can do with it, but it has to get released at some point. I've spent the last few weeks writing tests and fixing revealed bugs, but if you find any more please report them here.


The standard downloads are the 3.1 .zip files. There is one for SA:MP 0.3x and one for SA:MP 0.3z, you can also get the 4.0 development branch, which is much more stable and better tested, but has a few major changes in it.

YSI 3.1 for SA:MP 0.3z RC5 (.zip)
YSI 3.1 for SA:MP 0.3z RC5 (.tar.gz)
YSI 3.1 for SA:MP 0.3z RC5 (github)

YSI 3.1 for SA:MP 0.3z RC4 (.zip)
YSI 3.1 for SA:MP 0.3z RC4 (.tar.gz)
YSI 3.1 for SA:MP 0.3z RC4 (github)

YSI 3.1 for SA:MP 0.3x (.zip)
YSI 3.1 for SA:MP 0.3x (.tar.gz)
YSI 3.1 for SA:MP 0.3x (github)

YSI 4.0 beta (.zip)
YSI 4.0 beta (.tar.gz)
YSI 4.0 beta (github)


If you have problems compiling YSI, check this topic first:

Errors and Warnings

If you think you have found a bug, please report it here:



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 | Topic | Tutorial - Slightly simplifies the use of the Advanced Library System.
  • y_amx | Old Topic | Tutorial - Low level AMX information access. Used by y_hooks, y_testing and y_timers to list public functions.
  • y_bintree | Topic | Tutorial - PAWN binary tree implementation.
  • y_bit | Topic | Tutorial - Bit arrays for PAWN - vastly reduces memory usage for true/false arrays.
  • y_cell | Topic | Tutorial - Some clever bit-level variable manipulations.
  • y_debug | Topic | Tutorial - Compile time macros for displaying, or not, debug information at run time.
  • y_files | Topic | Tutorial - A plugin with some useful file functions. Not included in the download below.
  • y_hooks | Topic 1 | Topic 2 | Old Tutorial - Allows you to hook any callback with no effort at all.
  • y_ini | Topic | Tutorial - This is the fastest ini file system around, designed to load entire files at once.
  • y_inline | Old Topic | Tutorial - Allows for the declaration of inline functions in PAWN.
  • y_iterate | Topic | Tutorial - foreach, but in YSI.
  • y_malloc | Topic | Tutorial - Allocate and free memory as required.
  • y_master | Old Topic | Tutorial | Old Tutorial - Code for the master system. See this topic and y_commands for more information.
  • y_php | Topic | Tutorial - Fast and efficient two-way communication with PHP. Requires shmop.
  • y_playerarray | Topic | Old Tutorial - Bit arrays optimised specifically for arrays of players.
  • y_playerset | Topic | Tutorial - Call functions passing groups, single players, arrays, or playerarrays as the "target" parameter.
  • y_remote | Topic | Tutorial - Wrappers for "CallRemoteFunction" and "CallLocalFunction".
  • y_scriptinit | Topic | Tutorial - Provides "OnScriptInit" for both gamemodes and filterscripts.
  • y_stringhash | Topic | Tutorial - Allows you to treat strings as numbers for things like "switch" statements.
  • y_testing | Topic | Tutorial - Allows for very simple unit testing production.
  • y_timers | Topic | Tutorial - 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 | Topic | Tutorial - Random useful functions.
  • y_va | Topic | Tutorial - Variable argument functions such as va_printf and va_format.
  • y_writemem | Topic | Tutorial - WINDOWS ONLY! Write to arbitrary memory addresses in the server memory.
  • y_xml | Topic | Tutorial - XML file reading and writing.
  • High Level
  • y_areas | Topic | Tutorial - Manage zones on the map, with players entering and leaving.
  • y_classes | Topic | Tutorial | GM 1 | GM 2 - Allows for extra dynamic class selection screens, different users can have different skin options and you can add and remove classes dynamically.
  • y_colours | Topic | Tutorial - AKA y_colors. Defines a vast number of colours and provides both definition and string access to them.
  • y_commands | Topic | Tutorial - 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 | Topic | Tutorial - Show dialogs to players with no worry about IDs and with inline functions available.
  • y_flooding | Topic | Tutorial - 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 | Topic | Tutorial | Old Tutorial - Defines generic functions for groups, an abstraction from all other collections of users such as admin levels and gangs.
  • y_languages | Topic | Tutorial - Holds language information on all players, as well as languages loaded in the system.
  • y_lock | Topic | Tutorial - Restricts the server to run on only the IP specified by in "bind".
  • y_svar | Topic | Tutorial - Server information that is automatically saved and loaded.
  • y_td | Topic | Tutorial - Text draw style functions for better dynamic updates.
  • y_text | Topic | Tutorial - 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 | Topic | Tutorial - Full user system with login and registration functions.
  • y_uvar | Topic | Tutorial - Per-player variables with automatic loading and saving.
  • y_zonepulse | Topic | Tutorial - Fade gang zones from one colour to another and back.

Generic Topics

Errors and Warnings
Writing libraries with YSI

Old YSI 3.0 RC2
Old YSI 3.0
Old YSI 1.0

Function List

The download now includes "". 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:

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.


I have set up a GIT repository at:

Anyone is free to view the code and submit patches, which will be integrated upon request.


There are two YSI IRC channels - one on GTANet and one on FoCoHub (GamerXServer IRC). Join whichever one you like, if I'm online I'll be in both:

GamerX Server

  • Integrated several old fixes and Slice's improvements. Also made a git repository which should be more reliable than the old SVN one.
  • Fixed three minor bugs (well, one was fairly major, but was my own fault for not removing test code). See the new download link below.

Last edited by Y_Less; 11/02/2014 at 07:30 PM.
Y_Less is online now   Reply With Quote
Old 25/02/2012, 10:03 PM   #2
Little Clucker
Avery's Avatar
Join Date: Oct 2011
Location: Georgia, United States
Posts: 21
Reputation: 4
Default Re: YSI 3.1

You make scripting so much easier and less confusing! Thank you!

My Releases
Avery is offline   Reply With Quote
Old 25/02/2012, 10:03 PM   #3
Join Date: Dec 2009
Location: UK, Wales
Posts: 329
Reputation: 20
Default Re: YSI 3.1

YSI was just updated?
sanplayer is offline   Reply With Quote
Old 25/02/2012, 10:04 PM   #4
Big Clucker
Unknown1234's Avatar
Join Date: Jan 2011
Location: Unknown
Posts: 141
Reputation: 2
Default Re: YSI 3.1

whats change log?
- Unknown1234
Unknown1234 is offline   Reply With Quote
Old 25/02/2012, 10:06 PM   #5
Beta Tester
Y_Less's Avatar
Join Date: Jun 2008
Location: 629 -
Posts: 19,403
Reputation: 2705
Default Re: YSI 3.1

My changelog is mainly from SVN commit messages, and the SVN server is down so I don't know (there's hundreds of them as this is a major new release).
Y_Less is online now   Reply With Quote
Old 25/02/2012, 10:11 PM   #6
RyDeR`'s Avatar
Join Date: Feb 2009
Location: Belgium
Posts: 3,131
Reputation: 656
Default Re: YSI 3.1

Lots of very useful stuff in there. Thanks for all the effort, I really appreciate it.

RyDeR` is offline   Reply With Quote
Old 25/02/2012, 10:20 PM   #7
Little Clucker
Rock1's Avatar
Join Date: Sep 2011
Posts: 31
Reputation: 0
Default Re: YSI 3.1

Ohh..thanks Y_Less
Signature not available!
Rock1 is offline   Reply With Quote
Old 25/02/2012, 10:32 PM   #8
Huge Clucker
Join Date: May 2011
Posts: 494
Reputation: 52
Default Re: YSI 3.1

Nice, very nice, but I have a problem with this. I was using 3.0 beta, everything was good.. I've updated it to 3.1 and now when I compile Im getting like ~200 tag mistach warnings from,,, y_shortfunc,
BaubaS is offline   Reply With Quote
Old 25/02/2012, 10:49 PM   #9
Beta Tester
Y_Less's Avatar
Join Date: Jun 2008
Location: 629 -
Posts: 19,403
Reputation: 2705
Default Re: YSI 3.1

Ok, well what are the warnings? Nothing has changed there significantly.

Edit: OK, apparently I managed to break something after testing when adding comments to files! Sorry!
Y_Less is online now   Reply With Quote
Old 25/02/2012, 10:55 PM   #10
TheArcher's Avatar
Join Date: Dec 2009
Location: Home
Posts: 2,524
Reputation: 241
Default Re: YSI 3.1

Very nice. This is out of beta?
TheArcher is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Samp members wiki. Your own wiki page on Invite everyone! RajatPawar Everything and Nothing 13 16/01/2013 09:27 PM piohh General 8 10/10/2012 12:27 PM
Limits help? Kar General 2 26/08/2011 11:36 AM
Creating a .PDF file from LZLo Everything and Nothing 41 04/08/2011 05:36 PM
[WIKI] How am i able to add information to the Sa-Mp Wiki? Carlos_Leone General 3 28/03/2009 01:53 PM

All times are GMT. The time now is 11:50 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.