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.

Visual Studio 2010

Featured Replies

Well, I think that program is for making scripts for GTA IV, or VB scripts and all that good stuff isn't it?

I had Visual Studio 2010 Ultimate and I guess I will start working on it just to make some scripts(I will try lol , looks hard).

So any good tutorials you would recommend me? Or anything else you would recommend me?

  • Replies 25
  • Views 3.7k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Interference
    Interference

    Tutorials on the internet... all are EXTREMELY BORING and UNINFORMATIVE. You should take classes in real-life. You could also try downloading .NET Scripthook again and you will see a folder "For DEVS"

  • Visual Basic is a good programming language for beginners (hence the word basic in the name, and visual because the program shows you where your mistakes are), but G17 does not use VB for their mod, n

  • Sniper296
    Sniper296

    There is a good tutorial here. Ignore the people who say C♯ is hard, they just went for VB because they were too lazy to learn C♯, it is harder than VB, the above tutorial gives some good info for

Tutorials on the internet... all are EXTREMELY BORING and UNINFORMATIVE. You should take classes in real-life. You could also try downloading .NET Scripthook again and you will see a folder "For DEVS" or something, it contains example scripts.

Writing new scripts

You should extract the "for Coders" folder from this archive to any folder you want. It contains example projects for you to start with. You could just edit the vb or cs script files with Notepad and copy the resulting script to the "scripts" subfolder of your GTAIV directory.

You can use the Class Reference Documentation to find out which classes or methods are available.

However, coding will be MUCH more comfortable and easy if you use Visual Studio 2010 to edit your scripts. Look below for a free download. Open the SLN Project files with Visual Studio to get ready-to-compile script examples. Use those examples as a base for your own scripts.

If you want to create a completely new VS project, make sure that you add a reference to the included ScriptHookDotNet.dll.

This file is ONLY required for coding. On runtime, your scripts will automatically use the ScriptHookDotNet.asi that is located in your GTAIV directory. Thus you don't need to bundle your script with one of those files when you want to release it. If you don't want to release the plain vb or cs script files, you can use the compiled DLL. You just have to make sure that the file ends to ".net.dll" or just ".net"!

If a script does not run, take a look at the logfile ScriptHookDotNet.log . It will write down all errors that occur during compiling or runtime.

Do NOT include ScriptHookDotNet.asi or ScriptHookDotNet.dll or ScriptHook.dll in the release of your script! Link to this thread instead!

- Free Visual Studio Express 2010 downloads (registration is free too)

[center][url="http://styragressor.tumblr.com/post/33331898333"][img]http://i.imgur.com/b2aNE.gif[/img][/url][/center]

Visual Basic is a good programming language for beginners (hence the word basic in the name, and visual because the program shows you where your mistakes are), but G17 does not use VB for their mod, nor do most professional application developers. I believe G17 use a variant of 'C'. C#, if I remember correctly. The language most commonly used in big time applications for full scale development is C++. You can also try experimenting with JavaScript, as the syntax is very similar to C++, making it easier to adapt. You also might consider trying web scripting before anything else. Learn ActionScript, learn PHP, CSS, Java, stuff like that.

Edited by unr3al

Tips/Donate: u.gamecaster.com/unr3al
Twitch Channel: Twitch.tv/unr3al_twitch
YouTube Channel: YouTube.com/unr3algaming
Twitter: @unr3alofficial

  • Author

Yeah... I already know HTML and CSS, took a class about that. ActionScript i have flash CS5 and i've made some games.

Well If i can make scripts for GTA IV with VB then that's what I was looking for basically, that's good!

Thank you both, you gave me a place to start thumbsup.gif

I think they use C++, hence why you have to install the C++ libraries when you install the mod.

Due to the graphic nature of this post, reader discretion is advised.
lspdfrsig2njsuy.jpg

  • Management Team

LCPDFR is pretty weird as in it's coded in VB.NET, C# and Managed C++.

AdvancedHook is in C++, because it does some freaky memory shit that you can't do in .NET.

The project was started in VB.NET, but then we ported most of it in C#. The new engine uses C#.

We still have some legacy code that's in VB.NET, however, and both the VB.NET and C# projects are fused during compilation to provide the final DLL.

Bottom line is VB alone won't do it for any substantial applications like games or highly functional programs like big business or general consumer applications by itself. But it is a good launching point.

Tips/Donate: u.gamecaster.com/unr3al
Twitch Channel: Twitch.tv/unr3al_twitch
YouTube Channel: YouTube.com/unr3algaming
Twitter: @unr3alofficial

Try learning C♯ before going to the easier VB, and as unr3al said try learning other languages first, the similarities in some will help you in the others.

I learned HTML, CSS, PHP, ActionScript 2, JavaScript, ActionScript 3, NSIS, C♯; in that order, and am in the progress of learning C++.

You are using the WRONG right theme!

[ WIPs | Donate | 🌌 Join Mod Multiverse!]
Flashing LED lightbar in British configuration

  • Author

Well I made a simple Area Calculator (Like Rectangle : l*w, Square : L^2, Triangle: etc etc) And it's good I would say(I'm gonna keep it for Math lol). And I already know HTML CSS and AS2 like I said , but VB isn't that hard. It's just that there's few or no tutorials at all about GTA IV.

