Quantcast

Jump to content

» «
Photo

[BETA] GTAIV .Net ScriptHook

2,921 replies to this topic
HazardX
  • HazardX

    pedestrian mangler

  • Members
  • Joined: 13 Dec 2008

#1921

Posted 02 May 2010 - 07:05 PM

QUOTE (AngryAmoeba @ May 2 2010, 19:22)
I was super-excited for this update, but unfortunately the C++ scripthook v0.5.0 is giving me crashes. cryani.gif

But anyway, could someone tell me how the handling of Components in Player.Skin has changed? My script with the line "Player.Skin.SetComponentModel(PedComponent.Backpack, 3)" throws an error.

You are using version 1.0.3.0 of the game? The problem with older version is that they usually aren't tested again later on and if anything gets messed up for old versions during development chances are high that it will stay messed up. You could try to download an old version of the C++ ScriptHook and copy the ScriptHook.dll over the one contained in this archive.

The new ped component handling is much more flexible. Now you are able to enumerate through available models and textures for each component and stuff like that. Setting the component model works like this:

Player.Skin.Component.Bags.ModelIndex = 3

Areppon
  • Areppon

    Square Civilian

  • Members
  • Joined: 08 Apr 2007

#1922

Posted 02 May 2010 - 08:09 PM

@Hazard,

Is it advisable to update my game to version 6 before using this new version of the scripthook? Or will it work fine with game version 4? I'm working on my first mod for GTA4 but I'm not very far as yet so this would be the time to change. I'm already using VS2010 and Framework 4. If it can be avoided I'd like to wait to update my game until GK's Fuel Mod is updated to version 6 if he plans to do it.

CyberOps
  • CyberOps

    Snitch

  • Members
  • Joined: 08 May 2008

#1923

Posted 02 May 2010 - 08:22 PM Edited by CyberOps, 02 May 2010 - 08:28 PM.

i still don't think it works, as in the scripthook log i dont see this .netscripthook being loaded and also with the ~key i can not open any console ?????

Areppon
  • Areppon

    Square Civilian

  • Members
  • Joined: 08 Apr 2007

#1924

Posted 02 May 2010 - 08:55 PM

QUOTE (CyberOps @ May 2 2010, 20:22)
i still don't think it works, as in the scripthook log i dont see this .netscripthook being loaded and also with the ~key i can not open any console ?????

@Cyber,
I think the answer to your question is the same as mine. In short... No. I'm using 1.0.4.0 because I can't live without GK's Fuel Mod. I attempted to load the game with the new hook and it crashed. Specifically, the game didn't crash, the hook did with a visual c++ runtime library error... which ended in CTD.
Obvious first assumption considering the changes that were made is that it's only compatible with the new game version 6. Is there anyone that can confirm this?

CyberOps
  • CyberOps

    Snitch

  • Members
  • Joined: 08 May 2008

#1925

Posted 02 May 2010 - 08:58 PM

i am using the new game version wink.gif and in EFLC it doesn't load either i think sad.gif

CyberOps
  • CyberOps

    Snitch

  • Members
  • Joined: 08 May 2008

#1926

Posted 02 May 2010 - 09:10 PM

Strange thing is, when i look in aru's scripthook log i see all my mods being loaded but the .net scripthook is not being loaded and also no log of this scripthook is being created, also using the ~key does not show the console so it probably does not run sad.gif

thaCURSEDpie
  • thaCURSEDpie

    GTA:IV scripter

  • Members
  • Joined: 01 Jul 2007

#1927

Posted 02 May 2010 - 09:31 PM

Do you have the .Net Framework 4?

http://www.microsoft...&displaylang=en

CyberOps
  • CyberOps

    Snitch

  • Members
  • Joined: 08 May 2008

#1928

Posted 02 May 2010 - 09:31 PM

yeah already installed that wink.gif

CyberOps
  • CyberOps

    Snitch

  • Members
  • Joined: 08 May 2008

#1929

