The Gabion Kernel is an highly versatile and advanced API for AMX Mod X. It features a component system which allows plugins to access its features. These features include: a centralized MySQL connection, help file system, effects system, player account system, admin control system, a status and information hud system, a Version Control System for both the Gabion Kernel and its plugins, and a wide range of MySQL functions. Other benefits of the Gabion Kernel is an extremely easy initial install process, and a system that makes installing different complex components as easy as adding them to the plugins.ini file.
1. To make installation of different complex plugins extremely easy and painless for server owners.
2. To make a system where developers will have an advanced set of tools which make complex plugins easier & faster to make, and compatible with other Gabion Kernel components.
v1.30 - Added Version Control System for both the Gabion Kernel and its components (includes three new related functions). Added a SQL Connection Handle return function. Added a few new commands for the Gabion Command System. Fixed a security hole with the admin system. Added an automatic SQL Table Optimization Utility which automatically optimizes Core Gabion Kernel tables on startup or map change (controlled by a cvar) for slightly better SQL Preformance. Also includes some other minor adjustments and changes.
v1.31 - Fixed issue with player accounts not auto-registering. Fixed issue with Gabion Kernel spamming the versions table. Added a new command which allows players to obtain a new passcode. Widened randomization range of passcodes, making them more secure and random. Some other minor fixes and adjustments also.
Code:
/*
Gabion Kernel Include File
*/
// DO NOT TOUCH ANYTHING UNLESS YOU ABSOLUTELY KNOW WHAT YOU'RE DOING
// I WILL NOT HELP YOU IF YOU BREAK YOUR PLUGIN
// Defines
// Hud_Display Func Defines; Tells Hud_Display to either to print to Chat Hud or Status Hud; Default is Status Hud
#define HUD_CHAT 1
#define HUD_STATUS 0
// Set_Glow Func Defines; Tells Set_Glow to either turn On or Off; Default is Off
#define GLOW_ON 1
#define GLOW_OFF 0
// Component Set Status Defines; Tells component_setstatus to either turn the component On or Off; Default is Auto
#define COMP_AUTO 2
#define COMP_ON 1
#define COMP_OFF 0
// Select_String Func Defines; Tells for select_string to either use old default method or new custom method.
// Default: Uses all variables. Ex: SELECT <index> FROM <table> WHERE <condition> = '<equals>'
// Custom: Does not use equals, instead uses condition for use in multiple if statements. Ex: SELECT <index> FROM <table> WHERE <condition>
#define SELECTSTR_NEW 1
#define SELECTSTR_OLD 0
#pragma reqlib gabionkernel
// API Fake Natives
// Register Component
native register_component(compname[]);
// Set Component Status
native component_setstatus(comp_id,status=3);
// Register Help File
native register_helpfile(name[],filepath[]);
// Gabion Kernel Version Return
native Float:gab_version();
// Component Version Return
native Float:component_version(name[]);
// Component Version Update
native component_newversion(name[],Float:version);
//-----------------------------------------------------------------------------------
// MySQL Handle Return
native Handle:gab_sqlhandle();
// MySQL Status Indicator
native is_db_online();
// MySQL Edit Value (Integer)
native edit_value(id,table[],index[],func[],amount);
// MySQL Edit Value (Float)
native edit_fvalue(id,table[],index[],func[],Float:amount);
// MySQL Select String
native select_string(table[],index[],condition[],equals[],output[],size,mtype=0);
// MySQL Selection Function - Conditional Columns (SELECTED Columns 1x Rows)
native select_columns(table[],index[],condition[],equals[],output[],size,amount,mtype=0);
// MySQL Selection Function - ALL Rows (1x Column ALL Rows)
native select_allrows(table[],index[],output[],size);
// MySQL Selection Function - Conditional Rows (1x Column SELECTED Rows)
native select_rows(table[],index[],condition[],equals[],output[],size);
// MySQL Update String
native update_string(table[],set[],equals[],where[],condition[]);
// MySQL Free Query String
native free_string(query[]);
// MySQL Result Query String
native result_string(query[],Handle:output);
// MySQL SubQuery String
native select_subquery(table[],index[],condition[],table2[],index2[],condition2[],equals[],output[],size);
// Admin Verification
native admin_verify(id,admintype[],comment[]);
// MySQL Based Origin Distance Finder
native distance_verify(id,table[],index[],dist,out_origin[3]);
// MySQL List Printer
native view_sqllist(id,listname[],listdes[],table[],condition[],indexes[],indexnum);
// MySQL Table Optimizer
native optimize_table(table[]);
//-----------------------------------------------------------------------------------
// Register Player Column
native register_playercolumn(name[],sqlextra[]);
// Register Admin Access Column
native register_admincolumn(name[]);
// Gabion Kernel Player Id Return
native gab_playerid(id);
// Info Hud Code Display
native infohud_display(id,compid,msg[]);
// Message Hud Code Display
native hud_display(id,message[],func=0);
//-----------------------------------------------------------------------------------
// Set User Maxspeed
native set_maxspeed(id,func[],Float:amount);
// Set User Transparancy
native set_alpha(id,func[],amount);
// Set User Glow
native set_glow(id,trigger,redfunc[],red,greenfunc[],green,bluefunc[],blue);