Coder Social home page Coder Social logo

inidb's Introduction

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.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.