Jump to content

Scripting ASI


Recommended Posts

Good morning, afternoon, evening, night, wherever you are!

A friend of mine has recently suggested me to start ASI scripting. I told him: Good idea, why not? I started googling for tutorials and ASI basics, but unfortunartely I could not find a single tutorial.

I have scripted for 3 years in PAWN, so literally this must be easier for me to learn as I already manage a scripting language.

If you can help me any further by providing tutorials or posting them here; you're welcome!

Yours,

Jochem

PS: Some people might know me - I am Jochemd from the SA-MP Forums.

[center][img]http://i.imgur.com/Pps7g.png[/img][/center]

Link to comment
Share on other sites

Edit: Misunderstood!

I am now downloading Visual Basic - are there tutorials out there? I found the example scripts in the package includes with .NET scripthook. I want to start off with simply creating a checkpoint which warps you into the bank.

Since I know pawn, isn't it better to go with C++?

Edited by Jochemd

[center][img]http://i.imgur.com/Pps7g.png[/img][/center]

Link to comment
Share on other sites

Glad you took my advice. (: You should start with small things, e.g. enterable interiors. Like the bank of Liberty.

I need tutorials to start learning this all

[center][img]http://i.imgur.com/Pps7g.png[/img][/center]

Link to comment
Share on other sites

  • Management Team

Please note that .ASI is only a renamed DLL file that is loaded into the game's memory by so called ASI-Loaders. There is no such thing as ASI scripting. If you prefer C++, the C++ ScriptHook provides you with an easy to use interface to run your own game thread and call functions of the game's scripting engine, so called native functions. If you however prefer an objected oriented and probably more intuitive approach, try the .NET ScriptHook. Both, the C++ ScriptHook and the .NET ScriptHook ship with basic examples. Whatever you choose, note that you are NOT using a scripting language, but a real programming language that can communicate with the rage scripting engine. So it's best to learn the language basics first, before starting to use the language to run a gta script.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

Right, I'll learn the basics. I planned to do C++ and not the .NET things, because I'm familliar with PAWN which is based on the C language.

[center][img]http://i.imgur.com/Pps7g.png[/img][/center]

Link to comment
Share on other sites

Is Pawn actually based on C, or does it just have C-like syntax? There are actually fairly big differences between C and C++, and C# also has C-like syntax.

Link to comment
Share on other sites

If you would like to see an example of PAWN, see this -> http://pastebin.com/raw.php?i=nHCTpFxC

But C++ must be scripted in visual basic? Or...

[center][img]http://i.imgur.com/Pps7g.png[/img][/center]

Link to comment
Share on other sites

  • Management Team

PAWN is a bastardisation of C/C++ that compiles into it's own bytecode, is run in it's own virtual machine and is used only by one notable program in existence.

Visual Basic and C++ are two entirely different things.

Before starting, you may want to research both object oriented coding and C++ in-depth, and make a small program in both languages before jumping into GTA programming.

Look at current examples and play around with them.

Imitation is the sincerest form of flattery.

Link to comment
Share on other sites

You can also use C#, which is functionally equivalent to VB but looks and feels C-like.

All good - sorry for all these posts and questions - but can I script it in Notepad++?

Edited by Jochemd

[center][img]http://i.imgur.com/Pps7g.png[/img][/center]

Link to comment
Share on other sites

You can write the code in any text editor, including Notepad++, Notepad, vim, ed, magnetic needle, butterflies, etc. SHDN will run uncompiled scripts (just drop in the .cs or .vb file), but if you want to compile for speed reasons, you probably want Visual Studio to compile it. Fortunately, there is an Express Edition that is somewhat more feature-limited, but fine for GTA modding, and is free. I've also heard of a free software VS alternative called SharpDevelop.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...