Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

IamJESUS

Could someone out of kindness make a guide to mod gta v?

Recommended Posts

IamJESUS

Hi I am a beginner at coding with c++ I know all the basics and I just dont get how to make a asi gta v mod

Edited by IamJESUS

Share this post


Link to post
Share on other sites
MrRobinson

Hey there! I was a beginner a few weeks ago and now I can code a lot of the stuff most experienced modders can!

 

So what I suggest is you don't jump straight into mod making itself. But jump into script creation.

 

I started modding in GTA V by using the LUA plugin then creating little scripts, getting help on this forum as I went along. SO...

 

Go HERE and install the LUA mod.

 

Once you've done that, get this program, called Notepad++

 

Once you finished the installation of Notepad++, find the shortcut/.exe to load the program.

 

Once inside the program go to, File > New.

 

Then go to THIS page where you can find all of the lets call them, commands that GTA have.

 

After that you can start to create so much cool stuff using them 'commands'

 

Here is a quick example of something posted on this forum that I have tweaked a little (credits go to the original creator);

local Monkey = {}Monkey.peds = {}Monkey.howMany = 0function Monkey.unload()	for k,guard in pairs(Monkey.peds) do		if( guard ~= nil) then			PED.DELETE_PED(guard)			Priest.peds[k] = nil		end	endend function Monkey.tick()	if(get_key_pressed(99)) then // Numpad 3		local MonkeySkinID = GAMEPLAY.GET_HASH_KEY("a_c_chimp")		local playerPed = PLAYER.PLAYER_PED_ID()		local player = PLAYER.GET_PLAYER_PED(playerPed)		local playerID = PLAYER.PLAYER_ID()		local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)		local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)		local playerGroup = PED.GET_PED_GROUP_INDEX(playerPed)		Priest.unload()		STREAMING.REQUEST_MODEL(MonkeySkinID)		while(not STREAMING.HAS_MODEL_LOADED(MonkeySkinID)) do				wait(50)		end		for i = 0 ,Monkey.howMany,1 do			Monkey.peds[i] = PED.CREATE_PED( 26,MonkeySkinID,playerPosition.x, playerPosition.y, playerPosition.z,1,false,true)				PED.SET_PED_CAN_SWITCH_WEAPON(Monkey.peds[i],false)			WEAPON.GIVE_WEAPON_TO_PED(Monkey.peds[i], GAMEPLAY.GET_HASH_KEY("WEAPON_MARKSMANRIFLE"), 1, false, false)			PED.SET_PED_COMBAT_ABILITY(Monkey.peds[i], 2)			PED.SET_PED_AS_GROUP_MEMBER(Monkey.peds[i], playerGroup)			ENTITY.SET_ENTITY_INVINCIBLE(Monkey.peds[i], true);		end		STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(MonkeySkinID)	end	 end return Monkey

This will when you press the key 'Numpad 3' spawn 2 pedestrians (Monkeys) with rifles and will follow you around and will shoot at anything that attacks you / you attack..

 

 

 

 

 

 

What I suggest is learn this because its not much different from ASI, and when you're good at this, then you move on to ASI creations :D

 

 

HOPE THIS HELPS!

Edited by MrRobinson

Share this post


Link to post
Share on other sites
kmcgurty1

Hey there! I was a beginner a few weeks ago and now I can code a lot of the stuff most experienced modders can!

 

So what I suggest is you don't jump straight into mod making itself. But jump into script creation.

 

I started modding in GTA V by using the LUA plugin then creating little scripts, getting help on this forum as I went along. SO...

 

Go HERE and install the LUA mod.

 

Once you've done that, get this program, called Notepad++

 

Once you finished the installation of Notepad++, find the shortcut/.exe to load the program.

 

Once inside the program go to, File > New.

 

Then go to THIS page where you can find all of the lets call them, commands that GTA have.

 

After that you can start to create so much cool stuff using them 'commands'

 

Here is a quick example of something posted on this forum that I have tweaked a little (credits go to the original creator);