Posted 02 May 2010 - 09:39 PM

Ok figured out the problem, i needed a new c++ redistributable version wink.gif use this one if your .netscripthook doesn't work http://www.microsoft...23-37bf0912db84

thaCURSEDpie
  • thaCURSEDpie

    GTA:IV scripter

  • Members
  • Joined: 01 Jul 2007

#1930

Posted 02 May 2010 - 09:46 PM

Glad to hear you figured it out smile.gif

4c1d
  • 4c1d

    Player Hater

  • Members
  • Joined: 14 Apr 2010

#1931

Posted 03 May 2010 - 12:13 AM

I get an error in 1.0.0.4 and 1.0.6.0


GTAIV.exe - Unable To Locate Componement
This applocation has failed to start vecause MSVCR100.dll was not found. Re-installing the application may fix this problem.

I installed .net framework 4

HazardX
  • HazardX

    pedestrian mangler

  • Members
  • Joined: 13 Dec 2008

#1932

Posted 03 May 2010 - 12:22 AM

QUOTE (4c1d @ May 3 2010, 01:13)
I get an error in 1.0.0.4 and 1.0.6.0

GTAIV.exe - Unable To Locate Componement
This applocation has failed to start vecause MSVCR100.dll was not found. Re-installing the application may fix this problem.

I installed .net framework 4

Two postings before yours... that's your solution.

AngryAmoeba
  • AngryAmoeba

    Symbiote

  • Members
  • Joined: 12 Jan 2009

#1933

Posted 03 May 2010 - 01:38 AM

QUOTE (HazardX @ May 2 2010, 13:05)
QUOTE (AngryAmoeba @ May 2 2010, 19:22)
I was super-excited for this update, but unfortunately the C++ scripthook v0.5.0 is giving me crashes. cryani.gif

But anyway, could someone tell me how the handling of Components in Player.Skin has changed? My script with the line "Player.Skin.SetComponentModel(PedComponent.Backpack, 3)" throws an error.

You are using version 1.0.3.0 of the game? The problem with older version is that they usually aren't tested again later on and if anything gets messed up for old versions during development chances are high that it will stay messed up. You could try to download an old version of the C++ ScriptHook and copy the ScriptHook.dll over the one contained in this archive.

The new ped component handling is much more flexible. Now you are able to enumerate through available models and textures for each component and stuff like that. Setting the component model works like this:

Player.Skin.Component.Bags.ModelIndex = 3

Thanks, the old C++ scripthook works fine with the new .NET scripthook. Also thanks for the info on ped components.

Here's another new error thrown on a .cs script: "in Line 0: Unrecognized option: '/optioninfer'"

Since the error is on line 0, I'm not sure how to fix this.

HazardX
  • HazardX

    pedestrian mangler

  • Members
  • Joined: 13 Dec 2008

#1934

Posted 03 May 2010 - 11:28 AM

QUOTE (AngryAmoeba @ May 3 2010, 02:38)
Thanks, the old C++ scripthook works fine with the new .NET scripthook. Also thanks for the info on ped components.

Here's another new error thrown on a .cs script: "in Line 0: Unrecognized option: '/optioninfer'"

Since the error is on line 0, I'm not sure how to fix this.

Glad to hear that the old version of the C++ hook works!
The /optioninfer is my fault. I didn't test uncompiled CS scripts with the new hook. Here is an updated version to fix it:

NEW VERSION:

GTAIV .Net Script Hook v1.6.1.2 BETA

Changes in v1.6.1.2 BETA:
- Fixed a problem that prevented uncompiled .cs scripts from being loaded.
- Includes the "for Developers\bin" folder again, containing the ScriptHookDotNet.dll
- Reference the above DLL in VS2010 script projects to get IntelliSense comments.

AngryAmoeba
  • AngryAmoeba

    Symbiote

  • Members
  • Joined: 12 Jan 2009

#1935

Posted 03 May 2010 - 04:09 PM

Thank you for the quick fix! You've done a fantastic job with this scripthook. cookie.gif icon14.gif

