SA-MP Forums Archive
How can I get started on scripting? - 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: How can I get started on scripting? (/showthread.php?tid=448541)



How can I get started on scripting? - Grooty - 04.07.2013

I want to make my own freeroam script to just start...
How can I start on making a script, and learning to script?
Is there a base script for freeroam?


Re: How can I get started on scripting? - DaRk_RaiN - 04.07.2013

Well it's not a question of Where can i find a tutorial it's a question of How am I gonna start this script/project.
And the easiest way to do it is to actually START on it, you can't learn if you don't try regardless if it's a fail or not because you can't get it right always, you just can't, lets say you got to the part of making commands, ****** it, there are loads of good tutorials.
For the basics you need to read this: Scripting Basics
If you have a question problem, googling and searching are 110 % better than starting a thread, because there is a high chance the same problem was asked and answered.


Re: How can I get started on scripting? - Sandiel - 04.07.2013

Think about it, picture the outcome of the script, think about it again.
Think twice before you code, or you will end up coding twice before you think


Re: How can I get started on scripting? - thimo - 04.07.2013

Get a gamemode and open up the code. Try to understand every little piece of code. And Sandiel I'm a retard i mostly do everything twice XD


Re: How can I get started on scripting? - Deathstalker - 04.07.2013

The wiki has a lot of helpful things, and the tutorial section on this forum.


Re: How can I get started on scripting? - Zigonja - 04.07.2013

You can start with simple Hello World! scripts, and I suggest you to start on filterscripts.

One Example
You get those public blabla(); clicking NEW in pawno
pawn Код:
//At the top ~ "//" means comment
#include <a_samp>

#define FILTERSCRIPT

public OnFilterScriptInit()
{

    print("\n--------------------------------------");
    print(" | Filterscript name LOADED   |");
    print("--------------------------------------\n");
        return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
        if(!strcmp(cmd, "/givecard"))
        {
                SendClientMessage(playerid, -1, "Hello World!");
        }
        return 1; //this is needed or it gives unknown command
}
When you start understanding you check wiki and it's easey


Re: How can I get started on scripting? - Sandiel - 04.07.2013

Quote:
Originally Posted by thimo
Посмотреть сообщение
Get a gamemode and open up the code. Try to understand every little piece of code. And Sandiel I'm a retard i mostly do everything twice XD
Well you're a retard with an awesome PC setup so doesn't really matter
ON TOPIC: open pawno, blank script, dive into the sea of scripting, learn yourself, wiki could be of great assistance.


Re: How can I get started on scripting? - Akira297 - 04.07.2013

I advise you to look up tutorials and look around on SA:MP Forums tutorial section. Those tutorials are the best.


Re: How can I get started on scripting? - Guest123 - 05.07.2013

starting by learning..


Re: How can I get started on scripting? - Goldilox - 05.07.2013

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