Hi everyone.
As far as I know, GTA V natives invoker already ported to PS4 and can only be injected into the game process to make it works and to call the native function. To be honest, I don't like to use a mod menu for a couple of reasons (that's no matter), last week I was working on RPC function that can serve our purpose to call native remotely using desktop tools as we already have on PS3.
Most of you if not all (developers) know the awesome and huge header file which is natives.h by Alexander blade and his team for GTA V, so I just converted all the functions listed in the nativedb to C# file. now c# developers able to call over 2000 natives that rely on the RPC.cs, this will be good for (desktop app developers, testers, etc)
RPC class made on top of the PS4Lib.dll and it's only valid for GTA V. and the first argument of Call method can be either native hash or the function address.
Also I made the GTANatives dll to make it easier for people, only reference it in your C# project and you're ready to go.
Download: GTA5-Native-Caller-master.zip / GIT
GTANatives
GTA 5 Library for PS4 to create desktop tools. This library allows you to call over 2000 native functions that can be found here Nativedb
Brief Example:
Enable RPC
Call function (Thread Safe)
Demo that referenced GTANatives.dll
More examples included in the project repository (GTA demo)
How to use for developers:
As far as I know, GTA V natives invoker already ported to PS4 and can only be injected into the game process to make it works and to call the native function. To be honest, I don't like to use a mod menu for a couple of reasons (that's no matter), last week I was working on RPC function that can serve our purpose to call native remotely using desktop tools as we already have on PS3.
Most of you if not all (developers) know the awesome and huge header file which is natives.h by Alexander blade and his team for GTA V, so I just converted all the functions listed in the nativedb to C# file. now c# developers able to call over 2000 natives that rely on the RPC.cs, this will be good for (desktop app developers, testers, etc)
RPC class made on top of the PS4Lib.dll and it's only valid for GTA V. and the first argument of Call method can be either native hash or the function address.
Also I made the GTANatives dll to make it easier for people, only reference it in your C# project and you're ready to go.
Download: GTA5-Native-Caller-master.zip / GIT
GTANatives
GTA 5 Library for PS4 to create desktop tools. This library allows you to call over 2000 native functions that can be found here Nativedb
Brief Example:
Enable RPC
Code:
public static void Enable(PS4API ps4);
Call function (Thread Safe)
Code:
public static T Call<T>(ulong address, params object[] parameters);
Code:
PS4API PS4 = new PS4API();
private void btnConnect_Click(object sender, EventArgs e)
{
if (PS4.IsConnected)
return;
btnConnect.ForeColor = PS4.ConnectTarget(txtIp.Text) ? Color.Green : Color.Red;
}
private void btnAttach_Click(object sender, EventArgs e)
{
btnAttach.ForeColor = PS4.AttachProcess() ? Color.Green : Color.Red;
RPC.Enable(PS4);
}
private void btnVehicleSpawn_Click(object sender, EventArgs e)
{
int vehHash = GAMEPLAY.GET_HASH_KEY("adder");
int newVec = 0;
STREAMING.REQUEST_MODEL(vehHash);
if (STREAMING.HAS_MODEL_LOADED(vehHash))
{
int playerPed = PLAYER.PLAYER_PED_ID();
Vector3 myCoords = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), true);
newVec = VEHICLE.CREATE_VEHICLE(vehHash, myCoords.X, myCoords.Y, myCoords.Z, ENTITY.GET_ENTITY_HEADING(playerPed), true, true);
if (chkIntoVehicle.Checked)
PED.SET_PED_INTO_VEHICLE(playerPed, newVec, -1);
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(vehHash);
}
}
How to use for developers:
- Inject the PS4API.BIN whether 4.05/4.55.
- Reference GTANatives.dll to your project.
- Follow the example above or the included demo app.
- Alexander blade
- 2much4u
- All of you and who I missed, feel free to notify me.