Areppon
  • Areppon

    Square Civilian

  • Members
  • Joined: 08 Apr 2007

#1936

Posted 03 May 2010 - 05:39 PM Edited by Areppon, 03 May 2010 - 06:44 PM.

According to the info in the link for 2010 runtime libraries, it's for computers without VS2010. I have it, but I installed them anyway. Still same VC++ runtime libraries error. Says the application was asked to close in an unusual way. Has anyone been successful in using this new version with 1.0.4.0?

@Rooftop Thanks, I'll check it out. As I mentioned in my PM to you I'm making a bus mod too, not for competition but rather for my own amusement, so I appreciate your help. Any further questions I have I'll post in your bus mod thread.

Sorry everyone for the off topic blush.gif

@Hazard Great work! icon14.gif I haven't gotten the new one working yet but thank you for opening the world of GTA4 to us non C++ers! Both you and Aru should be paid for this! cookie.gif cookie.gif cookie.gif cookie.gif cookie.gif cookie.gif cookie.gif cookie.gif cookie.gif

Threepwood
  • Threepwood

    Calm like a bomb.

  • Members
  • Joined: 13 Jul 2008

#1937

Posted 03 May 2010 - 06:06 PM

Would be a good idea to host each lastversion for every GTA Patch, for example Version 0.893 BETA for Ptch 4 (1.0.4.0).

Btw I have tried many times now to get any input from the gamepad, is it maybe not activated by C++ or the wrapper so there could be a little chance for future releases?

AngryAmoeba
  • AngryAmoeba

    Symbiote

  • Members
  • Joined: 12 Jan 2009

#1938

Posted 03 May 2010 - 06:19 PM Edited by AngryAmoeba, 03 May 2010 - 06:22 PM.

QUOTE (Threepwood @ May 3 2010, 12:06)
Would be a good idea to host each lastversion for every GTA Patch, for example Version 0.893 BETA for Ptch 4 (1.0.4.0).

You can still find the 0.893 beta via Google if you want. But I do think it would be a good idea to have old versions in the first post. It would also be good to update the first post with version 1.6.1.2.

LMS
  • LMS

    Punk-ass Bitch

  • Members
  • Joined: 30 Jun 2005

#1939

Posted 03 May 2010 - 07:10 PM

QUOTE (Threepwood @ May 3 2010, 19:06)
Btw I have tried many times now to get any input from the gamepad,  is it maybe not activated by C++ or the wrapper so there could be a little chance for future releases?

If you want to read gamepad input you should take a look at DirectInput (C++) or if you want to do it in any .net language look at SlimDX, which also supports DirectInput.

Metalmurphy
  • Metalmurphy

    Player Hater

  • Members
  • Joined: 24 Mar 2008

#1940

Posted 04 May 2010 - 01:21 AM Edited by Metalmurphy, 04 May 2010 - 02:49 AM.

wow, I just browsed here and was surprised to see you updated it for EFLC. So awesome!

Threepwood
  • Threepwood

    Calm like a bomb.

  • Members
  • Joined: 13 Jul 2008

#1941

Posted 04 May 2010 - 05:47 AM

QUOTE (LMS @ May 3 2010, 19:10)
If you want to read gamepad input you should take a look at DirectInput (C++) or if you want to do it in any .net language look at SlimDX, which also supports DirectInput.

Port the whole EPM Mod to C++ means to learn C++ now. But thanks, at least I know now it is possible somehow. I'll see if I switch the language.

NTAuthority
  • NTAuthority

    member_title

  • The Yardies
  • Joined: 09 Sep 2008
  • European-Union

#1942

Posted 04 May 2010 - 06:45 AM

QUOTE (LMS @ May 3 2010, 21:10)
If you want to read gamepad input you should take a look at DirectInput (C++) or if you want to do it in any .net language look at SlimDX, which also supports DirectInput.

