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

Hey guys!

 

First time trying mods, it worked for me after downgrading and adding scripthook.

I tried searching for this but I cant find the answer,

is it possible to go online without updating and deleting files each time? or will I have to update and downgrade if I want to play offline?

You can use the latest version of gta5.. but when you go play gta online you need to remove the modding files otherwise you get banned.

 

 

 

Just a quick question, why was the dsound.dll replaced with dinput8.dll?

Also should I now just delete dsound.dll from my game directory (I mean I already have, but just making sure)?

dinput8.dll does not replace dsound.dll, you need both in your game directory, but make sure that you use the new ones.

 

Ahh ok, but why isn't it included in the latest scripthook package then?

 

ok i understand it.. i downloaded the latest scripthook package and dsound.dll wasnt in the bin folder.. so you probaly dont need it..

Edited by Royal22
Link to comment
Share on other sites

@ Alexander Blade

thank you for the trainer orsome work is there anyway you could provide an option to move the trainer into a diffrent corner of the screen as when you are on a mission you can not read the text in the top right corner when the trainer is active ?

 

thank you

Link to comment
Share on other sites

 

Hey guys!

 

First time trying mods, it worked for me after downgrading and adding scripthook.

I tried searching for this but I cant find the answer,

is it possible to go online without updating and deleting files each time? or will I have to update and downgrade if I want to play offline?

You can use the latest version of gta5.. but when you go play gta online you need to remove the modding files otherwise you get banned.

 

 

 

Just a quick question, why was the dsound.dll replaced with dinput8.dll?

Also should I now just delete dsound.dll from my game directory (I mean I already have, but just making sure)?

dinput8.dll does not replace dsound.dll, you need both in your game directory, but make sure that you use the new ones.

 

Ahh ok, but why isn't it included in the latest scripthook package then?

 

ok i understand it.. i downloaded the latest scripthook package and dsound.dll wasnt in the bin folder.. so you probaly dont need it..

 

Why don't anybody ever read the README??? It is clearly stated there!

Quote:

2. In order to load asi plugins you need to have asi loader installed,
you can download it separately or use the latest version that comes
with this distrib (dinput8.dll).
You must delete old dsound.dll asiloader if you have one installed.
Edited by Cyron43
Link to comment
Share on other sites

Craigsters

@ Alexander Blade

thank you for the trainer orsome work is there anyway you could provide an option to move the trainer into a diffrent corner of the screen as when you are on a mission you can not read the text in the top right corner when the trainer is active ?

 

thank you

You do realize that this is just a example trainer as to what script hook v can do and that in a few weeks sjaak327 well be releasing a native trainer with way more features

"You don't understand! I could've had class. I could've been a contender. I could've been somebody, instead of a bum, which is what I am."

                                                                                                                                                   

                                                                                                                                                                           On the Waterfront 1954 M.Brando

Link to comment
Share on other sites

Craigsters

Sorry I Have Been Gone:

Is There A Fix For The Trainer

it was updated on 02 May 2015 and dsound.dll file was replaced with dinput8.dll and it works fine with build 350 with steam versions , see first post of thread for download link

"You don't understand! I could've had class. I could've been a contender. I could've been somebody, instead of a bum, which is what I am."

                                                                                                                                                   

                                                                                                                                                                           On the Waterfront 1954 M.Brando

Link to comment
Share on other sites

jacklouis

 

Sorry I Have Been Gone:

Is There A Fix For The Trainer

it was updated on 02 May 2015 and dsound.dll file was replaced with dinput8.dll and it works fine with build 350 with steam versions , see first post of thread for download link

 

So If I Replace That It Should Work

Link to comment
Share on other sites

Craigsters

remove all the files from the previous script hook v and install the three that are in the new script hook v

 

 

make sure any txt files the old script hook v are removed too, I removed five files related to the previous script hook v and then installed dinput8.dll, NativeTrainer.asi and ScriptHookV.dll

 

 

if you ask me the five file names of the previous script hook v, I'll have to dig deep back into this thread, I already posted those file names here

 

 

update

 

here are the files I removed from the previous script hook v

 

