Jump to content

Recommended Posts

Well, I am sad to report that none of the three things to try met with success. I tried running the launcher as an admin, I made sure VC++2008 redist. was installed (check, and I repaired the install just to make sure it was in good order), and tried ceedj's latest build of his scripthook-dependent mod. Same result, ScriptHook.dll isn't seen (no log created), and thus mod needing it doesn't work.

 

The mod itself shows the following in the xliveless log, if it helps:

19/09/2009 03:34:40.235 Log started (xliveless 0.97)

19/09/2009 03:34:40.235 GetModuleHandle returns 009c0000

19/09/2009 03:34:40.235 Patching OK (1.0.4)

19/09/2009 03:34:40.255 Error loading library 14001

19/09/2009 03:34:40.255 plugin loader: loaded 'IVStudiosBETA1.asi'

19/09/2009 03:34:40.529 xlive_5297: XLiveInitializeEx

*snip*

 

Frustrating. If anyone thinks of other things to try/check, I'd be very grateful.

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

just a little question...

 

Howto delete all chars in game/? DeleteChar(Ped * ped);

cant get the right way it seems..

 

int i; and then loop tru Deletechars. wont work .. compile error cannot convert int to Ped thing.

also tryd a lot of other things,. none worked,.

 

so What type = Ped??

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

just a little question...

 

Howto delete all chars in game/? DeleteChar(Ped * ped);

cant get the right way it seems..

 

int i; and then loop tru Deletechars. wont work .. compile error cannot convert int to Ped thing.

also tryd a lot of other things,. none worked,.

 

so What type = Ped??

What peds are you trying to delete? That native is used for already created characters. Do you mean the random peds on the streets? For that you need to use this (set up in my own Scripting.h, as I think it was in ScriptingDirty):

 

 

static void SetPedDensityMultiplier(f32 mult) { NativeInvoke::Invoke<scriptVoid>("SET_PED_DENSITY_MULTIPLIER", mult); }

 

 

Call with SetPedDensityMultiplier(0.0); this will remove random peds from the streets.

 

@aru, regarding Overman's problem: While I have no problem believing it still may be an issue with my code, he also mentioned that the Simple Native Trainer isn't working either. Should we try an older version of ScriptHook? Or is it simply because it's a Steam game?

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

 

What peds are you trying to delete? That native is used for already created characters. Do you mean the random peds on the streets? For that you need to use this (set up in my own Scripting.h, as I think it was in ScriptingDirty):

 

 

static void SetPedDensityMultiplier(f32 mult) { NativeInvoke::Invoke<scriptVoid>("SET_PED_DENSITY_MULTIPLIER", mult); }

 

 

Call with SetPedDensityMultiplier(0.0); this will remove random peds from the streets.

 

@aru, regarding Overman's problem: While I have no problem believing it still may be an issue with my code, he also mentioned that the Simple Native Trainer isn't working either. Should we try an older version of ScriptHook? Or is it simply because it's a Steam game?

 

 

 

The peds from the streets.. But when adding function. it will give compile error for me

18 error total.

 

error C2065: 'scriptVoid' : undeclared identifier

error C2664: 'void NativeInvoke::Invoke(ch *,NativeContext *)' : cannot convert parameter 2 from 'f32' to 'NativeContext *'

 

all the same errors. all releated to scripting.h

 

 

EDIT.. Never mind fixed it tounge.gif gess i had same mistake i tryd before tounge.gif THNX anyway m8

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

 

Well, I am sad to report that none of the three things to try met with success.  I tried running the launcher as an admin, I made sure VC++2008 redist. was installed (check, and I repaired the install just to make sure it was in good order), and tried ceedj's latest build of his scripthook-dependent mod.  Same result, ScriptHook.dll isn't seen (no log created), and thus mod needing it doesn't work.

 

The mod itself shows the following in the xliveless log, if it helps:

19/09/2009 03:34:40.235 Log started (xliveless 0.97)

19/09/2009 03:34:40.235 GetModuleHandle returns 009c0000

19/09/2009 03:34:40.235 Patching OK (1.0.4)

19/09/2009 03:34:40.255 Error loading library 14001

19/09/2009 03:34:40.255 plugin loader: loaded 'IVStudiosBETA1.asi'

