SA-MP Forums Archive
Scripting startup help - 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: Scripting startup help (/showthread.php?tid=640050)



Scripting startup help - sim_sima - 27.08.2017

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!


Re: Scripting startup help - HoussemGaming - 27.08.2017

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


Re: Scripting startup help - Ghazal - 27.08.2017

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


Re: Scripting startup help - aoky - 27.08.2017

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.


Re: Scripting startup help - skuller12 - 27.08.2017

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


Re: Scripting startup help - Vince - 27.08.2017

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.


Re: Scripting startup help - sim_sima - 27.08.2017

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


Re: Scripting startup help - aoky - 27.08.2017

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


Re: Scripting startup help - Sithis - 27.08.2017

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.


Re: Scripting startup help - Vince - 27.08.2017

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.