removed
asiloader.txt
ScriptHookV.txt
dsound.dll
NativeTrainer.asi
ScriptHookV.dll
Edited by Craigsters

"You don't understand! I could've had class. I could've been a contender. I could've been somebody, instead of a bum, which is what I am."

                                                                                                                                                   

                                                                                                                                                                           On the Waterfront 1954 M.Brando

Link to comment
Share on other sites

Why don't anybody ever read the README??? It is clearly stated there!

Quote:

2. In order to load asi plugins you need to have asi loader installed,
you can download it separately or use the latest version that comes
with this distrib (dinput8.dll).
You must delete old dsound.dll asiloader if you have one installed.

 

oh lol

gotta make sure i do in the future.

Edited by Mahir007
Link to comment
Share on other sites

I got an answer from Rockstar (on the support page on their site) but it's pretty disappointing...

(homemade translation from French)

"Hi,
Thank you for your message. Although we do not have information to share with you about this subject, we appreciate your question.
The Rockstar assistance is dedicated to help players who are experiencing technical difficulties with our games.
Thank you for your understanding and in the future, do not hesitate to contact us again in case of technical difficulties.
"

And they deleted my question. Thanks a lot Rockstar...

  • Like 2
Link to comment
Share on other sites

From ffzero58:

 

 

You need to use a combination of GET_PED_DRAWABLE_VARIATIONS and SET_PED_COMBINATION_VARIATION. As long as you know the drawableID, you can just use the latter.

 

 

 

can you example this for me?

 

I'm still new to C++, I only started messing with it to mod GTA SP for the most awesome experiences ever.

 

and I got nothing to hide, every man and woman do their business, but that's not why I want this! XD

I want it to have a half naked Amanda running around with a gun shooting people. lmao!

 

btw thanks! I really appreciate the help!

 

 

I'm at work so I cannot get to this. I would take a look at the trainer source code (not this one - I have the extended version) to see how it is done.

 

Again, please share your source code when you're done - it will help everyone here (especially me). :D

Link to comment
Share on other sites

Hi ,

I have a question : Anyone know the native function to load an animation and what are these arguments?

Exemple for load "[email protected]@[email protected]" or "mph_hum_mid-2"

 

And I also have another question scripting decompile PC version they are working out or it yet ?

Thank you ^^

Link to comment
Share on other sites

monsterxsync

I got an answer from Rockstar (on the support page on their site) but it's pretty disappointing...

 

(homemade translation from French)

 

"Hi,

Thank you for your message. Although we do not have information to share with you about this subject, we appreciate your question.

The Rockstar assistance is dedicated to help players who are experiencing technical difficulties with our games.

Thank you for your understanding and in the future, do not hesitate to contact us again in case of technical difficulties."

 

And they deleted my question. Thanks a lot Rockstar...

They automatically replied to all the ban issues with this it seems, also if you try call they hang up on you again, just like when this happened on PS3. Rockstar support is just bullshizzle

Edited by monsterxsync
Link to comment
Share on other sites

GuenosNoLife

Can you make map radar icon what we missing example "under the bridge" I'm 45/50 and I don't know what is 5... Or can unlock one to one for no risk ban of success SC / Steam (idk if ban or not)

 

 

Thank reply!

Link to comment
Share on other sites

Can you make map radar icon what we missing example "under the bridge" I'm 45/50 and I don't know what is 5... Or can unlock one to one for no risk ban of success SC / Steam (idk if ban or not)

 

 

Thank reply!

Maybe this will help you?

Link to comment
Share on other sites

Make plz a Mod, that allows to tune the cars and to modificate them, i mean to spawn modded cars like topless casco, Merryweather Jeep without rollcage etc

Link to comment
Share on other sites

Hi ,

I have a question : Anyone know the native function to load an animation and what are these arguments?

Exemple for load "[email protected]@[email protected]" or "mph_hum_mid-2"

 

And I also have another question scripting decompile PC version they are working out or it yet ?

Thank you ^^

http://gtaforums.com/topic/717612-v-scriptnative-documentation-and-research/

first spoiler has decompiled scripts

Edited by FabioGNR
Link to comment
Share on other sites

kingqueenjack