local Monkey = {}Monkey.peds = {}Monkey.howMany = 0function Monkey.unload()	for k,guard in pairs(Monkey.peds) do		if( guard ~= nil) then			PED.DELETE_PED(guard)			Priest.peds[k] = nil		end	endend function Monkey.tick()	if(get_key_pressed(99)) then // Numpad 3		local MonkeySkinID = GAMEPLAY.GET_HASH_KEY("a_c_chimp")		local playerPed = PLAYER.PLAYER_PED_ID()		local player = PLAYER.GET_PLAYER_PED(playerPed)		local playerID = PLAYER.PLAYER_ID()		local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)		local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)		local playerGroup = PED.GET_PED_GROUP_INDEX(playerPed)		Priest.unload()		STREAMING.REQUEST_MODEL(MonkeySkinID)		while(not STREAMING.HAS_MODEL_LOADED(MonkeySkinID)) do				wait(50)		end		for i = 0 ,Monkey.howMany,1 do			Monkey.peds[i] = PED.CREATE_PED( 26,MonkeySkinID,playerPosition.x, playerPosition.y, playerPosition.z,1,false,true)				PED.SET_PED_CAN_SWITCH_WEAPON(Monkey.peds[i],false)			WEAPON.GIVE_WEAPON_TO_PED(Monkey.peds[i], GAMEPLAY.GET_HASH_KEY("WEAPON_MARKSMANRIFLE"), 1, false, false)			PED.SET_PED_COMBAT_ABILITY(Monkey.peds[i], 2)			PED.SET_PED_AS_GROUP_MEMBER(Monkey.peds[i], playerGroup)			ENTITY.SET_ENTITY_INVINCIBLE(Monkey.peds[i], true);		end		STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(MonkeySkinID)	end	 end return Monkey

This will when you press the key 'Numpad 3' spawn 2 pedestrians (Monkeys) with rifles and will follow you around and will shoot at anything that attacks you / you attack..

 

 

 

 

 

 

What I suggest is learn this because its not much different from ASI, and when you're good at this, then you move on to ASI creations :D

 

 

HOPE THIS HELPS!

I suggest GTALua, it's much nicer to use http://www.freeschi.com/v/gtalua/

Share this post


Link to post
Share on other sites
Techdaan

GTALua is something I haven't been using, but if you want Lua I think GTALua is the way to go. If I want to have object-orientated and make the native functions able to be used in objects, I need to do much effort in doing so. For example, I can't have a simple way of having multiple Lua files without the loader loading all Lua files (Which is, believe me, a huge downside. You'll see one file is simply not enough, and other files used as plugins won't work either). The Lua plugin loader is nice, but needs polishing. It requires a Microsoft library (2013 Redist) and it also requires you to be better at Lua. I'd say it's the hardcore version of GTALua, not the way to go.

Share this post


Link to post
Share on other sites
Highjhacker

Hey, quick post about the ChimpBodyguards, I was testing a few things with it and I just see a weird "bug".

When you keep your key (numpad 3) pressed, you can see where the bodyguards are gonna spawn, but, if you have for example, a vehicule or an other entity on the same spot, the last entity will be destroyed to let the space for the chimps, I don't know if you can understand what I mean, my english is pretty bad and sorry for that. (And it's the same "bug" for the original bodyguard mod)

My guess is "If the spawn coords (x,y,z) isn't free, depop the current entity who's on it and replace it with the new entity"

Share this post


Link to post
Share on other sites
MrRobinson

Hey, quick post about the ChimpBodyguards, I was testing a few things with it and I just see a weird "bug".

 

When you keep your key (numpad 3) pressed, you can see where the bodyguards are gonna spawn, but, if you have for example, a vehicule or an other entity on the same spot, the last entity will be destroyed to let the space for the chimps, I don't know if you can understand what I mean, my english is pretty bad and sorry for that. (And it's the same "bug" for the original bodyguard mod)

 

My guess is "If the spawn coords (x,y,z) isn't free, depop the current entity who's on it and replace it with the new entity"

Its not my code, but if that happens then I suggest setting this line;

local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)

to;

local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 1.0, 0.0)

That will basically spawn them right on top of you. avoiding the vehicle despawning or whatever, I was playing with it and if you want more than 2 guards, make a CLONE_PED system

Share this post


Link to post
Share on other sites
Highjhacker

 

