fredag 10 juli 2015

How to make scripts for GTA V PC

Scripting mods for GTA V is actually quite easy. I will show you how to create some neat stuff. First, let's watch this GTA V scripting tutorial made by Johnny Manson, about how to get started and making your first script.


Johnny is directly using C++ to code with. You can also add scripts that let you write in .NET and LUA. In this tutorial we will only write in C++

So, Jonny gave us a template to start with. I made it even smaller and you can check it out here: code.
Mods are of course usually larger. You can remove the line "PED::SET_PED_CAN_BE_DRAGGED_OUT(playerPed, false);" and replace with something else.
Download the latest Script Hook SDK and replace everything in the file "script.cpp" with the contents of code.

Before you TAB down from the game to make changes in your code in visual studio, hold CTRL and press R. A small beep will sound which means that all mods are inactivated. You can now create a new version of your mod and replace the old one with it. When you're done press CTRL+R again to reload all your mods. You should hear three beeps. Note that for this to work you need an empty file named "ScripthookV.dev" in your game folder.

When you start scripting you need some sources and information about how to do different things. The above all most important source is Alexander Blades http://www.dev-c.com with the native database /nativedb/. Not everything is known about how functions work or which parameters are used. Sometimes you need to guess or try and error.

When your mod is ready for it's first release you can publish it on sites like gta5-mods.com and gtainside.com.

In the next post we will look into how to read and write to configuration files (.ini).





1 kommentar:

  1. Wynn Slots for Android and iOS - Wooricasinos
    A free app for worrione slot machines goyangfc.com from wooricasinos.info WRI Holdings Limited that lets www.jtmhub.com you play gri-go.com the popular games, such as free video slots, table games and live casino

    SvaraRadera