Skip to content

Save data of players and other data inside .INI files.

License

Notifications You must be signed in to change notification settings

Tetragromaton/IniDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IniDB

This is a scripting addition for your plugins, save/read data that you want just in a few strings !.
DISCLAIMER ! I DO NOT CARE IF SOMETHING WENT WRONG WHILE SAVING ANY SENSETIVE DATA ON YOUR SIDE. Use at your own risk !


Installation:
1)Create inidb folder in addons/sourcemod folder.
2)Set permissons on inidb to 777
3)Drop smx plugin in plugins folder and run it.

Natives list:
native int INIDB_TakeData(const char[] SteamID, const char[] packed, const char[] variable, String:value[], int size, int client = -1);//Fetch string from package.
ᅠ native int INIDB_InsertData(const char[] sid, const char[] packed, const char[] variable, const char[] value, int client = -1);//Store string in package.
ᅠ native int INIDB_TakeDataInt(const char[] SteamID, const char[] packed, const char[] variable, int client = -1);//Store as int variable from package.
ᅠ native int INIDB_InsertDataInt(const char[] sid, const char[] packed, const char[] variable, int value, int client = -1);//Quickly insert integer value inside variable)
ᅠ native int INIDB_DestroyPackage(const char[] sid, const char[] packed, int client = -1);//Destroy package that contains variables in it. (eg. FruitBin package will be destroyed with all of variables in it).
ᅠ native int INIDB_DoesExist(const char[] sid);//Check steamid in inidb folder on existance.

Usage examples:

if(INIDB_TakeDataInt("", "FruitBin", "Apples", client) > 0)
{
//Do something if player has more than 0 apples in FrutBin package.
}else INIDB_InsertDataInt("", "FruitBin", "Apples", 333, client);//This will set 333 apples on client.

Todo's


1)Do plugin runtime modes (1 - Do not register new user accounts ini files, 2 - default, register all the players and etc.)

About

Save data of players and other data inside .INI files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published