SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 20/09/2019, 12:30 PM   #1
SecretB
Little Clucker
 
Join Date: Jul 2015
Posts: 14
Reputation: 0
Default SQLite for Simple Data

Hey, so i have been wondering, is there a way to save simple data to SQLite?
like

Code:
enum
{
MOTD_Enabled
}

CMD:motd(playerid, params)
{
     if(MOTD_Enabled == 1)
     {
      SendClientMessage(playerid, COLOR_RED, "Welcome to the server");
      }

}
In this case, i want SQLite to write & read if MOTD_ENABLED is either 0 or 1.

Thanks for checking my post !
__________________
SecretB is offline   Reply With Quote
Old 20/09/2019, 01:16 PM   #2
Private200
High-roller
 
Private200's Avatar
 
Join Date: May 2012
Posts: 1,182
Reputation: 211
Default Re: SQLite for Simple Data

Go for MySQL if you are considering such a saving mechanism.

https://forum.sa-mp.com/showthread.php?t=644891

Old but should be a start.
__________________
just a signature
Private200 is offline   Reply With Quote
Old 21/09/2019, 02:07 PM   #3
Joe Staff
High-roller
 
Joe Staff's Avatar
 
Join Date: Aug 2007
Posts: 2,567
Reputation: 377
Default Re: SQLite for Simple Data

SQLite is just fine for saving.
In either case, if you're not already using an SQL system, then you should just consider a file for your motd.
Something like if(fexist("motd.txt"))
__________________
Big bottom girls make this rockin' world go 'round.
Joe Staff is offline   Reply With Quote
Old 22/09/2019, 08:53 AM   #4
SecretB
Little Clucker
 
Join Date: Jul 2015
Posts: 14
Reputation: 0
Default Re: SQLite for Simple Data

Thanks for the help guys ! REP ++
__________________
SecretB is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQLite data leak KaliDobrev Scripting Help 6 06/03/2019 03:46 AM
SQLite - Selecting And Retrieving Data With Specifications DrakeX Scripting Help 4 22/05/2014 01:27 PM
Problem to get data from sqlite Cerealguy Scripting Help 3 15/12/2013 07:41 PM
loading account data after login (SQLite) Voxel Scripting Help 11 11/11/2013 07:11 PM
SQLite Updating data. Snip3d Scripting Help 0 06/07/2012 07:27 PM


All times are GMT. The time now is 08:16 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.