Quote:
Originally Posted by MicroD
YSI is a huge library, and it's very confusing at f̶i̶r̶s̶t̶ every sight. If you want someone to use it you better provide awesome documentation and examples or it's not going to be used. If you take a look at the most overused gamemodes you can see something in common, it's far from well written but you can mostly understand what's going on simply by reading the script and following the logic. I give you props for the effort but who's going to use it? Everything I see there can be written using basic pawn code without epic scale hacks we see in YSI libraries.
|
I wouldn't call YSI a hacky library, more of a logistical one.
YSI is actually well documented, it has entire threads documenting specific parts of YSI and even a wiki.
The reason why some people aren't using it, is because people don't read the documentations and/or understand them well.
People understand what is y_commands, there is minimal logic needed there.
****** created many tutorials which Misiur restored,
I'll make the effort and give links to some of the documentation explaining its basic purpose in as simple words as possible. (I might hit and I might a bit miss)
y_iterate - Basically, to make faster loops that contain random data.
foreach - With foreach you can loop through existing things in samp (through players/npc's) (uses y_iterate)
y_iterate (foreach 3.0) - Now you can use foreach with your IterateArrays (simpler look and shorter)
y_timers - Nicer looking timers.
y_colours - Pre-defined colors, so you don't have to.
y_dialog and y_inline - y_dialog is supposedly an easier way to make dialogs and y_inline (which I think a very useful include) is basically enabling you to create callbacks right where you are (without going back up to add a "forward line" and then back down to add a "public" or somethin') -- useful for timers &
t/pquery (No forgetto to use the include for it
samp-mysql-yinline-include)
y_ini - a faster ini filesystem include, was created to be used over dini (which is and still slow)
y_areas - An include that makes your life easier to work with areas with different shapes.
y_als - Just an easier way to hook callbacks than the traditional approach.
y_bit - There are packed strings, now you can pack entire multi-dimensional arrays!
y_classes - You normally can add classes only when the gamemode starts, now you can add classes whenever you want.
y_flooding - Limiting the amount of simultaneous connections from a single ip
y_groups - An easier way to manage different groups (admins, helpers, gangs, factions), you can add specific commands to each group.
y_text & y_language - Pretty self-explanatory, tools given to easily work with different language that you want to support on your server.
y_testing - never really digged into it, a quick view into the thread, looks like an easier way to test functions.
YSI Secrets - Just some extra, if the above wasn't enough.
Undocumented:
y_utils - An include with different useful functions
Undocumented:
y_bintree -
https://en.wikipedia.org/wiki/Binary_tree |
http://ysi.wikia.com/wiki/Library:YSI%5Cy_bintree
According to the wiki there is an unresolved bug.
Undocumented:
y_jaggedarray - Resizes an array, explaining the poorly explained example:
Код:
new arr[5][7]; // 5 * 7 = 35 cells total.
// [0][7], [1][7], [2][7], [3][7], [4][7]
Jagged_Resize(arr, {2, 4}, {3, 8});
// resizes specific slots to specific sizes, so the new sizes are now
// [0][7], [1][7], [2][4], [3][8], ([4][7] = 35)
Undocumented:
y_bitmap - I have no clue how it draws a shape, probably with 3dTextLabel.
QWERTYUIOP - Macro (one letter - useful) functions
y_lock - Binds to run on a single ip (locks from being run on other ip than the specified.)
y_va - No more a need to write "format" and then use "SendClientMessage", with this include you can do all this in one line.
y_debug - If you want to write better print()
Undocumented:
y_malloc - I think was documented, but not anymore.
y_stringhash - If you have big arrays with many options that you use frequently, this include will be very useful. Basically converting the string into numbers, comparing integer is much faster than comparing string with string.
Undocumented:
y_hashmap
y_hooks, y_playerarray & y_master (Wiki:
y_hooks,
y_master) ((poorly or un)documented: y_playerarray) - Haven't worked with y_hooks, but by the only documentation exists it looks like its simpler to hook with it than y_als, but cannot be recalled like in y_als multiple times. y_master looks like an include that completes the circle of working with y_hooks.
Undocumented:
y_td
y_remote - Normal compilers don't give much errors if you used CallRemoteFunction incorrectly, this include fixes it + changes the way you call remote functions.
https://sampforum.blast.hk/showthread.php?tid=570949&highlight=y_cell (
Wiki) - A set of functions to play with binary, bits, bytes and nibbles.
y_extra - Pretty self explanatory, adds the functions listed for you.
y_zonepulse - Flashing zones on the map like in Single Player GTA San Andreas
y_races - Self explanatory, helps you create races easily.
y_php - I'd say, not very documented. Why would one should use it, how to use it isn't documented, but stated that examples are available within YSI files.
Undocumented: y_files (not finished as Wiki suggests)
Undocumented: y_xml
Undocumented: y_playerset
Undocumented: y_writemem
y_amx - Get information about functions
y_svar &
y_uvar (Wiki:
y_svar) - I have no idea whats the difference between this and static, but it saves server data or user data and loads it after the server restarts or shuts down/crashes and is loaded again.
y_users (
Wiki) - Easily work with player data, uses y_ini and simplifies the work with player management for you. (registration, login, load, unload, reload)
I hope I nailed it.
(full list -
https://sampforum.blast.hk/showthread.php?tid=571161 )
(An entire wiki -
http://ysi.wikia.com/wiki/YSI_Wiki (funny thing: y_classes has the content of y_cell))