Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Forum Support

    3. Suggestions

Script Hook V


Alexander Blade
 Share

Recommended Posts

Created my first ever (EVER!) mod. It shows the car's speed.

Feel like a boss :)

Guuys, is there any way to change the F4 key to anything else? Somebody pleeeeeeeeeeeeease help meeeh

I think you can change it in the function trainer_switch_pressed (take a look at the get_key_pressed(VK_F4)).

Nice work?

Any ideas for sharing?

Link to comment
Share on other sites

With all the bitching and requests on here, I just wanted to say thank you to Alexander Blade. Your script hook has opened a ton of doors for modders, and your trainer has allowed me to enjoy the game so much more, and play the way I want to play. So thank you, very grateful to you.

  • Like 3
Link to comment
Share on other sites

Someone please help me! I have this mod installed, but today when I was playing it suddenly started to just show the menu really quick when I press F4, and then it disappears?? Help please?!?!

Link to comment
Share on other sites

 

Read the post before you comment on it. I said I turned on numlock.

 

Sorry, I read "numpad" and assumed you hadn't. Blade posted a different .asi loader to use somewhere in this topic but I can't find it atm, seemed to fix it for some people from what I remember.

 

Sadly, that didn't work either.

Link to comment
Share on other sites

Still getting an absolute sh*t load of errors when I try to build, similar to what I understand @TacoDeBoss was experiencing. Only one in plain English is "3 unresolved externals" :p

Link to comment
Share on other sites

 

 

Hi all!

I am trying to make a GUI button in world options which shows your location... but my code isn't working, anyone know why?

 

Sorry for my ignorance, Im new to CPP! :p the code I currently got I found trying to google Vector 3 to String conversion C++

 

You want to convert the player coordinates to a string?

 

try something like:

//at the top of file with other includes#include <sstream>Vector3 blip_coord = UI::GET_BLIP_COORDS(i);std::ostringstream oss;oss << "[" << blip_coord.x << ", " << blip_coord.y << ", " << blip_coord.z << "]";std::string blip_coord_str = oss.str();//where you set/draw/??? the stringwhatever(blip_coord_str.c_str()) //not &blip_coord_str - this will be the address of the std::string, not the text inside of it

I fixed it!

 

but now it sticks at 0 0 0 for some reason...

 

thanks again!

Link to comment
Share on other sites

 

Still any fix for those who don't have a number pad? I really want to use this trainer... but not having a number pad is a real pain.

I will try to work on a version that uses U J H K M instead! :)

 

Would be super grateful if you could <3

Link to comment
Share on other sites

Alexander Blade

Yes sure

Thanks Alex for the scripthook, I created my project and code seems to be running fine.

Now the obvious question, are you planning on an asi loader that can unload and reload the DLL's (asi's) in game.

That would save considerable time, not having to stop the game and reload it if I recompile my code.

 

 

Personally I think that using c++11 only cuz of this is pointless

Thanks Alexander Blade!

 

Quick question; in nativeCaller.h you have like 600 lines of 'invoke' overloads for 0 to 25 parameters - is there any particular reason you're not using a variadic template here?

Something like:

static inline void push() {} template<typename T1, typename... T>static inline void push(T1 param, T... params){	nativePush(param);	push(params...);}template<typename R, typename... T>static inline R invoke(UINT64 hash, T... params){	nativeInit(hash);	push(params...);	return *reinterpret_cast<R*>(nativeCall());}

Only thing I can think of is compatibility with VS2010?

 

Also, in your 'nativePush' function, you could make this runtime exception:

if (sizeof(T) > sizeof(UINT64)){	throw "error, value size > 64 bit";}

a compile-time error instead:

static_assert(sizeof(T) <= sizeof(UINT64), "error, value size > 64 bit");

(should work even in 2010)

  • Like 2
Link to comment
Share on other sites

Can you change the water level with ASI files?

Probs

void MODIFY_WATER(Any p0, Any p1, Any p2, Any p3) // 0xC49E005A

Link to comment
Share on other sites

Alejandro continues to amaze. PLEASE take into consideration the time & effort that is put into these projects, and remember how lucky we all are. THANK YOU BLADE!!! There is soooo much on the horizion of GTAV on PC, & we all can thank him for it.

Link to comment
Share on other sites

 

 

Still any fix for those who don't have a number pad? I really want to use this trainer... but not having a number pad is a real pain.

I will try to work on a version that uses U J H K M instead! :)

 

Would be super grateful if you could <3

 

Yes I got a version ready(just needs testing first) that only uses your arrow keys and function keys to work instead of basically the numpad keys.

Note I just want to say thank you alexander blade for your scripthook so fast and also your sdk so fast. and thank you for providing your source code for your native trainer in sdk so I could quickly code one up to help me out and everyone else out on laptops.

Edited by timnboys
Link to comment
Share on other sites

I have been using the mod since it came out but for some reason now today when I press F4 the menu now comes up really fast and goes away. I have tried restarting the game a few times and reinstalled the mod, but the problem persists.

Link to comment
Share on other sites

 

Created my first ever (EVER!) mod. It shows the car's speed.

