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

And R* released the new patch 1.0.335.3

http://patches.rockstargames.com/prod/gtav/versioning.xml

<Build version="1.0.335.3"><Launcher version="1.0.344.1" url="http://patches.rockstargames.com/prod/gtav/Launcher_EFIGS/GTA_V_Launcher_1_0_344_1.exe"/><Game version="1.0.335.2" url="Game_EFIGS/GTA_V_Patch_1_0_335_2.exe"/><SocialClub version="1.1.5.8" url="http://patches.rockstargames.com/prod/socialclub/Social%20Club%20v1.1.5.8%20Setup.exe"/><Manifest url="DigitalData/GameData/manifest"/><Manifest url="DigitalData/DLCPacks1/manifest"/></Build>
Link to comment
Share on other sites

 

And R* released the new patch 1.0.335.3

http://patches.rockstargames.com/prod/gtav/versioning.xml

<Build version="1.0.335.3"><Launcher version="1.0.344.1" url="http://patches.rockstargames.com/prod/gtav/Launcher_EFIGS/GTA_V_Launcher_1_0_344_1.exe"/><Game version="1.0.335.2" url="Game_EFIGS/GTA_V_Patch_1_0_335_2.exe"/><SocialClub version="1.1.5.8" url="http://patches.rockstargames.com/prod/socialclub/Social%20Club%20v1.1.5.8%20Setup.exe"/><Manifest url="DigitalData/GameData/manifest"/><Manifest url="DigitalData/DLCPacks1/manifest"/></Build>

Oh hell, that's awesome actually (not the part about the new patch). I was looking for some type of RSS feed or XML with the latest update version on it. :^:

Link to comment
Share on other sites

Is there a way in the trainer to select my GTAO character and put the cop uniform on him?

No clue if they're in the trainer, but these are the model names for the mp characters:

mp_f_freemode_01 (female)

mp_m_freemode_01 (male)

 

Honestly have no idea if they work offline. If they do then you'll have to play with the ped components to find the uniform pieces.

Link to comment
Share on other sites

enjoythekilling

 

Is there a way in the trainer to select my GTAO character and put the cop uniform on him?

No clue if they're in the trainer, but these are the model names for the mp characters:

mp_f_freemode_01 (female)

mp_m_freemode_01 (male)

 

Honestly have no idea if they work offline. If they do then you'll have to play with the ped components to find the uniform pieces.

 

 

They're there. You can find them with the name "FREEMODE". The problem is the outfits and appearence are completely randomized. So you can't play as your own character and can't select any clothing or body parts.

I'm hoping for an updated version of the trainer that allows you to do this. Atleast i hope someone releases one before Sjaak releases his trainer.

Link to comment
Share on other sites

I want to find a command that determines the ragdoll-state. But it does not work:

if (PED::IS_PED_RAGDOLL(playerPed)){		x = true;	}

Full code:

#include "script.h"#include <string>#include <ctime>#pragma warning(disable : 4244 4305) // double <-> float conversionsint activeLineIndexWeapon = 0;void main(){	static LPCSTR weaponNames[] = {		"WEAPON_KNIFE", "WEAPON_NIGHTSTICK", "WEAPON_HAMMER", "WEAPON_BAT", "WEAPON_GOLFCLUB", "WEAPON_CROWBAR",		"WEAPON_PISTOL", "WEAPON_COMBATPISTOL", "WEAPON_APPISTOL", "WEAPON_PISTOL50", "WEAPON_MICROSMG", "WEAPON_SMG",		"WEAPON_ASSAULTSMG", "WEAPON_ASSAULTRIFLE", "WEAPON_CARBINERIFLE", "WEAPON_ADVANCEDRIFLE", "WEAPON_MG",		"WEAPON_COMBATMG", "WEAPON_PUMPSHOTGUN", "WEAPON_SAWNOFFSHOTGUN", "WEAPON_ASSAULTSHOTGUN", "WEAPON_BULLPUPSHOTGUN",		"WEAPON_STUNGUN", "WEAPON_SNIPERRIFLE", "WEAPON_HEAVYSNIPER", "WEAPON_GRENADELAUNCHER", "WEAPON_GRENADELAUNCHER_SMOKE",		"WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_GRENADE", "WEAPON_STICKYBOMB", "WEAPON_SMOKEGRENADE", "WEAPON_BZGAS",		"WEAPON_MOLOTOV", "WEAPON_FIREEXTINGUISHER", "WEAPON_PETROLCAN",		"WEAPON_SNSPISTOL", "WEAPON_SPECIALCARBINE", "WEAPON_HEAVYPISTOL", "WEAPON_BULLPUPRIFLE", "WEAPON_HOMINGLAUNCHER",		"WEAPON_PROXMINE", "WEAPON_SNOWBALL", "WEAPON_VINTAGEPISTOL", "WEAPON_DAGGER", "WEAPON_FIREWORK", "WEAPON_MUSKET",		"WEAPON_MARKSMANRIFLE", "WEAPON_HEAVYSHOTGUN", "WEAPON_GUSENBERG", "WEAPON_HATCHET", "WEAPON_RAILGUN"	};	BOOL bPlayerExists = ENTITY::DOES_ENTITY_EXIST(PLAYER::PLAYER_PED_ID());	Player player = PLAYER::PLAYER_ID();	Ped playerPed = PLAYER::PLAYER_PED_ID();	bool x = false;	if (PED::IS_PED_RAGDOLL(playerPed)){		x = true;	}	if (x){		switch (activeLineIndexWeapon)		{		case 0:			for (int i = 0; i < sizeof(weaponNames) / sizeof(weaponNames[0]); i++)				WEAPON::GIVE_DELAYED_WEAPON_TO_PED(playerPed, GAMEPLAY::GET_HASH_KEY((char *)weaponNames[i]), 1000, 0);			break;		}	}}void ScriptMain(){	srand(GetTickCount());	main();}

