YSI:Commands

From SA-MP Wiki

Jump to: navigation, search

The YSI command system is originally based on DCMD but has been greatly optimized for large numbers of commands. Every other command system available (and, I suspect, every other command system not available too) uses a series of text based comparisons to determine which command was entered, either using strtok, dcmd or just basic comparisons, they are all very similar. The YSI system is completely new and unique, using organized numerical comparisons of command hashes instead, these are not only vastly faster but the order in which they're done means far less need to be done.

The system idea relies on two basic ideas - hashes and binary trees. Binary trees are explained in greater detail here. Hashes are basically a unique number generated from a command's text*.


  • These are not always unique, however additional post tree iteration code ensures collisions do not affect the running of the system.