How to Install Mods and Scripts

To run scripts, you will need to create a folder called Scripts (or scripts) inside your game folder.
You can read about this in the included guide.
It is in the subfolder of this app called Tutor/Guides:

img03

The SHVDN Basic Template

using GTA;
using GTA.Native;
using System;
using System.Windows.Forms;

namespace YourNameSpace
{
    public class Basic : Script
    {      
        public Basic()
        {
            Tick += OnTick;
            KeyDown += OnKeyDown;
            KeyUp += OnKeyUp;
        }

        private void OnTick(object sender, EventArgs e)
        {
           // code goes here
        }

        private void OnKeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.T)
            {
               // code goes here
            }
        }

        private void OnKeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Z)
            {
               // code goes here
            }
        }
    }
}

             

Our First Script

Our First Script - The Code

       
using GTA;
using System.Windows.Forms;

namespace YourNameSpace
{
    public class Basic : Script
    {      
        public Basic()
        {
            KeyDown += OnKeyDown;
        }

        private void OnKeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Z)
            {
                GTA.UI.Screen.ShowSubtitle("Hello World", 2500);
            }
        }            
    }
}
      
            

Requirements and Resources

Visual Studio Demo

The location for your compiled script, as a .dll, will be just above the build results, at the bottom of the Visual Studio screen. Watch the video for the Build event.

Send Script Directly to Scripts Folder

If you want to have your compiled script, as a .dll file, go directly into your GTA V Scripts folder:
1. From Visual Studio Menu (very top) select Project
2. Select the last option which will be your ProjectName, Properties.
3. Click on Build Events
4. Go to the lower box entitled Post-build event command line
5. Enter this line, adjusting for your path:
COPY "$(TargetPath)" "P:\SteamLibrary\steamapps\common\Grand Theft Auto V\Scripts"

This will place your script in the folder above, ready for gameplay.

The V means Five - Talk the Talk

Source Link for this Video