Scripting
-
Hi!
i want to start making my own scripts for gta singleplayer but i have no experience with gta modding..
is there someone who could help me starting my gta modding career?
-
@Herrahaamu You need to have a basic understanding of programming, and the most commonly used GTA5 modding programming language which is C# dot net.
You need to install Visual Studio as an IDE.
If you're not familiar with VS and/or programming in general, start with a basic course covering both that software and C#.
You can also program in VB.net, I use both.
Unfortunately, no free rides when it comes to scripting and very little support on the forums and not much on the web either.
-
@JohnFromGWN thank you for your answer
im familiar with c# and visual studio but i dont know how to start with gta modding like what .net versio i should use and what kind of references i should use?
-
@Herrahaamu you need the modding essentials and for programming you need SHVDN, use 3.
https://github.com/crosire/scripthookvdotnet/releases
Then Google for a tutorial.
Post Here for further help.
-
@JohnFromGWN Thank you!
one question.. is there any list of APIs or all functions or all things that i can use for my script
-
https://alloc8or.re/gta5/nativedb/
Here's a simple script, or excerpt, to give you a feel.
using System.Windows.Forms; using GTA; using GTA.Math; using GTA.Native; namespace PedStuff { public class Basics : Script { public static Ped PP = Game.Player.Character; public static Ped CurrentPed { get; set; } public Basics() { KeyUp += Basics_KeyUp; } private void Basics_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.NumPad1) //Pickup a chick, you can be walking or in your car. Good looking chicks may reject you. { Vector3 PlayerPosition = Game.Player.Character.GetOffsetPosition(new Vector3(0.0f, 10f, 0.0f)); Ped ClosestPed = World.GetClosestPed(PlayerPosition, 15.0f); if (ClosestPed.Exists() && ClosestPed != Game.Player.Character && ClosestPed.IsAlive && Function.Call<int>(Hash.GET_PED_TYPE, ClosestPed) == 5) { CurrentPed = ClosestPed; PedGroup PlayerGroup = Game.Player.Character.PedGroup; Function.Call(Hash.SET_PED_AS_GROUP_MEMBER, CurrentPed, PlayerGroup); CurrentPed.IsPersistent = true; Function.Call(Hash.SET_PED_NEVER_LEAVES_GROUP, CurrentPed, true); } } } } }
-
@JohnFromGWN Thank you!
if i want to make like uber driver script or some job script then i use that what you gave me?
-
@Herrahaamu unfortunately it's much more complicated than that. Just gave you a very simple example of references and code.
-
@JohnFromGWN hey! i am making atm my own uber driver script and i have some problem and one of them is World.GetNextPositionOnSidewalk customer wont appear to the location where it should spawn