This now crashes the online portion. It runs and functions in single player however as of right now you can't even go online. I don't know if this was intended, but I definately prefered it when it simply didn't work online.

Link to comment
Share on other sites

This now crashes the online portion. It runs and functions in single player however as of right now you can't even go online. I don't know if this was intended, but I definately prefered it when it simply didn't work online.

This is definitely intended, it protects you. If you launch online while scripthook is loaded, you'll get banned. ( disabling scripts isn't enough, you have to start GTA V without injecting scripthook ) Since I don't think you can reverse injection, it shuts down.
Link to comment
Share on other sites

flynhigh09

Anyone know why i get this error..

IFy4wLe.png

from this code. ive tried a buff for texturename aswell not sure whats going on, i believe code is correct but doesnt do anything but crash.

void DrawSprite(char * Streamedtexture, char * textureName, float x, float y, float width, float height, float rotation, int r, int g, int b, int a){    GRAPHICS::REQUEST_STREAMED_TEXTURE_DICT(Streamedtexture, false);    if (GRAPHICS::HAS_STREAMED_TEXTURE_DICT_LOADED(Streamedtexture))        GRAPHICS::DRAW_SPRITE(Streamedtexture, textureName, x, y, width, height, rotation, r, g, b, a);    } DrawSprite("mpmissmarkers256", "Shop_Health_Icon_A", 0.89f, 0.69f, 0.30f, 0.28f, 0, 125, 255, 255, 255); //crashes
Link to comment
Share on other sites

Neuntoter

It appears your DLL is compiled for C++? In any case it appears names are mangled and as such can't be used with MinGW.

Was wondering if you are actually using c++ features and perhaps it could be compiled in C or if I am doing something wrong?

Link to comment
Share on other sites

Alexander,

 

There seem to be a problem with some of the natives:

 

UI::GET_FIRST_BLIP_INFO_ID and UI::GET_NEXT_BLIP_INFO_ID work fine and return the blip handle, if I want to get the entity that is "attached" to the blip by using:

 

entity blah= GET_BLIP_INFO_ID_ENTITY_INDEX(bliphandle) it Always returns zero. I have seen that this is how it's used in the game scripts, and the same code worked fine on IV.

 

Also IS_BLIP_SHORT_RANGE Always returns false, even though the blip is right next to me.

  • Like 1
Link to comment
Share on other sites

robbier2713

IS THERE A CAP FOR HOW MANY MODS SCRIPTHOOK V OR ASI LOADER ACTIVATES?

Link to comment
Share on other sites

Jitnaught

IS THERE A CAP FOR HOW MANY MODS SCRIPTHOOK V OR ASI LOADER ACTIVATES?

WHY ARE YOU YELLING!?!?!?!

No I don't think there is :)

  • Like 1
Link to comment
Share on other sites

lunchxbles

Can someone help? I've been using the trainer for weeks now but now everytime I press F4 the menu pops up for a brief moment then goes away, I didn't do anything to conflict with the trainer I was just playing ingame and it was running fine til I tried using it and it wouldn't stay open. I'm trying to also use the GU Mod to teleport into interiors i'm attempting to load but that only opens for a brief second too. I will try deleting GU Mod and if that doesnt work then IDK. Thanks

 

EDIT: I got it working simply by replacing the trainer with the same one just different file from the rar.

Edited by lunchxbles
Link to comment
Share on other sites

Not sure if anyone has seen this yet but it looks like GTA V will eventually request for online access to "activate GTA V". Funny thing is I've had GTAVLauncher on firewall lockdown since the update came out. If you're like me who likes to keep things locked down:

 

1. Launch GTA V

2. Click Offline Mode after RGSC fails to connect

3. GTA V will FORCE YOU to connect to the internet before activating

4. Temporarily disable the GTAVLauncher firewall rule

5. Click Retry in RGSC launcher

6. Allow download/activation to happen (only a few secs) - DON'T ALLOW TO COMPLETE (lucky R*'s servers are slow as molasses)

7. Re-enable firewall rule

8. GTA V will allow access after pressing Offline Mode again

  • Like 1
Link to comment
Share on other sites

