Jump to content

Recommended Posts

Oh I forgot, if they are unarmed they will flee, make sure they have a weapon to prevent that from happening. The only way for them to attack you unarmed, is if you yourself are unarmed as well. (hide weapons will do).

 

Smart guys huh ?

 

 

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059898006
Share on other sites

opium_addict
Oh I forgot, if they are unarmed they will flee, make sure they have a weapon to prevent that from happening. The only way for them to attack you unarmed, is if you yourself are unarmed as well. (hide weapons will do).

 

Smart guys huh ?

of course i told you on IRC but, its not quite as simple as that.

 

some people with decision making flags identical to other bodyguards, will run and cower anyway because of how the decision making scheme works (or other "attitude" data)

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059898163
Share on other sites

 

some people with decision making flags identical to other bodyguards, will run and cower anyway because of how the decision making scheme works (or other "attitude" data)

I noticed the same thing when creating random gangs (using Alice). Most of the gang members would fight with rival gangs but a few would do a runner at the first sign of trouble.

 

I haven't yet discovered how to rectify that with scripting. I think you may have to locate the model names of the cowardly peds in common/data/pedpersonality.dat and increase their Bravery values (up to a maximum of 5).

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059898724
Share on other sites

opium_addict

I was hoping to avoid outright modding of files, but it may be possible if i can hook the game before the initial file is loaded (file system hook? meh..)

 

I was also hoping there was a way to do this through decision makers, but i don't think it really is possible completely.

 

I might work on reversing the information loaded by the file you mentioned, see if i can't make some code out of it (since i do not like the idea of file modding very much)

 

edit: may be interesting to some, here is a function to get ALL peds (or peds on YOUR terms, all not dead, etc, etc)

http://www.gtaforums.com/index.php?showtop...st&p=1059900316

 

1.0.6.0

Edited by opium_addict
Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059898802
Share on other sites

I can't launch the game with the scripthook. Even the "r1_alt2" version crashes it.

The log states that it can't autodetect the game version (I wish I could do it manually ><), which is 1.0.5.1, which, in turn, is actually 1.0.6.0 aka patch 6, for the Russian version of IV.

Damn the 6th patch with its separate versioning by regions. suicidal.gif

Aru, please make the scripthook recognize the "1.0.5.1" version of patch 6 for our miserable country. facedesk.gif

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059900893
Share on other sites

GTA.Native.Pointer CarPointer = typeof(BANSHEE);

GTA.Native.Function.Call("GET_CAR_CHAR_IS_USING", PlayerChar, CarPointer);

 

 

how use this in c#...i try but nothnig...

 

 

using System;

using System.Drawing;

using System.Windows.Forms;

using GTA;

 

