How to simply store user's data
#1

I just started coding and making small filescripts in PAWNO, and I'm looking forward with a friend of mine on starting a RP gamemode from scratch, so it would very helpful if we knew how to store users data such as, money, level, what job he/she has, etc, before we move any forward.

We just created a trucker job and we are realizing how important saving data is, in order to proceed with the server, I would like to see a tutorial on how to properly store data, maybe with dialogs or something Y_INI or something (Even though I don't know anything about it) but MYSQL seems too hard, so we wanted to start with something simple, since we are newbies.

Thank you!
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=648552


I'm just going to say, you need to learn to script before trying to make a scratch-made RP mode...
Reply
#3

If MySQL seems hard, go for SQLite. Using any other saving system is like a very big mistake if you're making a RP server.
Reply
#4

To be precise Every , and I mean all systems is possible to save its just by preference and data manipulation. You can use Y_ini, if you can say that your data manipulation and analysis is top notch since with that way you can manipulate almost the same as the elite MySQL and SQLite. With y_php now fully fixed and functional you can also connect y_ini to your website if you have in the near future using both as a combo.

If you wish to learn MySQL but is scared by the monster you have just seen then SQLite would teach you the basics before diving deep into the trenches of Tartarus.

Just a tip though, it is by preference of which you are comfortable coding with. You don't need to force yourself to learn something that you can't learn fast, you also should not work basic coding in MySQL, I've literally said this a couple of times. Basic MySQL coding would do more harm than good to your script in the long run.

EDIT:
The PHP part on SA-MP or let me say the functions to be used for MySQL is easily, but creating the queries and creating a less redundant and manipulated data is much harder than it looks. I am not scaring you or anything its just facts and everyone here that uses MySQL, including me, have delve into the mouth of Tartarus just to learn MySQL, in the long run it will be a big help for you on almost everything database related, it's just that MySQL is misunderstood by many that they can just use it in basic form, and I hate to break it to you but the basic form in MySQL is more fucked up than using the other saving system
Reply
#5

Quote:
Originally Posted by JesterlJoker
Посмотреть сообщение
To be precise Every , and I mean all systems is possible to save its just by preference and data manipulation. You can use Y_ini, if you can say that your data manipulation and analysis is top notch since with that way you can manipulate almost the same as the elite MySQL and SQLite. With y_php now fully fixed and functional you can also connect y_ini to your website if you have in the near future using both as a combo.

If you wish to learn MySQL but is scared by the monster you have just seen then SQLite would teach you the basics before diving deep into the trenches of Tartarus.

Just a tip though, it is by preference of which you are comfortable coding with. You don't need to force yourself to learn something that you can't learn fast, you also should not work basic coding in MySQL, I've literally said this a couple of times. Basic MySQL coding would do more harm than good to your script in the long run.

EDIT:
The PHP part on SA-MP or let me say the functions to be used for MySQL is easily, but creating the queries and creating a less redundant and manipulated data is much harder than it looks. I am not scaring you or anything its just facts and everyone here that uses MySQL, including me, have delve into the mouth of Tartarus just to learn MySQL, in the long run it will be a big help for you on almost everything database related, it's just that MySQL is misunderstood by many that they can just use it in basic form, and I hate to break it to you but the basic form in MySQL is more fucked up than using the other saving system
Are there any posts that I could use or read to learn how to use Y_INI to store data (or user's stats) I just want to start somewhere and work my way up, I didn't mean to write the post sounding like I was going to create the RP gamemode right away, but rather work my way up, learn, and understand almost every aspect, test my code as much as I can, and then actually start working on an RP server, or not even RP server, maybe just DM server, basically I want to get better at pawno, but in order to proceed and continue with creating jobs, and stuff like that I would like to know how to save user's data, and I don't know where to get started.

Because right now, I'm able to create stuff, like the trucker job that my friend and I created, it works just fine, but we want to be able to save the players money, how many trips this user has made as a truck drivers and stuff like that, because I'm scared of creating jobs or other file scripts to then not being able to actually implement them, because I don't know how to store data, also I would love to learn how to create to Login/Register system, all stuff related to saving data in pawno.
Reply
#6

Oh my Friend a lot.

This link is where you can learn y_ini by documentation
This link here is how to use it by misiur
and this link here is for a simple login / registration using Y_INI

sorry I took time to answer. I am on PST and it was early 3 AM when the message came
Reply
#7

Use Dini2 by Gammix, The syntax is very easy.
Reply
#8

Hi. There are many tutorials over on SA-MP forums on how to use y_ini to save data. You can find the YSI library which is oftenly being updated. https://github.com/pawn-lang/YSI-Includes/releases
Quote:

YSI 4.0.2 · Misiur released this on 18 Jan · Fixes and upgrades for y_ini

I would suggest looking over on https://sampforum.blast.hk/showthread.php?tid=597639 to have a bit sense to know how to manage data using y_ini.

The y_ini introduction thread is here: https://sampforum.blast.hk/showthread.php?tid=570957.

The YSI library doesn't just offer y_ini, but useful things like iterators. They will be useful to you soon with your roleplay gamemode, I would suggest taking advantage of the library and use it.

Honestly, I would recommend you learning SQL and use sqlite.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)