Raised This Month: $32 Target: $400
 8% 

sql and nvault


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 12-15-2019 , 08:29   sql and nvault
Reply With Quote #1

how can I add nvault and SQL feature in the same plugin and just enable it by defining
#define SQL to use SQL and same with #define NVAULT

A bit example of any plugin of saving nick, authid & rank will work for me.
__________________

Last edited by Sanjay Singh; 12-15-2019 at 08:34.
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-15-2019 , 11:01   Re: sql and nvault
Reply With Quote #2

You need to put code for both when the action is needed.

For example, saving data at disconnect:
PHP Code:
//Comment out the below line to use nVault
#define UseSQL

public client_disconnectid )
{
    
#if defined UseSQL
    //code for action using SQL
    #else
    //code for action using nVault
    #endif

__________________
Bugsy is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 12-15-2019 , 13:50   Re: sql and nvault
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
You need to put code for both when the action is needed.

For example, saving data at disconnect:
PHP Code:
//Comment out the below line to use nVault
#define UseSQL

public client_disconnectid )
{
    
#if defined UseSQL
    //code for action using SQL
    #else
    //code for action using nVault
    #endif

i know about this but i want the code for saving data in sql and nvault as I am not good with SQL or nvault.
__________________

Last edited by Sanjay Singh; 12-15-2019 at 13:50.
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-15-2019 , 13:59   Re: sql and nvault
Reply With Quote #4

Full example here.

Search for all instances where "g_eSettings[USE_MYSQL]" is used and you will see the SQL code step by step.
__________________

Last edited by OciXCrom; 12-15-2019 at 13:59.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode