Home GTA 5 MODS How to make a C# Script Mod for Grand Theft Auto V...

How to make a C# Script Mod for Grand Theft Auto V ?

How to make a C# Script Mod for Grand Theft Auto V ?

This tutorial is using Grand Theft Auto V – Mod Creator

Before starting, please install the tool and ensure you have all of the files.

The first step is to name your mod, this is going to be the name of your Class, and Namespace (for more information on classes & namespaces.

- Advertisement -

Replace the following with your mod name:

namespace ModName

Next, replace these:

        string ModName = "MOD NAME";
        string Developer = "YOUR NAME";
        string Version = "1.0";

In most cases, you will not need to change the Version, but feel free to do whatever you want.

We will be making a simple bodyguard script.

To start, lets insert a key press.
We will use the KeyDown tool.
Navigate to Insert –> KeyDown

Ensure that your cursor is inside of the “onKeyDown” method

Type your desired key and press “KeyDown”. This will insert a new if statement (For information on if statements, )

Now lets create your bodyguard inside of the GTA V game world.
To do this you will need to write some code yourself.
Before we continue, we need to have our player and playerPed variables. (For information on variables,)
To do this, you can use the Player tools.
Navigate to Insert –> Player –> player Variable
You also need the playerPed variable
Navigate to Insert –> Player –> playerPed Variable


Your code should now look something like this


Now, lets spawn the bodyguard.
You will be using the World.CreatePed() method. (For information on methods/functions, )
Insert the following code to your script:

Ped bodyguard = World.CreatePed(new Model(PedHash.Armoured02SMM), playerPed.Position);

We have now created the bodyguard at the players position and can mess with him using his variable bodyguard.
PedHash.Armoured02SMM is the bodyguard’s model hash, you can change this if you’d like.

Next step is to give him weapons, we will just give him a Pistol for now.
Insert the following code:

bodyguard.Weapons.Give(WeaponHash.Pistol, 9999, true, true);

This code gives the bodyguard a pistol with 9999 ammo. You can add more weapons if you would like, just copy and change the WeaponHash.

Now we need to give the bodyguard some armor.
You can use the Ped.Armor variable.

bodyguard.Armor = 100; // Armor ranges from 1-100

We’re almost done, we need to add the bodyguard to the players group so he protects the player.
We are using a native from the NativeDB here, using the GTA.Native.Function.Call() method

PedGroup playerGroup = playerPed.CurrentPedGroup; // gets the players current group
Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, bodyguard, playerGroup); // puts the bodyguard into the players group

You are gonna need to set the combat ability as well.

Function.Call(Hash.SET_PED_COMBAT_ABILITY, bodyguard, 100); // 100 = attack

The final step here is optional, but we are going to notify the player when a bodyguard is spawned.
We can use the tool Notify for this.
Navigate to Insert –> UI –> Notify


Feel free to change “Bodyguard spawned!” to whatever you like.

You’re done, to check, make sure your code looks similar to this:



Press File –> Save As… and navigate to your Grand Theft Auto V folder,
we need to put this file in the scripts folder, if you do not have this folder, create it.


Finally You Understand How to make a C# Script Mod for Grand Theft Auto V .

You May Also like




Please enter your comment!
Please enter your name here


We Give All Stuffs For Free Without Any Costs.

Contribute Whatever You Have To Make This Site Active Forever !!!

Your Contributions Makes us To Work Even More Harder For You Guys .

Paypal Donations

Most Popular Posts

Need for Speed Heat Deluxe Edition Pc Game Repack [ 22.9 GB ] Download + NFS Heat English Language Patch [ Updated ] +...

Download Need for Speed Heat Deluxe Edition is ADDED Now With Need for Speed Heat Deluxe Edition pc game download . Download  Need for Speed...

Fifa 2020 Repack [ 38 GB ] + Update 10 + FIFAXXIMs Mod 2020 v2.1+ Squad Update [ 28. 01.2020] + Fifa Infinity Patch...

Fifa 2020 Repack + Update 10 + FIFAXXIMs mod 1.1 + Squad Update and Download Fifa 2020 Pc Game Repack is Repacked...

FIFA 20 Ultimate Edition Full Unlocked Repack [ 37 GB ] + P2P Update 11 + FIFAXXIMs Mod 2020 v2.1+ Squad Update [ 28....

FIFA 20 Ultimate Edition Full Unlocked Repack + P2P Update 11 Download and Squad Update and Download fifa 20 ultimate edition crack...

Nordvpn Premium Accounts 2020 [ 750+ Accounts ] 

Download Nordvpn Premium Accounts 2020  . We Just Updated nordvpn premium account list 2019 December  In This Update nord vpn premium account login details. What...

PUBG Mobile Lite Mod APK v0.14.6 [Unlimited Health]

PUBG Mobile Lite is actually one of the best game console games that have been restructuring for Android. Also, enthusiasts can experience the game...