Jump to content

Grand Theft Auto V Mod Maker Tutorial


AbelSoftware

Below, I will try and walk you through of how to make your first script in my mod creator.

1)To begin, we want to load the program up and be sure to have the "Coding Help Tool" open.

**If you wish, clear all text from the box and paste this,

-- Mod Name by Author, v1
local modname = {}

function modname.tick()
local playerID - PLAYER.PLAYER_ID()

2) We will first add a title for the mod, I'm going to call mine Tutorial. Replace all the modname with the name you want the mod to go by.

3)  under "local playerID - PLAYER.PLAYER_ID()" we are going to begin the mod. For today's mod example I'm going to give the player godmode, a 5 star wanted level, and unlimited ammo with three different keys.

4) We will choose the key we want the user to press to enable Godmode, I'm going to use F4. After choosing the key from the coding help window, select the function or item you want the key to enable or do. For mine, I used "Player Invincible"

5) To end this function of the mod, we will then press the button from the coding help window that says End "If..." Statement

Your script should now look something like this

-- Tutorial by Author, v1
local Tutorial = {}

function Tutorial.tick()
local playerID - PLAYER.PLAYER_ID()

if get_key_pressed(Keys.F4) then
PLAYER.SET_PLAYER_INVINCIBLE(player, true)
end

6) We will now add the wanted level to the player. I want the user to press F5 to enable the wanted level. I will find the F5 button on the coding help window and press it.

7) Next, I will will select the button that says "5 Star Wanted Level"

8) To end this function of the mod, we will then press the button from the coding help window that says End "If..." Statement

Your script should now look something like this

-- Tutorial by Author, v1
local Tutorial = {}

function Tutorial.tick()
local playerID - PLAYER.PLAYER_ID()

if get_key_pressed(Keys.F4) then
PLAYER.SET_PLAYER_INVINCIBLE(player, true)
end

if get_key_pressed(Keys.F5) then
PLAYER.SET_PLAYER_WANTED_LEVEL(player, 5, true)
end

9) For the last part of this mod, I want the player to have unlimited ammo. I want the user to be able to press F9 to enable unlimited ammo.

10) Find the "If F9 Is Pressed" button in the coding help window and press it

11) Next, find "Infinite Ammo" button in the coding help window and press it

12) To end this function of the mod, we will then press the button from the coding help window that says End "If..." Statement

Your script should now look something like this

-- Tutorial by Author, v1
local Tutorial = {}

function Tutorial.tick()
local playerID - PLAYER.PLAYER_ID()

if get_key_pressed(Keys.F4) then
PLAYER.SET_PLAYER_INVINCIBLE(player, true)
end

if get_key_pressed(Keys.F5) then
PLAYER.SET_PLAYER_WANTED_LEVEL(player, 5, true)
end

if get_key_pressed(Keys.F9) then
WEAPON.SET_PED_INFINITE_AMMO_CLIP(playerPed, true)
end

We now need to end the script!

13) If you have closed the coding help tool, re-open it

14) Find the button in the coding help window that reads "End Script"

15) Press it

16) Make sure you replace modname with the name of the mod you chose.

Your final script should look like this

-- Tutorial by Author, v1
local Tutorial = {}

function Tutorial.tick()
local playerID - PLAYER.PLAYER_ID()

if get_key_pressed(Keys.F4) then
PLAYER.SET_PLAYER_INVINCIBLE(player, true)
end

if get_key_pressed(Keys.F5) then
PLAYER.SET_PLAYER_WANTED_LEVEL(player, 5, true)
end

if get_key_pressed(Keys.F9) then
WEAPON.SET_PED_INFINITE_AMMO_CLIP(playerPed, true)
end

end
return Tutorial

Exporting Your Script

1) Go back to the main window with the code

2) Click File in the corner

3) Click on Export Script (Or press Control+E in V4.0)

4) Save it in the location of your choice; however, be sure it is all one word!!

Click the letters below to download my script! Version 4 of Mod Maker includes "Import Scripts" feature!

Tutorial.lua

 



User Feedback

Recommended Comments



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×