namespace NativeCallExampleCS {

 

 

public NativeCallExample() {

this.KeyDown += new GTA.KeyEventHandler(this.NativeCallExample_KeyDown);

}

 

private void NativeCallExample_KeyDown(object sender, GTA.KeyEventArgs e) {

if (e.Key != Keys.L) return;

 

GTA.Native.Pointer PedPointer = typeof(M_Y_COP_TRAFFIC1);

GTA.Native.Function.Call("GET_PLAYER_CHAR", Player, PedPointer);

 

}

 

 

HELP !!!!! how use native. in c#

 

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059901611
Share on other sites

 

maddy25

 

 

 

 

 

ok....help me in c++

X-bone

 

If you want to do it in C++ using Aru's scripthook you really need to download the SDK on the first post of this thread and follow the examples.

 

If you are going to be doing it in C# anyway this thread won't be very helpful to you.

 

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059903209
Share on other sites

I get this in the ScriptHook log:

 

Log start: Tue Apr 27 20:34:33 2010

-----------------------------------------------

[iNFO] GTA IV Script Hook 0.3.0 - © 2009, Aru - Initialized

[iNFO] Process base address: 0x400000

[iNFO] Auto detecting game version

[FATAL] Failed to detect game version

ANy help?

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059903320
Share on other sites

I get this in the ScriptHook log:

 

Log start: Tue Apr 27 20:34:33 2010

-----------------------------------------------

[iNFO] GTA IV Script Hook 0.3.0 - © 2009, Aru - Initialized

[iNFO] Process base address: 0x400000

[iNFO] Auto detecting game version

[FATAL] Failed to detect game version

ANy help?

My logs say that when I use DevLoader but not when I use Alexander Blade's Asi Loader.

 

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059904243
Share on other sites

Aru,

 

Earlier in this thread I posted that my mod was crashing the game when I try to join Multiplayer free mode.

It also crashed if I tried to load a saved game but otherwise worked fine in single player.

I decided to try some tests to see if I could isolate the problem.

 

I started with the sample scripts included in the SDK and discovered that the SampleCustom (Tick based)

example crashes just after a saved game loads or when joing MP.

The SampleCustomFiber works fine in MP or when loading.

 

So Tick based mods appear to crash with the latest patch.

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059904399
Share on other sites

Default_Man

Got a problem on one of my computers running this.

Running EFLC 1.1.1.0 on Windows XP SP3 and Scripthook refuses to run, when i run EFLC the mod that I am trying to use doesnt work, looked through the EFLC folder and found .log files for everything (which say everything is fine) but Scripthook doesnt have one, any ideas on what is causing it not to work? It works perfectly fine fine on my Win 7 x64 PC

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059904594
Share on other sites

Aru,

 

Earlier in this thread I posted that my mod was crashing the game when I try to join Multiplayer free mode.

It also crashed if I tried to load a saved game but otherwise worked fine in single player.

I decided to try some tests to see if I could isolate the problem.

 

I started with the sample scripts included in the SDK and discovered that the SampleCustom (Tick based)

example crashes just after a saved game loads or when joing MP.

The SampleCustomFiber works fine in MP or when loading.

 

So Tick based mods appear to crash with the latest patch.

Hmm, I use the customthread for my mods and they work fine.

 

However I changed them to not use the scriptthread:

 

header file:

 

 

#include "../ScriptHook/NativeThread.h"class CustomThread : public NativeThread

 

 

This was done due to a problem with the previous scripthook and using text natives (they "flickered").

 

Get nativehread.h from an older scripthook sdk.(like 0.3.0).

 

 

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059904634
Share on other sites

opium_addict

 

Got a problem on one of my computers running this.

Running EFLC 1.1.1.0 on Windows XP SP3 and Scripthook refuses to run, when i run EFLC the mod that I am trying to use doesnt work, looked through the EFLC folder and found .log files for everything (which say everything is fine) but Scripthook doesnt have one, any ideas on what is causing it not to work? It works perfectly fine fine on my Win 7 x64 PC

If scripthook doesn't have one, that likely means it isn't being loaded.

 

Try using GenericLoader, i made it and i compiled and tested it on XP SP3, if you need any help PM me, i will try to iron out the issue for you.

 

As for Fiber/Tick threads, i am able to load my game just fine.

(albeit, right now i haven't used any commands in the script, i have been focusing my attention on the d3d9 hook and other things)

 

Haven't tried it on multiplayer, but i am willing to give it a shot later.

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059904647
Share on other sites

Default_Man
If scripthook doesn't have one, that likely means it isn't being loaded.

 

Try using GenericLoader, i made it and i compiled and tested it on XP SP3, if you need any help PM me, i will try to iron out the issue for you.

Tried generic loader, failed to load the mod (trainertbogt.asi)

 

If scripthook isnt loading, is there any chance it has to do with where EFLC is installed? (D:/Rockstar Games/EFLC)

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059904710
Share on other sites

If scripthook doesn't have one, that likely means it isn't being loaded.

 

Try using GenericLoader, i made it and i compiled and tested it on XP SP3, if you need any help PM me, i will try to iron out the issue for you.

Tried generic loader, failed to load the mod (trainertbogt.asi)

 

If scripthook isnt loading, is there any chance it has to do with where EFLC is installed? (D:/Rockstar Games/EFLC)

What scripthook.dll are you using, use the one that is supplied with trainertbogt.asi.

 

The one that is linked here doesn't seem to work for everybody, the one in the trainer archive (hopefully) does work.

 

 

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059904786
Share on other sites

 

Aru,

 

  Earlier in this thread I posted that my mod was crashing the game when I try to join Multiplayer free mode.

It also crashed if I tried to load a saved game but otherwise worked fine in single player.

I decided to try some tests to see if I could isolate the problem.

 

I started with the sample scripts included in the SDK and discovered that the SampleCustom (Tick based)

example crashes just  after a saved game loads or when joing MP. 

The SampleCustomFiber works fine in MP or when loading.

 

So Tick based mods  appear to crash with the latest patch.

Hmm, I use the customthread for my mods and they work fine.

 

However I changed them to not use the scriptthread:

 

header file:

 

 

#include "../ScriptHook/NativeThread.h"class CustomThread : public NativeThread

 

 

This was done due to a problem with the previous scripthook and using text natives (they "flickered").

 

Get nativehread.h from an older scripthook sdk.(like 0.3.0).

 

That worked, thanks so much, I was going insane trying to figure out what was wrong.

If anyone else needs to try this you will also have to overwrite the GameTypes.h file with

the one from the 0.3.0 scripthook sdk.

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059906312
Share on other sites

So I have to ask. Can you please add the natives that sjaak327 needs to enable nitro in his trainer. Thanks, even if you can't/will not. Also I am having a problem with the scripthook, my game crashes when I drive over an invisible line located in the southwest corner of Castle Gardens in Algonquin. Right above the tunnel entrance on the road, out in the water, in the tunnel entrance, and in the sky with a heli although you have to get within 30 feet. The tunnel entrance is where Union Drive West meets South Parkway. I even went with a clean install, only added this and snt, it crashes everytime I pass over that location with or without snt. I don't recall having this issue in the past and dont know why it's happening now.

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059912414
Share on other sites

Why Scripthook.dll is 152 Kb here and 326 Kb there ?

There are two releases of that version of the scripthook.

 

The smaller one uses support files that are supplied by the game and the Windows OS.

 

The larger one does not use any support files.

 

So, why are there two releases?

 

Some users do not have the proper required support files, those users can use the larger scripthook release.

 

Is there any benefit to using one release instead of the other?

 

No!

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059913530
Share on other sites

 

There are two releases of that version of the scripthook.

 

The smaller one uses support files that are supplied by the game and the Windows OS.

 

The larger one does not use any support files.

 

So, why are there two releases?

 

Some users do not have the proper required support files, those users can use the larger scripthook release.

 

 

Ok . Thanks

 

 

Is there any benefit to using one release instead of the other?

 

No!

 

I didn't mean that .

 

Just that Scripthook in this thread doesn't work for me .

While the other one ( which is 512 Kb ) does .

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059915040
Share on other sites

thaCURSEDpie

Hey all,

 

I thought I'd already posted this post, but I guess it was eaten by some internet monster... So I'll post again.

 

I am messing around with SET_RELATIONSHIP and stuff like that.

 

My goal: make all peds attack the player.

 

My steps:

 

1. Get all peds.

2. Give them ALL an AK47

3. Make the AK47 their current weapon.

4. Set them to the relationship group 8 (= russian gang i believe)

5. Call SET_RELATIONSHIP(5, 8, 0) (so they hate me)

6. Task them to attack hated chars.

 

I know all of these steps 'work', because some peds grab their AK and start shooting me. But not all of them: most of them put their AK away and run away when I'm carrying a weapon.

 

So some peds are 'special' and still attack me when I'm armed, and some are just losers and don't (even if they have a weapon themselves).

 

Suggestions, please? smile.gif (and yeah I did read the posts 2 pages ago adressing just this: didnt help)

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059924199
Share on other sites

opium_addict
Hey all,

 

I thought I'd already posted this post, but I guess it was eaten by some internet monster... So I'll post again.

 

I am messing around with SET_RELATIONSHIP and stuff like that.

 

My goal: make all peds attack the player.

 

My steps:

 

1. Get all peds.

2. Give them ALL an AK47

3. Make the AK47 their current weapon.

4. Set them to the relationship group 8 (= russian gang i believe)

5. Call SET_RELATIONSHIP(5, 8, 0) (so they hate me)

6. Task them to attack hated chars.

 

I know all of these steps 'work', because some peds grab their AK and start shooting me. But not all of them: most of them put their AK away and run away when I'm carrying a weapon.

 

So some peds are 'special' and still attack me when I'm armed, and some are just losers and don't (even if they have a weapon themselves).

 

Suggestions, please? smile.gif (and yeah I did read the posts 2 pages ago adressing just this: didnt help)

Been there, done that, try setting it as a mission ped and then messing with the decision makers, i never successfully completed my mission of making them all attack each other (riot mode), but, i didn't set them as mission peds and somebody recommended i do that.

 

I am pretty sure it has something to do with their behavior as peds.

Link to comment
https://gtaforums.com/topic/390582-c-script-hook/page/47/#findComment-1059926292
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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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