Not sure if anyone has seen this yet but it looks like GTA V will eventually request for online access to "activate GTA V". Funny thing is I've had GTAVLauncher on firewall lockdown since the update came out. If you're like me who likes to keep things locked down:

 

1. Launch GTA V

2. Click Offline Mode after RGSC fails to connect

3. GTA V will FORCE YOU to connect to the internet before activating

4. Temporarily disable the GTAVLauncher firewall rule

5. Click Retry in RGSC launcher

6. Allow download/activation to happen (only a few secs) - DON'T ALLOW TO COMPLETE (lucky R*'s servers are slow as molasses)

7. Re-enable firewall rule

8. GTA V will allow access after pressing Offline Mode again

Yeah, it locks you out if you don't log in every day or so. Which is completely unacceptable. Pretty sure I can unplug my ps3 and play for longer than that.

 

Can confirm that this method works. Not gonna lie, I want to know what flag or file this is using to trigger this and a way around it. I'm not rockstars bitch. I've bought the game twice, and I'll play when I want, how I want.

 

Saying you can play offline, but then forcing reconnects every day or so is just an outright lie.

Link to comment
Share on other sites

That's outright BS... what if I was forced to live on a deserted island with a hot naked chick and my gaming laptop with GTA V without internet? After a few days, I swimming my ass back to a hotspot?

 

Alright, bad example - but really, that's asinine. I still won't buy your shark cards.

Link to comment
Share on other sites

Im not much of a coder so please forgive my idiocy...

 

I am trying to make a menu like the skin changer but a prop spawner... so I modified the code of the skin changer and It crashes for me, maybe someone else can help me fix her?