19/09/2009 03:34:40.529 xlive_5297: XLiveInitializeEx

*snip*

 

Frustrating.  If anyone thinks of other things to try/check, I'd be very grateful.

14001 indicates a problem with the Side-by-Side oonfiguration... essentially, you're missing some components.

 

1. Start a command prompt in admin mode: Start->All Programs->Accessories. Right click on Command Prompt and click Run as Admin.

 

2. Type in:

sxstrace trace -outfile:c:\sxstrace.etl

 

3. Run LaunchGTAIV and let it load and close it when you get to the menu.

 

4. In the command prompt window, press enter to stop tracing then type in:

sxstrace parse -logfile:c:\sxstrace.etl -outfile:c:\sxstrace.txt

 

5. Post the contents of sxstrace.txt here and then you can delete C:\sxstrace.etl and C:\sxstrace.txt.

 

(Btw, this should not really occur if ceedj compiled in release mode with statically linked CRT)

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

 

(Btw, this should not really occur if ceedj compiled in release mode with statically linked CRT)

I have no idea what this means. I've changed nothing from the project settings that are part of the SDK, with the exception 1) of adding _CRT_SECURE_NO_WARNINGS to the pre-processor settings, essentially quieting the 219 warnings I get from using sscanf and the like for my file I/O system, and 2) I changed the SampleCustomFiber solution name to IVStudiosBETA, so it compiles with that name instead of yours. But this was only done late last night, and should have zero to do with why it wasn't working two nights ago.

 

Otherwise, the release build config is exactly the way I got it from the archive.

 

Sheesh, I just wanted to toss together some code so people could make better movies. lol.gif

 

And once again, it still doesn't explain why Simple Native Trainer (new version) won't load up either...

 

EDIT: Not trying to sound all defensive or anything either, though it may have come out that way, after 8 hours of dealing with stupid people. I genuinely want to know what's up here myself, and again, really appreciate you taking the time out to help explain it all. One thing's for sure, if I didn't hate Vista before, I sure do now. wink.gif

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

Here is the contents of SxsTrace.txt after following aru's steps (thank you!)

 

