Scripting startup help
#1

Hello guys.
I need a few tips from you scripting pros
I haven't scripted for samp for over three years, and now I plan to get started again.
However a lot of the things I used back in the day are probably outdated now, So I have a few questions that I hope you can help me with.

- For a login/register system, what is the best file reading/writing include/plugin to use? Also, what is the best way to hash passwords?
- Is DCMD still a good tool to use?
- What is the best object/vehicle streamer?

Thank you!
Reply
#2

- Use SQLite or MySQL - Whirlpool
- No, use ZCMD instead
- Streamer plugin
Reply
#3

MySQL: https://github.com/pBlueG/SA-MP-MySQL/releases
Password hashing: https://sampforum.blast.hk/showthread.php?tid=570945
I'd recommend using YCMD command processor.
Streamer
Reply
#4

I'm not professional but I highly recommend MySQL, whenever I start a gamemode I just download a blank MySQL gamemode which is premade for you. It saves you a ton of time!

ZCMD is still one of the best out there.

HoussemGaming mentioned all them but, streamer indeed.

Use the SA-MP wiki too, it's one of the greatest tools you can use along with the forums.
Reply
#5

for hash password use md5
for commands system pawn.cmd(its very fast)
for objects streamer(.dll and .inc)
Reply
#6

Why load an entire extra plugin when there is a native: https://sampwiki.blast.hk/wiki/SHA256_PassHash. Even though Whirlpool has a larger digest, using SHA256 with a sufficiently long salt (I use 256 bits) isn't any less secure and it would still take 3 sesvigintillion years to crack. Or at least until the player uses the password 123456.
Reply
#7

A quick question though... Isn't it better to use a plugin/include that saves data to a .ini file in stead of MySQL? Afterall, a MySQL system requires a MySQL server, and in case the connection to the MySQL server is lost, the SA-MP server will not be able to read or write data at all
Reply
#8

MySQL is much faster and databases are quiet easy to get and set-up.
Reply
#9

Quote:
Originally Posted by sim_sima
View Post
A quick question though... Isn't it better to use a plugin/include that saves data to a .ini file in stead of MySQL? Afterall, a MySQL system requires a MySQL server, and in case the connection to the MySQL server is lost, the SA-MP server will not be able to read or write data at all
In theory, yes. In practice, I personally have never seen a MySQL server crash or be down when properly configured.
Reply
#10

Quote:
Originally Posted by sim_sima
View Post
Afterall, a MySQL system requires a MySQL server, and in case the connection to the MySQL server is lost, the SA-MP server will not be able to read or write data at all
This is extremely rare. MySQL servers are most often hosted on the same box or at least on the local network. External MySQL connections are way too slow to be any of use reasonable use for this game. The recent plugin versions also all have auto-reconnect abilities.

The answer as to which is better is: it depends. Flat files are fine for very small gamemodes that don't require a lot of data. But any mode that is not of the "classic" type will usually requires lots of data to be stored. I've recently picked up scripting again and it took me almost a full day to design and build a preliminary database model for the mode I want to build. So far I'm at 33 tables and I'll still need more. Flat file formats, perhaps especially the INI-format, are terrible at storing lists of things. It would be completely unsuitable for my need.

datamodel.jpg

The blur is intentional. I don't feel like disclosing my entire model but this should give you a fairly good view of what it looks like.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)