PDA

View Full Version : need to learn scripting


div
22/05/2018, 06:39 PM
i want to learn scripting.. which command making include should i use like zcmd, etc and what are the useful includes i require, also the plugins..



and what else do i need to create a server? ill create a CnR server.. from scratch, MySQL and??

FailerZ
22/05/2018, 06:53 PM
My usual go to includes are:
Primary (I always use)
zcmd (Include) - Commands processor
sscanf2 (Plugin) - Best for searching in strings
streamer (Plugin)- To allow bypassing the limits of the checkpoints, 3d text labels and objects. Also great for area checks.
mysql (Plugin) - Database
Whirlpool (Plugin) - Passwords hashing
progress2 (Include) - For progress bars

Secondary:
easyDialog (Include) - Great for neat code for dialogs
foreach - Faster and more organized loops

Spectat0rDE
22/05/2018, 10:51 PM
Depends on how and what you want to script.

Basic includes are:

#include <a_samp>
#include <core>
#include <float>
#include <sscanf2>

You put these on top of your script.

If you want to make simple commands you can use ocmd and zcmd.
If you want to make database for your server I would recommend SQLite
Plugins I would recommend, crashdetect, sscanf, streamer, filemanager, whirlpool(For the database)

Sew_Sumi
23/05/2018, 03:26 AM
Basic includes are:

#include <a_samp>
#include <core>
#include <float>
#include <sscanf2>

You put these on top of your script.

Doing that alone, doesn't make it work...

OP, don't trust the randoms that simply throw up code to you, it's highly likely they'll lead you astray and teach you bad habits.

You need to look at the tutorials, released code, and the pawn handbook. With the ones who are simply throwing up code, they are themselves usually copying and pasting from their own gamemode, and quite often when they do this they NEGLECT to tell you of the OTHER STEPS you need to take to get their code working. (Example above never even mentioned you needed to download sscanf, but will likely edit their response to get it 'right')


Also, ignore the tools who will no doubt say it's not worth it, or that samp is dead, as really, coding code, isn't dead... While they can't get players to play with them, the benefit of learning a simple coding language and getting a start into a debugging and code review mentality, is better than having your 'joy' rely on other players actually joining.





And before you start repping people simply because you think they helped you, just hold off repping, until your code is verified to work, as as I said, if they are copy-pasting looking for reps, they'll post anything to get that rep.

Spectat0rDE
23/05/2018, 03:20 PM
Doing that alone, doesn't make it work...

OP, don't trust the randoms that simply throw up code to you, it's highly likely they'll lead you astray and teach you bad habits.

You need to look at the tutorials, released code, and the pawn handbook. With the ones who are simply throwing up code, they are themselves usually copying and pasting from their own gamemode, and quite often when they do this they NEGLECT to tell you of the OTHER STEPS you need to take to get their code working. (Example above never even mentioned you needed to download sscanf, but will likely edit their response to get it 'right')


Also, ignore the tools who will no doubt say it's not worth it, or that samp is dead, as really, coding code, isn't dead... While they can't get players to play with them, the benefit of learning a simple coding language and getting a start into a debugging and code review mentality, is better than having your 'joy' rely on other players actually joining.





And before you start repping people simply because you think they helped you, just hold off repping, until your code is verified to work, as as I said, if they are copy-pasting looking for reps, they'll post anything to get that rep.

The fuck are you even talking about? Im not a teacher. I just said these are the basics to do something. Its his own job to search for the tutorials.

Lokii
23/05/2018, 03:37 PM
Depends on how and what you want to script.

Basic includes are:

#include <a_samp>
#include <core>
#include <float>
#include <sscanf2>

You put these on top of your script.

If you want to make simple commands you can use ocmd and zcmd.
If you want to make database for your server I would recommend SQLite
Plugins I would recommend, crashdetect, sscanf, streamer, filemanager, whirlpool(For the database)



core and float allready included in a_samp so you'r including them twice

cuber
23/05/2018, 03:41 PM
Depends on how and what you want to script.

Basic includes are:

#include <a_samp>
#include <core>
#include <float>
#include <sscanf2>

You put these on top of your script.

If you want to make simple commands you can use ocmd and zcmd.
If you want to make database for your server I would recommend SQLite
Plugins I would recommend, crashdetect, sscanf, streamer, filemanager, whirlpool(For the database)

absolutely mind blown