Hey, quick post about the ChimpBodyguards, I was testing a few things with it and I just see a weird "bug".

 

When you keep your key (numpad 3) pressed, you can see where the bodyguards are gonna spawn, but, if you have for example, a vehicule or an other entity on the same spot, the last entity will be destroyed to let the space for the chimps, I don't know if you can understand what I mean, my english is pretty bad and sorry for that. (And it's the same "bug" for the original bodyguard mod)

 

My guess is "If the spawn coords (x,y,z) isn't free, depop the current entity who's on it and replace it with the new entity"

Its not my code, but if that happens then I suggest setting this line;

local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)

to;

local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 1.0, 0.0)

That will basically spawn them right on top of you. avoiding the vehicle despawning or whatever, I was playing with it and if you want more than 2 guards, make a CLONE_PED system

 

 

Thanks for the advice ! But what do you mean by a CLONE_PED ? I understand the idea but i didn't find any native function named like that (or with the keyword "clone"), however, i found IS_ENTITY_TOUCHING_ENTITY(Entity p0, Entity p1) // 0x6B931477 , maybe usefull for our collision problem

Share this post


Link to post
Share on other sites
IamJESUS

could someone teach asi

Share this post


Link to post
Share on other sites
MrRobinson

 

 

Hey, quick post about the ChimpBodyguards, I was testing a few things with it and I just see a weird "bug".

 

When you keep your key (numpad 3) pressed, you can see where the bodyguards are gonna spawn, but, if you have for example, a vehicule or an other entity on the same spot, the last entity will be destroyed to let the space for the chimps, I don't know if you can understand what I mean, my english is pretty bad and sorry for that. (And it's the same "bug" for the original bodyguard mod)

 

My guess is "If the spawn coords (x,y,z) isn't free, depop the current entity who's on it and replace it with the new entity"

Its not my code, but if that happens then I suggest setting this line;

local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)

to;

local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 1.0, 0.0)

That will basically spawn them right on top of you. avoiding the vehicle despawning or whatever, I was playing with it and if you want more than 2 guards, make a CLONE_PED system

 

 

Thanks for the advice ! But what do you mean by a CLONE_PED ? I understand the idea but i didn't find any native function named like that (or with the keyword "clone"), however, i found IS_ENTITY_TOUCHING_ENTITY(Entity p0, Entity p1) // 0x6B931477 , maybe usefull for our collision problem

 

CLONE_PED just makes a copy of whatever you CREATE_PED

 

 

 

 

 

could someone teach asi

it Isn't something you just get taught, it takes weeks, months, years unless you have previous code understanding, for me, I am doing a A-Level (British Qualification) in Computer Science (Coding), So it took me a week with some research on the web to figure out how to do it. What I suggest is you learn the very basics of rather 'C' coding language OR 'C#' before you consider starting ASI :D

Edited by MrRobinson

Share this post


Link to post
Share on other sites
Highjhacker

Oh ok ! Didn't find him with CTRL + F, strange, thanks ! :D

Share this post


Link to post
Share on other sites
IamJESUS

not lua like asi for scripthook

Share this post


Link to post
Share on other sites
Ethenal

yes asi are DLL files which are written in C++ (or just C), C++ is not a simple programming language by any means (infact one of the most powerful out there) and you can spend years (as I have) learning how to use it without ever knowing it 100%

 

asking someone to "teach me asi" is like asking someone to teach you a 4 year programming course (not that I did take any classes on it, books ftw!)

Edited by Ethenal

Share this post


Link to post
Share on other sites
Heist83

The coords don't seem to work for me. Please help.

The car always spawns at me :

 

 

 