I saw one and the only thing that it taught was to go to the Scripts in for Developers folder from Scripthook, and teach you to change "INFERNUS" for "BANSHEE" so when you pressed the key the Banshee would spawn instead of the Infernus... pretty absurd IMO

I'd like to learn C# before VB , but many people say it's very hard, so I don't really know. Visual Studio 2010 has C#, C+, C++ and VB but I don't really know lol.

One last thing, where are the classes of GTA IV? I tried looking for them In the scripthook folder but no luck.

Edited by xGessx

There is a good tutorial here.

Ignore the people who say C♯ is hard, they just went for VB because they were too lazy to learn C♯, it is harder than VB, the above tutorial gives some good info for those who have never written in C♯ before, you should be able to browse the classes after creating a project and adding ScriptHookDotNet to the References list, then you can browse the classes in the Object Browser.

A good thing to do is to do these four tutorials, they are more for the Windows Forms application side but will help.

You are using the WRONG right theme!

[ WIPs | Donate | 🌌 Join Mod Multiverse!]
Flashing LED lightbar in British configuration

  • Author

VERY HELPFUL , Sniper a lot, I'm gonna read that for sure.

Also just one more thing:

I opened C# menu, but I'm not really used to this GUI(Only to Adobe GUI lol) so which do I select from these to make a GTA IV Script?

SS:

unled1nq.png

There's more but those 2 were the more logical IMO, I don't really know lol.

Edit: Assembler language? I saw that but it says that's it's for CPU and stuff like that, more like stuff inside the computer?

Other edit: I added this into the first lines (PS: I chose C# Class Library)

using System;

using System.Windows.Forms;

using GTA;

I figured out how to add reference for the classes, i added the ScriptHookDotNet.dll as it. Thanks Sniper

That's what the sample scripts in for Developer have in the beginning.

Edited by xGessx

  • Management Team

Yeah, Class Library is the one to choose. And about assembler, it's used to interact with GTA like replacing some GTA code with our code or using some GTA code because we only have the assembler code of GTA.

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

I did it like this, File -> New Project -> Visual C# -> Class Library

The usings are

using System;

using System.Drawing;

using System.Windows.Forms;

using GTA;

Then, Project -> Add Reference -> .NET -> select both System.Drawing & System.Windows.Forms, then Project -> Add Reference -> Browse and browse to the for Developers\bin folder and select ScriptHookDotNet.dll

Then, Project -> YourProjectName Properties -> add .net to the end of the Assembly Name

You are using the WRONG right theme!

[ WIPs | Donate | 🌌 Join Mod Multiverse!]
Flashing LED lightbar in British configuration

  • Author

In the link that Sniper gave me, I been studying it for some big time and came up with something...

The only thing that It doesn't really explain is how to put an .ini file to re-configure keys.

It does explain the interval, but not the keys

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using GTA;



namespace WashScriptIV

{

    public class WashScript : Script

    {

        //Constructor

        public WashScript()

        {

            this.KeyDown += new GTA.KeyEventHandler(washButton);

        }

        //If player is in vehicle and M key has been pressed , wash his vehicle

        //Method

        public void washButton(object sender, GTA.KeyEventArgs e)

        {

            

            if (Keys.M == e.Key && Player.Character.isInVehicle()){

                Player.Character.CurrentVehicle.Wash();

                Game.DisplayText("Your car has been washed");

            }

        }

    }

}






It said put above the constructor 

Keys keyP;



Then in the constructor itself 



keyP = Settings.GetKeyValue ("WASHKEY" , "SETTINGS", Key.M);



Then I created an .ini file with this



[sETTINGS]

WASHKEY = N



Tried with N but no luck, only  worked with M.





So basically i had this at the end and nothing




using System.Linq;

using System.Text;

using System.Windows.Forms;

using GTA;



namespace WashScriptIV

{

    public class WashScript : Script

    {

        Keys keyP;

        //Constructor

        public WashScript()

        {

            this.KeyDown += new GTA.KeyEventHandler(washButton);

            keyP = Settings.GetValueKey("WASHKEY", "SETTINGS", Keys.M);

        }

        //If player is in vehicle and M key has been pressed , wash his vehicle

        //Method

        public void washButton(object sender, GTA.KeyEventArgs e)

        {

            

            if (Keys.M == e.Key && Player.Character.isInVehicle()){

                Player.Character.CurrentVehicle.Wash();

                Game.DisplayText("Your car has been washed");

            }

        }

    }

}

Edit: Just in case name of .net is WashScript.net.dll and .ini file is WashScript.ini

Anyone?

Thanks in advance

Edited by xGessx

if (Keys.M == e.Key && Player.Character.isInVehicle()){

I'm not a VB knowledgeable, but shoudn't it be if(keyP == blablabla)

[center][url="http://styragressor.tumblr.com/post/33331898333"][img]http://i.imgur.com/b2aNE.gif[/img][/url][/center]

  • Author

if (Keys.M == e.Key && Player.Character.isInVehicle()){

I'm not a VB knowledgeable, but shoudn't it be if(keyP == blablabla)

Mmm.... I was thinking on doing that, I'll try thumbsup.gif

Yep, it was that, thanks!

Another thing, this doesn't work in EFLC, any idea why? I don't think i have to put using EFLC ; or something like that because If i do it says it's wrong.

Edited by xGessx

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.