Feel like a boss :)

Nice work?

Any ideas for sharing?

 

I think it's too simple to share it..

 

 

void main(){		while (true)	{		Player player = PLAYER::PLAYER_ID();		Ped playerPed = PLAYER::PLAYER_PED_ID();		if (!ENTITY::DOES_ENTITY_EXIST(playerPed)) {			WAIT(0);			continue;		}		if (PLAYER::IS_PLAYER_CONTROL_ON(player) && PED::IS_PED_IN_ANY_VEHICLE(playerPed, 0)) {			Vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed);			// i think (i don't really know) the speed value is in mph, so i convert it to kph			float speed = ENTITY::GET_ENTITY_SPEED(veh) * 1.60934;			// yeah, i'm not good at c++			char speed_text[50];			sprintf(speed_text, "Speed: %.2fkph", speed);			// and draw the speed_string where you want		}		WAIT(0);	}}

 

 

Edited by slik
Link to comment
Share on other sites

Hello, sorry to bother people:

 

but does anyone have a good link to creating a simple script to get a basic understanding? I mainly have experience in C# and writing simple applications for pulling CPU information, network information etc..

 

 

unless anyone loves talking about getting started and suggestions, I would love to talk or email.

 

Sorry if I sound like a total fag, I am just so interested and wanting to put time into such a thing.

Link to comment
Share on other sites

Aardvark2015

Personally I think that using c++11 only cuz of this is pointless

 

You can't choose what c++ standard you compile against with MSVC anyway - you have c++11 support whether you like it or not ;)

But it's your SDK, so fair enough :p

Link to comment
Share on other sites

RichBlackGuy

Havent been keeping up with the topic. Can someone answer a few questions. 1 is there any way to use the lip sync that is online when u talk into the mic,can it also be used in single mode??? Next npc spawner with the talk or emotes enabled?

 

Im making a real movie and i hate having to go online. Any one that can help please let me know. Ty

Not Spamming or Requesting just looking for information....Can someone please give me a idea of is this possible or is it something just out of the question in terms of using the voice and lip sync in single player? And if not....How would one go about "unlocking" the option to pick from the dialog and emotes of NPC...

 

Im making a movie and would love the lip sync...and am willing to pay if some1 could unlock that feature...

Or if one of you plans to make a mod close to my needs you can pm me and if the mod is quality i can kick u a few bucks just for ur hard work...

 

Please reply or pm me...TY

And As Always Ty Alex....I will be sure to have ur name in the credits list of my movie

Edited by RichBlackGuy
Link to comment
Share on other sites

I found the solution to my problem. The reason that I was able to load the trainer but not navigate was because I had MouseKeys on -_-

 

Trainer works fine now.

Link to comment
Share on other sites

What are the params?

static void EXPLODE_PED_HEAD(Any p0, Any p1) { invoke<Void>(0x2D05CED3A38D0F3A, p0, p1); } // 2D05CED3A38D0F3A 05CC1380
Link to comment
Share on other sites

I really want to start developing, but i'm afraid to mod the game even if i don't go to online since single player is very connected. Is there any way to easily toggle block any connection to Rockstar's servers? Should i use a crack?

Link to comment
Share on other sites

Hello, sorry to bother people:

 

but does anyone have a good link to creating a simple script to get a basic understanding? I mainly have experience in C# and writing simple applications for pulling CPU information, network information etc..

 

 

unless anyone loves talking about getting started and suggestions, I would love to talk or email.

 

Sorry if I sound like a total fag, I am just so interested and wanting to put time into such a thing.

 

I'm in the exact same situation as you :D

 

First of all, download and install the SDK and have a look at the natives.h, which has all of the known native functions from GTA V. Try something like this:

 

 

 

// Include statements ... using namespace PLAYER; void main() {     Player player = PLAYER_ID();     SET_PLAYER_INVINCIBLE(player, TRUE); } ... 

 

 

Edited by Anthony_y
Link to comment
Share on other sites

 

What are the params?

static void EXPLODE_PED_HEAD(Any p0, Any p1) { invoke<Void>(0x2D05CED3A38D0F3A, p0, p1); } // 2D05CED3A38D0F3A 05CC1380

Not sure what the second parameter is, but the first parameter is the pedestrian handle. Example from a Rockstar script:

 

 

PED::EXPLODE_PED_HEAD(PLAYER::PLAYER_PED_ID(), 0x5FC3C11);

Link to comment
Share on other sites

Aardvark2015

 

What are the params?

static void EXPLODE_PED_HEAD(Any p0, Any p1) { invoke<Void>(0x2D05CED3A38D0F3A, p0, p1); } // 2D05CED3A38D0F3A 05CC1380

I'd guess which ped (p0) and how much to explode its head (p1) ? Sorry, no idea :p

Link to comment
Share on other sites

 

Hello, sorry to bother people:

 

but does anyone have a good link to creating a simple script to get a basic understanding? I mainly have experience in C# and writing simple applications for pulling CPU information, network information etc..

 

 

unless anyone loves talking about getting started and suggestions, I would love to talk or email.

 

Sorry if I sound like a total fag, I am just so interested and wanting to put time into such a thing.

 

I'm in the exact same situation as you :D

 

First of all, download and install the SDK and have a look at the natives.h, which has all of the known native functions from GTA V. Try something like this:

 

 

 

// Include statements ... using namespace PLAYER; int main() {     Player player = PLAYER_ID();     SET_PLAYER_INVINCIBLE(player, TRUE); } ... 

 

 

 

Edit: Oops I was wrong. You were right.

 

 

What are the params?

static void EXPLODE_PED_HEAD(Any p0, Any p1) { invoke<Void>(0x2D05CED3A38D0F3A, p0, p1); } // 2D05CED3A38D0F3A 05CC1380

Not sure what the second parameter is, but the first parameter is the pedestrian handle. Example from a Rockstar script:

 

 

PED::EXPLODE_PED_HEAD(PLAYER::PLAYER_PED_ID(), 0x5FC3C11);

 

 

 

 

 

What are the params?

static void EXPLODE_PED_HEAD(Any p0, Any p1) { invoke<Void>(0x2D05CED3A38D0F3A, p0, p1); } // 2D05CED3A38D0F3A 05CC1380

I'd guess which ped (p0) and how much to explode its head (p1) ? Sorry, no idea :p

 

Thanks. I thought first param would be that but am stuck on second param.

Edited by rghmodz
Link to comment
Share on other sites

walterslaughter

Thanks for your reply but I have the latest update and it still does not work I even uninstalled and re installed it but nothing I also tried the different files that were in the post but still nothing

Link to comment
Share on other sites

 

 

Hello, sorry to bother people:

 

but does anyone have a good link to creating a simple script to get a basic understanding? I mainly have experience in C# and writing simple applications for pulling CPU information, network information etc..

 

 

unless anyone loves talking about getting started and suggestions, I would love to talk or email.

 

Sorry if I sound like a total fag, I am just so interested and wanting to put time into such a thing.

 

I'm in the exact same situation as you :D

 

First of all, download and install the SDK and have a look at the natives.h, which has all of the known native functions from GTA V. Try something like this:

 

 

 

// Include statements ... using namespace PLAYER; int main() {     Player player = PLAYER_ID();     SET_PLAYER_INVINCIBLE(player, TRUE); } ... 

 

 

 

It should be like this

Player player = PLAYER::PLAYER_ID();PLAYER::SET_PLAYER_INVINCIBLE(player,true);  

 

Thanks, I thought it had to be: (player, TRUE); :p but since I used "using namespace PLAYER;" the PLAYER:: because each native is unrequired :D

Link to comment
Share on other sites

 

 

Created my first ever (EVER!) mod. It shows the car's speed.

Feel like a boss :)

Nice work?

Any ideas for sharing?

 

I think it's too simple to share it..

 

 

void main(){		while (true)	{		Player player = PLAYER::PLAYER_ID();		Ped playerPed = PLAYER::PLAYER_PED_ID();		if (!ENTITY::DOES_ENTITY_EXIST(playerPed)) {			WAIT(0);			continue;		}		if (PLAYER::IS_PLAYER_CONTROL_ON(player) && PED::IS_PED_IN_ANY_VEHICLE(playerPed, 0)) {			Vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed);			// i think (i don't really know) the speed value is in mph, so i convert it to kph			float speed = ENTITY::GET_ENTITY_SPEED(veh) * 1.60934;			// yeah, i'm not good at c++			char speed_text[50];			sprintf(speed_text, "Speed: %.2fkph", speed);			// and draw the speed_string where you want		}		WAIT(0);	}}

 

 

 

Would gladly love to know how to use this code, I never ever coded in my life and would really appreciate this one, especially if it can work Online, since its only a cosmetic speedometer I don't think it would fall into a cheat of any kind, would love to test how my online cars handle.

Link to comment
Share on other sites

 

 

 

Hello, sorry to bother people:

 

but does anyone have a good link to creating a simple script to get a basic understanding? I mainly have experience in C# and writing simple applications for pulling CPU information, network information etc..

 

 

unless anyone loves talking about getting started and suggestions, I would love to talk or email.

 

Sorry if I sound like a total fag, I am just so interested and wanting to put time into such a thing.

 

I'm in the exact same situation as you :D

 

First of all, download and install the SDK and have a look at the natives.h, which has all of the known native functions from GTA V. Try something like this:

 

 

 

// Include statements ... using namespace PLAYER; int main() {     Player player = PLAYER_ID();     SET_PLAYER_INVINCIBLE(player, TRUE); } ... 

 

 

 

It should be like this

Player player = PLAYER::PLAYER_ID();PLAYER::SET_PLAYER_INVINCIBLE(player,TRUE);  

 

Thanks, I thought it had to be: (player, TRUE); :p but since I used "using namespace PLAYER;" the PLAYER:: because each native is unrequired :D

 

Oops I didn't notice I put true in lowercase. Thanks for pointing that out.

I didn't know that. Thank you.

Link to comment
Share on other sites

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
 Share

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

×
×
  • Create New...

Important Information

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