local SpawnMyGodDamnCar = {}SpawnMyGodDamnCar_key = 84  -- Tfunction SpawnMyGodDamnCar.tick()    local playerPed = PLAYER.PLAYER_PED_ID()    local player = PLAYER.GET_PLAYER_PED(playerPed)    local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)    if(playerExists) then        if(get_key_pressed(SpawnMyGodDamnCar_key)) then            local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 6.0, 0.0);            local GodDamnCARskinID = GAMEPLAY.GET_HASH_KEY("dukes2")            wait(20)            STREAMING.REQUEST_MODEL(GodDamnCARskinID)            local GodDamnCar = VEHICLE.CREATE_VEHICLE(GodDamnCARskinID, coords.x, coords.y, coords.z, 0, true, true)            VEHICLE.SET_VEHICLE_DOOR_OPEN(GodDamnCar, 0, false, true)            VEHICLE.SET_VEHICLE_CAN_BREAK(GodDamnCar, false)            VEHICLE.SET_VEHICLE_ENGINE_CAN_DEGRADE(GodDamnCar, false)            VEHICLE.SET_VEHICLE_TYRES_CAN_BURST(GodDamnCar, false)            VEHICLE.SET_VEHICLE_WHEELS_CAN_BREAK(GodDamnCar, false)            ENTITY.SET_ENTITY_INVINCIBLE(GodDamnCar, true)            wait(200)        end    endendreturn SpawnMyGodDamnCar

 

 

 

Shouldn't it spawn 6 units in front of me ? What's wrong ?

Edited by Heist83

Share this post


Link to post
Share on other sites
thunder_
it Isn't something you just get taught, it takes weeks, months, years unless you have previous code understanding, for me, I am doing a A-Level (British Qualification) in Computer Science (Coding), So it took me a week with some research on the web to figure out how to do it. What I suggest is you learn the very basics of rather 'C' coding language OR 'C#' before you consider starting ASI :D

 

ASI isn't a programming language, nor do you 'code ASI'. All an ASI file is a renamed compiled DLL. Saying he should consider to learn C or C# before doing ASI is ignorant, considering those are the languages that compile into ASI.

Share this post


Link to post
Share on other sites
MrRobinson

The coords don't seem to work for me. Please help.

The car always spawns at me :

 

 

 

local SpawnMyGodDamnCar = {}SpawnMyGodDamnCar_key = 84  -- Tfunction SpawnMyGodDamnCar.tick()    local playerPed = PLAYER.PLAYER_PED_ID()    local player = PLAYER.GET_PLAYER_PED(playerPed)    local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)    if(playerExists) then        if(get_key_pressed(SpawnMyGodDamnCar_key)) then            local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 6.0, 0.0);            local GodDamnCARskinID = GAMEPLAY.GET_HASH_KEY("dukes2")            wait(20)            STREAMING.REQUEST_MODEL(GodDamnCARskinID)            local GodDamnCar = VEHICLE.CREATE_VEHICLE(GodDamnCARskinID, coords.x, coords.y, coords.z, 0, true, true)            VEHICLE.SET_VEHICLE_DOOR_OPEN(GodDamnCar, 0, false, true)            VEHICLE.SET_VEHICLE_CAN_BREAK(GodDamnCar, false)            VEHICLE.SET_VEHICLE_ENGINE_CAN_DEGRADE(GodDamnCar, false)            VEHICLE.SET_VEHICLE_TYRES_CAN_BURST(GodDamnCar, false)            VEHICLE.SET_VEHICLE_WHEELS_CAN_BREAK(GodDamnCar, false)            ENTITY.SET_ENTITY_INVINCIBLE(GodDamnCar, true)            wait(200)        end    endendreturn SpawnMyGodDamnCar

 

 

 

Shouldn't it spawn 6 units in front of me ? What's wrong ?

local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 6.0, 0.0);

That spawns it 6 grid lines away from you (not far)

 

if you want to set it to spawn at a certain place go HERE and then replace the coords. For Example if I wanted to spawn something on top of the Maze Bank roof. I would write this;

local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, -324.300, -1968.545, 67.002);

If the coords you want aren't on there. Get THIS .asi mod which shows your coords, and go to the place you want to spawn it

 

NOTE: IF YOU'RE TO FAR AWAY THE CAR WON'T SPAWN, YOU WILL HAVE TO MAKE A RANGE FINDER.

Share this post


Link to post
Share on other sites
MrRobinson

could someone teach asi

Its not easy to learn, use THIS, as help to start learning. But to open that you need VISUALS

 

 

Once you downloaded Visuals, go to File > Open > Navigate to where you extracted The ScriptHookV_SDK. > Go into "samples" > Double click "Native Trainer" > Open up the "script.cpp" and thats a hole load of code for the famous Native Trainer. use that to help make mods.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.