=================Begin Activation Context Generation.Input Parameter:Flags = 0ProcessorArchitecture = x86CultureFallBacks = en-US;enManifestPath = G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\LaunchGTAIV.exeAssemblyDirectory = G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\Application Config File = -----------------INFO: Parsing Manifest File G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\LaunchGTAIV.exe.INFO: Manifest Definition Identity is Microsoft.Windows.SecuLauncher,processorArchitecture="X86",type="win32",version="1.0.0.0".INFO: Activation Context generation succeeded.End Activation Context Generation.=================Begin Activation Context Generation.Input Parameter:Flags = 0ProcessorArchitecture = x86CultureFallBacks = en-US;enManifestPath = G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\paul.dllAssemblyDirectory = G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\Application Config File = -----------------INFO: Parsing Manifest File G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\paul.dll.INFO: Manifest Definition Identity is (null).INFO: Activation Context generation succeeded.End Activation Context Generation.=================Begin Activation Context Generation.Input Parameter:Flags = 0ProcessorArchitecture = x86CultureFallBacks = en-US;enManifestPath = G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\IVStudiosBETA1.asiAssemblyDirectory = G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\Application Config File = -----------------INFO: Parsing Manifest File G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\IVStudiosBETA1.asi.INFO: Manifest Definition Identity is (null).INFO: Reference: Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"INFO: Resolving reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".INFO: Resolving reference for ProcessorArchitecture x86. INFO: Resolving reference for culture Neutral. 	INFO: Applying Binding Policy.   INFO: No publisher policy found.   INFO: No binding policy redirect found. 	INFO: Begin assembly probing.   INFO: Did not find the assembly in WinSxS.   INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.   INFO: Attempt to probe manifest at G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\Microsoft.VC90.DebugCRT.DLL.   INFO: Attempt to probe manifest at G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\Microsoft.VC90.DebugCRT.MANIFEST.   INFO: Attempt to probe manifest at G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.   INFO: Attempt to probe manifest at G:\Games\Steam\steamapps\common\grand theft auto iv\GTAIV\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.   INFO: Did not find manifest for culture Neutral. 	INFO: End assembly probing.ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".ERROR: Activation Context generation failed.End Activation Context Generation.=================Begin Activation Context Generation.Input Parameter:Flags = 0ProcessorArchitecture = x86CultureFallBacks = en-US;enManifestPath = C:\Windows\system32\dxdiagn.dllAssemblyDirectory = C:\Windows\system32\Application Config File = -----------------INFO: Parsing Manifest File C:\Windows\system32\dxdiagn.dll.INFO: Manifest Definition Identity is Microsoft.Windows.DxDiag,processorArchitecture="x86",type="win32",version="1.0.0.0".INFO: Reference: Microsoft.Windows.Common-Controls,language="*",processorArchitecture="x86",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0"INFO: Resolving reference Microsoft.Windows.Common-Controls,language="*",processorArchitecture="x86",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0".INFO: Resolving reference for ProcessorArchitecture x86. INFO: Resolving reference for culture en-US. 	INFO: Applying Binding Policy.   INFO: No publisher policy found.   INFO: No binding policy redirect found. 	INFO: Begin assembly probing.   INFO: Did not find the assembly in WinSxS.   INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.Windows.Common-Controls\6.0.0.0_en-US_6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL.   INFO: Attempt to probe manifest at C:\Windows\system32\en-US\Microsoft.Windows.Common-Controls.DLL.   INFO: Attempt to probe manifest at C:\Windows\system32\en-US\Microsoft.Windows.Common-Controls.MANIFEST.   INFO: Attempt to probe manifest at C:\Windows\system32\en-US\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.DLL.   INFO: Attempt to probe manifest at C:\Windows\system32\en-US\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.MANIFEST.   INFO: Did not find manifest for culture en-US. 	INFO: End assembly probing. INFO: Resolving reference for culture en. 	INFO: Applying Binding Policy.   INFO: No publisher policy found.   INFO: No binding policy redirect found. 	INFO: Begin assembly probing.   INFO: Did not find the assembly in WinSxS.   INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.Windows.Common-Controls\6.0.0.0_en_6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL.   INFO: Attempt to probe manifest at C:\Windows\system32\en\Microsoft.Windows.Common-Controls.DLL.   INFO: Attempt to probe manifest at C:\Windows\system32\en\Microsoft.Windows.Common-Controls.MANIFEST.   INFO: Attempt to probe manifest at C:\Windows\system32\en\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.DLL.   INFO: Attempt to probe manifest at C:\Windows\system32\en\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.MANIFEST.   INFO: Did not find manifest for culture en. 	INFO: End assembly probing. INFO: Resolving reference for culture Neutral. 	INFO: Applying Binding Policy.   INFO: Auto Servicing Policy redirected assembly version.   INFO: Post policy assembly identity is Microsoft.Windows.Common-Controls,processorArchitecture="x86",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.6001.18000". 	INFO: Begin assembly probing.   INFO: Attempt to probe manifest at C:\Windows\WinSxS\manifests\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6001.18000_none_5cdbaa5a083979cc.manifest.   INFO: Manifest found at C:\Windows\WinSxS\manifests\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6001.18000_none_5cdbaa5a083979cc.manifest. 	INFO: End assembly probing.INFO: Resolving reference Microsoft.Windows.Common-Controls.mui,language="*",processorArchitecture="x86",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.6001.18000".INFO: Resolving reference for ProcessorArchitecture x86. INFO: Resolving reference for culture en-US. 	INFO: Applying Binding Policy.   INFO: No publisher policy found.   INFO: No binding policy redirect found. 	INFO: Begin assembly probing.   INFO: Did not find the assembly in WinSxS.   INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.Windows.Common-Controls.mui\6.0.6001.18000_en-US_6595b64144ccf1df\Microsoft.Windows.Common-Controls.mui.DLL.   INFO: Attempt to probe manifest at C:\Windows\system32\en-US\Microsoft.Windows.Common-Controls.mui.DLL.   INFO: Attempt to probe manifest at C:\Windows\system32\en-US\Microsoft.Windows.Common-Controls.mui.MANIFEST.   INFO: Attempt to probe manifest at C:\Windows\system32\en-US\Microsoft.Windows.Common-Controls.mui\Microsoft.Windows.Common-Controls.mui.DLL.   INFO: Attempt to probe manifest at C:\Windows\system32\en-US\Microsoft.Windows.Common-Controls.mui\Microsoft.Windows.Common-Controls.mui.MANIFEST.   INFO: Did not find manifest for culture en-US. 	INFO: End assembly probing. INFO: Resolving reference for culture en. 	INFO: Applying Binding Policy.   INFO: No publisher policy found.   INFO: No binding policy redirect found. 	INFO: Begin assembly probing.   INFO: Did not find the assembly in WinSxS.   INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.Windows.Common-Controls.mui\6.0.6001.18000_en_6595b64144ccf1df\Microsoft.Windows.Common-Controls.mui.DLL.   INFO: Attempt to probe manifest at C:\Windows\system32\en\Microsoft.Windows.Common-Controls.mui.DLL.   INFO: Attempt to probe manifest at C:\Windows\system32\en\Microsoft.Windows.Common-Controls.mui.MANIFEST.   INFO: Attempt to probe manifest at C:\Windows\system32\en\Microsoft.Windows.Common-Controls.mui\Microsoft.Windows.Common-Controls.mui.DLL.   INFO: Attempt to probe manifest at C:\Windows\system32\en\Microsoft.Windows.Common-Controls.mui\Microsoft.Windows.Common-Controls.mui.MANIFEST.   INFO: Did not find manifest for culture en. 	INFO: End assembly probing.INFO: Parsing Manifest File C:\Windows\WinSxS\manifests\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6001.18000_none_5cdbaa5a083979cc.manifest.INFO: Manifest Definition Identity is Microsoft.Windows.Common-Controls,processorArchitecture="x86",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.6001.18000".INFO: Reference: Microsoft.Windows.Common-Controls.Resources,language="*",processorArchitecture="x86",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0"INFO: Resolving reference Microsoft.Windows.Common-Controls.Resources,language="*",processorArchitecture="x86",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0".INFO: Resolving reference for ProcessorArchitecture x86. INFO: Resolving reference for culture en-US. 	INFO: Applying Binding Policy.   INFO: Auto Servicing Policy redirected assembly version.   INFO: Post policy assembly identity is Microsoft.Windows.Common-Controls.Resources,language="en-US",processorArchitecture="x86",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.6001.18000". 	INFO: Begin assembly probing.   INFO: Attempt to probe manifest at C:\Windows\WinSxS\manifests\x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.6001.18000_en-us_72e6f33f34dfabb9.manifest.   INFO: Manifest found at C:\Windows\WinSxS\manifests\x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.6001.18000_en-us_72e6f33f34dfabb9.manifest. 	INFO: End assembly probing.INFO: Parsing Manifest File C:\Windows\WinSxS\manifests\x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.6001.18000_en-us_72e6f33f34dfabb9.manifest.INFO: Manifest Definition Identity is Microsoft.Windows.Common-Controls.Resources,language="en-us",processorArchitecture="x86",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.6001.18000".INFO: Activation Context generation succeeded.End Activation Context Generation.

 

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