I'd recommend using (if these are correct for IV, where'd the old IS_KEY_PRESSED go?) IS_CONTROL_PRESSED (or IS_BUTTON_PRESSED, really, why did IS_KEY_PRESSED have to go?), so you don't have to take care of configuration issues as you'd have to with DInput.

X-bone
  • X-bone

    Square Civilian

  • Members
  • Joined: 18 Apr 2010

#1943

Posted 04 May 2010 - 06:53 AM


POLICE.SireneOn();


does not work..why?????? help me

fattso
  • fattso

    Player Hater

  • Members
  • Joined: 25 Dec 2009

#1944

Posted 04 May 2010 - 09:32 AM

thanks for the new version, but there is a little annoying bug in the ingame console

if i want to spawn something that doesn't exists the game crashes

for example "spawn esperand" game crashes, really annoying for a little typo wink.gif


Threepwood
  • Threepwood

    Calm like a bomb.

  • Members
  • Joined: 13 Jul 2008

#1945

Posted 04 May 2010 - 01:22 PM

QUOTE (NTAuthority @ May 4 2010, 06:45)
QUOTE (LMS @ May 3 2010, 21:10)
If you want to read gamepad input you should take a look at DirectInput (C++) or if you want to do it in any .net language look at SlimDX, which also supports DirectInput.

I'd recommend using (if these are correct for IV, where'd the old IS_KEY_PRESSED go?) IS_CONTROL_PRESSED (or IS_BUTTON_PRESSED, really, why did IS_KEY_PRESSED have to go?), so you don't have to take care of configuration issues as you'd have to with DInput.

Thanks! Still, using native calls do not even give anything back I could use ingame, tho I do not even know how to use them correctly, but however: thanks for any input, could have worked at least.

SlimDX aint no alternative as well, I dont want people to even download more and more things just to get some awesome functions in IV.. "keep it simple" is my way, they already have to watch for so much things to be downloaded/installed (proper patch, proper hook, proper mod versions..) if using .NET mods.

AngryAmoeba
  • AngryAmoeba

    Symbiote

  • Members
  • Joined: 12 Jan 2009

#1946

Posted 04 May 2010 - 06:44 PM

QUOTE (X-bone @ May 4 2010, 00:53)
POLICE.SireneOn();


does not work..why?????? help me

Just a guess, but maybe it should be Police.SirenOn()?

Homeboy25do
  • Homeboy25do

    Rat

  • Members
  • Joined: 24 Aug 2009

#1947

Posted 04 May 2010 - 08:47 PM

would it work with gta iv 1.0.0.4 (patch 5) ?

i would test lcpdfr 0.90D but the game crashs.

but here stand

QUOTE
"Max. supported game versions:
GTA IV 1.0.6.0
EFLC 1.1.1.0"


1.0.0.4 is less, it must work, or ?

but in readme of lcpdfr is stand

QUOTE
"Version Information
This version of LCPDFR is compatible with all versions of GTA IV and EFLC."


when it goes, did trafficflow also running at 1.0.0.4 ?

Homeboy25do
  • Homeboy25do

    Rat

  • Members
  • Joined: 24 Aug 2009

#1948

Posted 04 May 2010 - 10:23 PM

ok i have fix it, i need the older scripthook 0.4.0 with the newer net scripthook for patch 1.0.0.4

Vickal
  • Vickal

    Player Hater

  • Members
  • Joined: 04 May 2010

#1949

Posted 05 May 2010 - 07:01 AM

hey

does dotnetscripthook support WIndows 7 64 with 1.0.6.0 ?

Because it seems that it doesnt work.


I use the newest Asiloader from Alex, and the newest dotnetscripthook. My GTA version is 1.0.6.0.


can u help me?

Andrew
  • Andrew

  • Inactive Staff
  • Joined: 21 Jul 2003
  • None

#1950

Posted 05 May 2010 - 07:02 AM

If you've got problems with LCPDFR then post in the LCPD FR topic.




5 user(s) are reading this topic

0 members, 5 guests, 0 anonymous users