Please help me!

Link to comment
Share on other sites

make bodyguard script please !

Isn't the place for requests . you know there is a WHOLE thread for requests .

Link to comment
Share on other sites

I want to find a command that determines the ragdoll-state. But it does not work:

if (PED::IS_PED_RAGDOLL(playerPed)){		x = true;	}
Please help me!

 

What about "IS_PED_RUNNING_RAGDOLL_TASK" ?

Link to comment
Share on other sites

Aardvark2015

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 1
Link to comment
Share on other sites

Thank you very much!!

 

Is it possible to add vehicles left behind such as blimp2 (the only 1 I'm aware of tbh) to the trainer?

Or we should just wait a next version or the SDK?

 

Now that the SDK is out how should I proceed for adding the blimp2 (the xero blimp) to the spawning vehicle's list?

I don't know why even though I'm a returning player (I can snapshot monkey mosaics) I'm not able to spawn the Xero blimp, the Atomic one always shows up, and the icon on the phone is the blue and yellow one.

Link to comment
Share on other sites

guys, please create bodyguard script !

 

make bodyguard script please !

You already said this. Quit spamming the thread with requests.

 

SDK ftw! thanks again Blade.

Edited by AgentWD40
Link to comment
Share on other sites

identitymatrix

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.

 

Oh my god, I couldn't be doing with that. I only ever used hazardX's .net scripthook where you could type 'reloadscripts' to reload the new code, and vb.net is interpreted, not compiled (but can be, as .net.dll)

Edited by TheVideoVolcano
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

Link to comment
Share on other sites

Forgive my ignorance as I don't know sh*t about programming.

Every time I try to build the solution it gives me tons of errors in script.cpp.

How are you guys bypassing this?

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++

	const int blipIterator = UI::_GET_BLIP_INFO_ID_ITERATOR();	for (Blip i = UI::GET_FIRST_BLIP_INFO_ID(blipIterator); UI::DOES_BLIP_EXIST(i) != 0; i = UI::GET_NEXT_BLIP_INFO_ID(blipIterator))	std::vector<int> v = { UI::GET_BLIP_INFO_ID_COORD(i) };	std::string res(v.size(), 0);	std::transform(v.begin(), v.end(), res.begin(),		[](int k) { return static_cast<char>(k); });	std::cout << res << '\n';	return 0;	static struct { 		LPCSTR		text;		bool		*pState;		bool		*pUpdated;	} lines[lineCount] = {		{"MOON GRAVITY",	&featureWorldMoonGravity,	NULL},		{ k, &featurePosition11212121, NULL },		{"RANDOM COPS",		&featureWorldRandomCops,	NULL},		{"RANDOM TRAINS",	&featureWorldRandomTrains,	NULL},		{"RANDOM BOATS",	&featureWorldRandomBoats,	NULL},		{"GARBAGE TRUCKS",	&featureWorldGarbageTrucks,	NULL}	};
Link to comment
Share on other sites

Waiting for working ASI for spawning North Yankton & Heist areas in SP.

HHnErXC.png


Link to comment
Share on other sites

Forgive my ignorance as I don't know sh*t about programming.

Every time I try to build the solution it gives me tons of errors in script.cpp.

How are you guys bypassing this?

Nevermind, it's fixed.

Edited by TacoDeBoss
Link to comment
Share on other sites

 

Forgive my ignorance as I don't know sh*t about programming.

Every time I try to build the solution it gives me tons of errors in script.cpp.

How are you guys bypassing this?

Quite a few errors are due to missing members in natives.h

Am I missing something?

 

which errors are you getting? post here your compiler's error

Link to comment
Share on other sites

 

 

Forgive my ignorance as I don't know sh*t about programming.

Every time I try to build the solution it gives me tons of errors in script.cpp.

How are you guys bypassing this?

Quite a few errors are due to missing members in natives.h

Am I missing something?

 

which errors are you getting? post here your compiler's error

 

Apparently the natives.h from Blade's website is missing some stuff. Or maybe I'm just not supposed to replace the existing file with the one from his site. Regardless, I think I have it fixed.

Link to comment
Share on other sites

 

 

 

Forgive my ignorance as I don't know sh*t about programming.

Every time I try to build the solution it gives me tons of errors in script.cpp.

How are you guys bypassing this?

Quite a few errors are due to missing members in natives.h

Am I missing something?

 

which errors are you getting? post here your compiler's error

 

Apparently the natives.h from Blade's website is missing some stuff. Or maybe I'm just not supposed to replace the existing file with the one from his site. Regardless, I think I have it fixed.

 

you dont need copy/paste, just look which one you need to clean up and replace it, dont replace everything :lol:

Link to comment
Share on other sites

Aardvark2015

 

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
Edited by Aardvark2015
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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)).

Link to comment
Share on other sites

Aardvark2015

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

If you have visual studio, it's easy. Download the ScriptHookV SDK, and change every mention of VK_F4 to another key and build the NativeTrainer project. Look up virtual key codes on MSDN for the names of other buttons.

Edited by Aardvark2015
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 got a error... :O

 

Error	1	error C2078: too many initializers	script.cpp	774	1	NativeTrainerError	2	error C2065: 'i' : undeclared identifier	script.cpp	914	1	NativeTrainer	3	IntelliSense: too many initializer values	script.cpp	773	4	NativeTrainer	4	IntelliSense: identifier "i" is undefined	script.cpp	914	43	NativeTrainer
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.

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! :)

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

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

×
×
  • Create New...

Important Information

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