SA-MP Forums Archive
Y_INI and Sqlite - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Y_INI and Sqlite (/showthread.php?tid=552856)



Y_INI and Sqlite - LeXuZ - 26.12.2014

I was told before that Y_INI and Sqlite are a bad thing to mix, I didn't think it would make much difference, so I removed Sqlite from my script, but now I find it is better to ban a player using the Sqlite then it is using Y_INI, but I save my players in Y_INI. I needed to know if it would effect the script if I mixed them together, as it's easier to ban using Sqlite then it is in Y_INI, but I find it hard to write a saving accounts system in Sqlite, so I have stuck with Y_INI. Please could you tell me if it will effect the script or not!
Thank you.


Re: Y_INI and Sqlite - AndySedeyn - 26.12.2014

My ban system goes like this:
-A new userfile is being created in a separate folder exactly like how the regular userfile is created.
-I hold in that file: Who banned them, why they got banned and their IP.
-Whenever the player connects, I check if the file exists or not. If it does: I load the information inside it and show him a dialog with that information.

To unban you just remove the file of that player.


Re: Y_INI and Sqlite - LeXuZ - 26.12.2014

And this is using Y_INI? It sounds good, I was thinking of something like this, so it bans their IP and Accounts plus shows the reason.


Re: Y_INI and Sqlite - AndySedeyn - 26.12.2014

Quote:
Originally Posted by LeXuZ
Посмотреть сообщение
And this is using Y_INI? It sounds good, I was thinking of something like this, so it bans their IP and Accounts plus shows the reason.
All of this is done with Y_INI and I find it rather efficient and quite easy to manage.
Although, it could use some improvements because banned players can just create a new account. I have yet to work on that part.

EDIT: Database saving is better than file saving, I must say. So if you could choose between both I would go with SQlite for all the data. This is just a way around for people who don't know how to work with databases.


Re: Y_INI and Sqlite - LeXuZ - 27.12.2014

I can't write with Sqlite, I find it really hard, but I have a back up of my old banning system, but I will try what you've said, I will make it so it bans the accounts plus IP, hope it works out fine! Thanks for replying anyway! Enjoy the holidays!


Re: Y_INI and Sqlite - AndySedeyn - 27.12.2014

Quote:
Originally Posted by LeXuZ
Посмотреть сообщение
I can't write with Sqlite, I find it really hard, but I have a back up of my old banning system, but I will try what you've said, I will make it so it bans the accounts plus IP, hope it works out fine! Thanks for replying anyway! Enjoy the holidays!
Glad I could somewhat help you.

Quote:
Originally Posted by LeXuZ
Посмотреть сообщение
Enjoy the holidays!
That's likewise.


Re: Y_INI and Sqlite - TRTDM - 27.12.2014

Go for mysql both y INI and sqlite suck