Good grief, I will never understand why M$ has to make it such a pain to run standard libraries on their crappy OS...

 

http://kobyk.wordpress.com/2007/07/20/dyna...-visual-c-2005/

 

This would also explain why San An Studios has issues with Vista users. I'm sure I'm not the only one who's tired of the MSDev team "deciding" what is standard and what isn't, despite there being a worldwide governing body that already does this.

 

Sigh. Sorry Overman, give me a day or so to patch around this.

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

 

ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".

 

*pokes ceedj* tounge.gif Do you copy the dll from the right paths after release building? Maybe do both builds and make sure their size is different. Usually the release build is smaller than the debug build but not always. You can also download DependencyWalker (http://www.dependencywalker.com/) and make sure that IVStudiosBETA1.asi doesn't use MSVCP90D.dll/MSVCR90D.dll

 

zsOverman, if you can't really wait... you can install Visual C++ Express and that should fix it up for you smile.gif

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

ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".

 

*pokes ceedj* tounge.gif Do you copy the dll from the right paths after release building? Maybe do both builds and make sure their size is different. Usually the release build is smaller than the debug build but not always. You can also download DependencyWalker (http://www.dependencywalker.com/) and make sure that IVStudiosBETA1.asi doesn't use MSVCP90D.dll/MSVCR90D.dll

 

zsOverman, if you can't really wait... you can install Visual C++ Express and that should fix it up for you smile.gif

Yes, I did that. Also cleaned out the old manifest files. This wouldn't be so hard if I had a separate machine to install Vista on...

 

Anyway, none of the VC90 files show up in Dependency Walker, so I'll have him try again with the newest, cleanest file.

 

Just so you know, I'm not COMPLETELY crazy; there are hundreds of articles on these CRT issues with Vista and VC9. wink.gif

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

Just wanted to point out that myself and Overman got things working; I think by deleting all the intermediate linker files and whatnot, it finally built a proper release to use. The funny thing is, I'd expect the "clean" command to get rid of those files for me. Silly me, right?

 

Again, many thanks for your patience and suggestions, especially considering how bad I am at this. wink.gif

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

Some things might be spawned by other scripts, and some of the cars might be IPL created (there were a lot of these in San Andreas). I got rid of the cops (most of them anyway) with SetCreateRandomCops(0); I found it in ScriptingDirty.h, but it's basically a bool (on/1 or off/0). You should check ScriptingDirty for others like this.

 

EDIT: You could try this for the airport:

 

In Scripting.h:

 

 

static void TerminateAllScriptsWithThisName(const ch *script) { NativeInvoke::Invoke<scriptVoid>("TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME", script); }

 

 

Call with:

 

TerminateAllScriptsWithThisName("ambairportarea");

 

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

Some things might be spawned by other scripts, and some of the cars might be IPL created (there were a lot of these in San Andreas). I got rid of the cops (most of them anyway) with SetCreateRandomCops(0); I found it in ScriptingDirty.h, but it's basically a bool (on/1 or off/0). You should check ScriptingDirty for others like this.

 

EDIT: You could try this for the airport:

 

In Scripting.h:

 

 

static void TerminateAllScriptsWithThisName(const ch *script) { NativeInvoke::Invoke<scriptVoid>("TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME", script); }

 

 

Call with:

 

TerminateAllScriptsWithThisName("ambairportarea");

 

Already had randomcops in it still some cops are there (but on a static place so not random )

 

For the other one seems indeed deleted some airport stuff.

but not all so gess neet to search more and more tounge.gif

 

 

thnx m8

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

  • 3 weeks later...

Looks interesting, but so far all I’ve seen are simple spawn mods and such.

I just quickly looked over some of the samples, and it looks like I should be able

to make whole new custom missions with this hook.

Almost looks like Cleo (from SA) for GTA IV.

Would that be correct?

 

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

Looks interesting, but so far all I’ve seen are simple spawn mods and such.

I just quickly looked over some of the samples, and it looks like I should be able

to make whole new custom missions with this hook.

Almost looks like Cleo (from SA) for GTA IV.

Would that be correct?

Yeah you're right. You can make scripts in C++ with this. Or if you like C# or VB.NET you can get the .NET Hook (much easier).

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

What didnt work in following code? (game freezes)

 

 

 { 	if (HasModelLoaded(m_CarModel)) 	{   Ped ped;   Vehicle vehicle;   f32 x,y,z;   Blip blip;   Player playerIndex = ConvertIntToPlayerIndex(GetPlayerId());   GetPlayerChar(playerIndex, &ped);   GetCharCoordinates(ped, &x, &y, &z);       CreateCar(m_CarModel, x, y, z, &vehicle, true);   AddBlipForCar(vehicle, &blip);   MarkModelAsNoLongerNeeded(m_CarModel);       while (IsCarDead(vehicle)==false)   {    	   	if (IsCarDead(vehicle))   	{   	RemoveBlip(blip);   	}   	Wait(100);   }   m_State = StateDefault; 	} }

 

 

I created a car, added blip to it. And so idea is to remove blip when car is destroyed.

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

It says right in the comments, no infinite loops in Customthread. (the sample program)

the "while" loop creates an infinite loop, thus freezing the rest of the game until the condition is met,

which will never happen without the rest of the game running.

 

is that what your doing? if not it's something else then.

 

(it has nothing to do with creating a car.)

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

×
×
  • Create New...

Important Information

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