SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 27/08/2017, 01:31 PM   #1
sim_sima
Gangsta
 
Join Date: Mar 2010
Posts: 697
Reputation: 26
Question Scripting startup help

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!
sim_sima is offline   Reply With Quote
Old 27/08/2017, 01:33 PM   #2
HoussemGaming
Banned
 
Join Date: Jun 2017
Location: France
Posts: 187
Reputation: 10
Default Re: Scripting startup help

- Use SQLite or MySQL - Whirlpool
- No, use ZCMD instead
- Streamer plugin
HoussemGaming is offline   Reply With Quote
Old 27/08/2017, 01:41 PM   #3
Ghazal
Gangsta
 
Ghazal's Avatar
 
Join Date: Oct 2013
Location: Egypt
Posts: 523
Reputation: 167
Default Re: Scripting startup help

MySQL: https://github.com/pBlueG/SA-MP-MySQL/releases
Password hashing: http://forum.sa-mp.com/showthread.php?t=570945
I'd recommend using YCMD command processor.
Streamer
__________________
Ghazal is offline   Reply With Quote
Old 27/08/2017, 01:42 PM   #4
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Ireland
Posts: 493
Reputation: 136
Default Re: Scripting startup help

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.
__________________
owner/developer @ koky's deathmatch
aoky is offline   Reply With Quote
Old 27/08/2017, 01:58 PM   #5
skuller12
Big Clucker
 
Join Date: Feb 2015
Location: Galati, Romania
Posts: 101
Reputation: 0
Default Re: Scripting startup help

for hash password use md5
for commands system pawn.cmd(its very fast)
for objects streamer(.dll and .inc)
skuller12 is offline   Reply With Quote
Old 27/08/2017, 02:02 PM   #6
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 10,067
Reputation: 2660
Default Re: Scripting startup help

Why load an entire extra plugin when there is a native: http://wiki.sa-mp.com/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.
__________________
Vince is offline   Reply With Quote
Old 27/08/2017, 06:23 PM   #7
sim_sima
Gangsta
 
Join Date: Mar 2010
Posts: 697
Reputation: 26
Default Re: Scripting startup help

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
sim_sima is offline   Reply With Quote
Old 27/08/2017, 06:30 PM   #8
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Ireland
Posts: 493
Reputation: 136
Default Re: Scripting startup help

MySQL is much faster and databases are quiet easy to get and set-up.
__________________
owner/developer @ koky's deathmatch
aoky is offline   Reply With Quote
Old 27/08/2017, 06:35 PM   #9
Sithis
Gangsta
 
Join Date: Mar 2013
Location: the Netherlands
Posts: 887
Reputation: 79
Default Re: Scripting startup help

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.
__________________
Developer and owner of https://trinityrpg.com
Sithis is offline   Reply With Quote
Old 27/08/2017, 06:58 PM   #10
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 10,067
Reputation: 2660
Default Re: Scripting startup help

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.
__________________
Vince 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
Startup help Jstylezzz Scripting Help 2 14/06/2012 01:18 PM
SA-MP Startup Problem +REP [PDS]DarioKeic Client Support 3 01/04/2012 03:47 AM
Crashes at startup JageR<3 Client Support 5 03/02/2012 06:59 PM
SA-MP Startup Nubie Client Support 4 27/02/2011 09:14 PM
Error at startup Anthony_Brassi Client Support 2 03/06/2009 08:58 PM


All times are GMT. The time now is 11:49 PM.


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