Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Scripting ASI

Featured Replies

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]

Unless you already know C++, use C# or VB and Scripthook .NET. It's much more similar to scripting languages. Unless you already know it, C++ will make you cry.

  • Author

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]

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

[url=http://www.gtagaming.com/downloads/author/145769]sy10Oxj.png[/url]

CLICKY

  • Author

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]

  • 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.

  • Author

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]

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.

  • Author

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]

  • 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.

  • Author

Good. I suppose I have to download Visual Studio 2010 then.

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

  • Author

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]

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.

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...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.