void process_props_menu(){	const float lineWidth = 250.0;	const int lineCount = 1;	std::string caption = "Prop Spawning";	static struct {		LPCSTR		text;		bool		*pState;		bool		*pUpdated;	} lines[lineCount] = {			{ "Cool Props", NULL, NULL }	};	DWORD waitTime = 150;	while (true)	{		// timed menu draw, used for pause after active line switch		DWORD maxTickCount = GetTickCount() + waitTime;		do		{			// draw menu			draw_menu_line(caption, lineWidth, 15.0, 18.0, 0.0, 5.0, false, true);			for (int i = 0; i < lineCount; i++)				if (i != activeLineIndexPlayer)					draw_menu_line(line_as_str(lines[i].text, lines[i].pState),					lineWidth, 9.0, 60.0 + i * 36.0, 0.0, 9.0, false, false);			draw_menu_line(line_as_str(lines[activeLineIndexPlayer].text, lines[activeLineIndexPlayer].pState),				lineWidth + 1.0, 11.0, 56.0 + activeLineIndexPlayer * 36.0, 0.0, 7.0, true, false);			update_features();			WAIT(0);		} while (GetTickCount() < maxTickCount);		waitTime = 0;		// process buttons		bool bSelect, bBack, bUp, bDown;		get_button_state(&bSelect, &bBack, &bUp, &bDown, NULL, NULL);		if (bSelect)		{			menu_beep();			// common variables			BOOL bPlayerExists = ENTITY::DOES_ENTITY_EXIST(PLAYER::PLAYER_PED_ID());			Player player = PLAYER::PLAYER_ID();			Ped playerPed = PLAYER::PLAYER_PED_ID();			BOOL bPlayerVehExists = ENTITY::DOES_ENTITY_EXIST(PED::GET_VEHICLE_PED_IS_USING(playerPed));			switch (activeLineIndexPlayer)			{				// skin changer			case 0:				if (process_cprops_menu())	return;				break;				// switchable features			default:				if (lines[activeLineIndexPlayer].pState)					*lines[activeLineIndexPlayer].pState = !(*lines[activeLineIndexPlayer].pState);				if (lines[activeLineIndexPlayer].pUpdated)					*lines[activeLineIndexPlayer].pUpdated = true;			}			waitTime = 200;		}		else			if (bBack || trainer_switch_pressed())			{			menu_beep();			break;			}			else				if (bUp)				{			menu_beep();			if (activeLineIndexPlayer == 0)				activeLineIndexPlayer = lineCount;			activeLineIndexPlayer--;			waitTime = 150;				}				else					if (bDown)					{			menu_beep();			activeLineIndexPlayer++;			if (activeLineIndexPlayer == lineCount)				activeLineIndexPlayer = 0;			waitTime = 150;					}	}}

Thanks again!

 

you can access the github that will soon be up for this under github.com/snubmansters

Link to comment
Share on other sites

I am such a idiot... I posted the wrong code...

 

Im not much of a coder so please forgive my idiocy...

 

I am trying to make a menu like the skin changer but a prop spawner... so I modified the code of the skin changer and It crashes for me, maybe someone else can help me fix her?

bool process_cprops_menu(){	DWORD waitTime = 150;	const int lineCount = 69;	const int itemCount = 10;	const int itemCountLastLine = itemCount;	while (true)	{		// timed menu draw, used for pause after active line switch		DWORD maxTickCount = GetTickCount() + waitTime;		do		{			// draw menu			char caption[32];			sprintf_s(caption, "Props   %d / %d", propspawnerActiveLineIndex + 1, lineCount);			draw_menu_line(caption, 350.0, 15.0, 18.0, 0.0, 5.0, false, true);			for (int i = 0; i < itemCount; i++)				if (strlen(cProps[propspawnerActiveLineIndex][i]))					draw_menu_line(cPropsNames[propspawnerActiveLineIndex][i], 100.0f, 5.0f, 200.0f, 100.0f + i * 110.0f, 5.0f, i == propspawnerActiveItemIndex, false, false);			update_features();			WAIT(0);		} while (GetTickCount() < maxTickCount);		waitTime = 0;		bool bSelect, bBack, bUp, bDown, bLeft, bRight;		get_button_state(&bSelect, &bBack, &bUp, &bDown, &bLeft, &bRight);		Ped playerPed = PLAYER::PLAYER_PED_ID();		Vector3 playerPosition = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0);		if (bSelect)		{			menu_beep();			DWORD model = GAMEPLAY::GET_HASH_KEY((char *)cProps[propspawnerActiveLineIndex][propspawnerActiveItemIndex]);			if (STREAMING::IS_MODEL_IN_CDIMAGE(model) && STREAMING::IS_MODEL_VALID(model))			{				playerPosition = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0);				STREAMING::REQUEST_MODEL(model);				while (!STREAMING::HAS_MODEL_LOADED(model));				//STREAMING::LOAD_ALL_OBJECTS_NOW();				OBJECT::CREATE_OBJECT(model, playerPosition.x, playerPosition.y, playerPosition.z, 1, 1, 1);					}				WAIT(100);				STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(model);				waitTime = 200;			}		else			if (bBack)			{			menu_beep();			break;			}			else				if (bRight)				{			menu_beep();			propspawnerActiveItemIndex++;			int itemsMax = (propspawnerActiveLineIndex == (lineCount - 1)) ? itemCountLastLine : itemCount;			if (propspawnerActiveItemIndex == itemsMax)				propspawnerActiveItemIndex = 0;			waitTime = 100;				}				else					if (bLeft)					{			menu_beep();			if (propspawnerActiveItemIndex == 0)				propspawnerActiveItemIndex = (propspawnerActiveLineIndex == (lineCount - 1)) ? itemCountLastLine : itemCount;			propspawnerActiveItemIndex--;			waitTime = 100;					}					else						if (bUp)						{			menu_beep();			if (propspawnerActiveLineIndex == 0)				propspawnerActiveLineIndex = lineCount;			propspawnerActiveLineIndex--;			waitTime = 200;						}						else							if (bDown)							{			menu_beep();			propspawnerActiveLineIndex++;			if (propspawnerActiveLineIndex == lineCount)				propspawnerActiveLineIndex = 0;			waitTime = 200;							}		if (propspawnerActiveLineIndex == (lineCount - 1))			if (propspawnerActiveItemIndex >= itemCountLastLine)				propspawnerActiveItemIndex = 0;	}	return false;}

thanks! i'll keep the post updated...

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

  • 2 Users Currently Viewing
    1 member, 0 Anonymous, 1 Guest

    • c0d3x94
×
×
  • Create New...

Important Information

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