Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

      1. News
      2. Red Dead Online
      3. The Armadillo Inn
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

HazardX

[BETA] GTAIV .Net ScriptHook

Recommended Posts

Remos

 

yes, you are right. Native.Fucntion.Call does not support arrays or Vector3. i included Vector3 support now, but there seems to be another problem with functions that take a vector3 pointer. the results are complete nonsense. i guess the game handles them in a different way. still trying to figure it out.

Cool, thanks for the reply.

I wish R* would someday make a game that we could actually mod without huge amounts of reverse engineering.

Share this post


Link to post
Share on other sites
CoMPMStR

 

Hey , the reload script doesn't work. After I will load my another save , it will crash after 1 minute

Does this happen all the time for you, or just sometimes?

 

@all: Has anyone else noticed the problem?

Well , always. But I noticed that the time when crash appear randomly changes - one time it crashes when I get out of savehouse , another time it crashes after 5 minutes of playing. By the way - just like I said - I start my game , game automatically loads my save - it's okay - but when I load my another save , then it crashes.

I have to second this. I also have these random crashes after reloading the scripts. I usually just exit the game anyway to avoid the crashing.

Share this post


Link to post
Share on other sites
amisnaru

Please tell me you're working on a 1.0.2.0 version inlove.gif

Share this post


Link to post
Share on other sites
HazardX
Please tell me you're working on a 1.0.2.0 version inlove.gif

Yes, i am. smile.gif Still got some problems to solve, but it will be ready soon.

Share this post


Link to post
Share on other sites
SlingShotUK
Please tell me you're working on a 1.0.2.0 version  inlove.gif

Yes, i am. smile.gif Still got some problems to solve, but it will be ready soon.

Thank god for people like you HazardX (includig Aru, Alexander et al)..

 

Great that your on scene and continually providing us with these brilliant releases.

 

The .NET hook is the most exciting release I've seen. I haven't modded my game yet, but intend to give play with your hook once I've played the game a bit more and released some more movies. I was going to try and learn the C++ hook but when you released this I must admit it looked a lot more up my street. I'm a web programmer with over 10 years experience so should be able to pick up the syntax of .NET pretty quickly I hope.

 

I was just thinking it could be quite cool if you had your own forum for this hook - a place where people could share their code and ask questions on various fecets of the system. I'm going to have lots of simple .NET related questions which would probably just clog up this thread, whereas on a special forum it would be a lot easier to ask them.

 

Keep up the awesome work.. This is such an exciting project.. The task developments are incredible...

Share this post


Link to post
Share on other sites
HazardX

NEW VERSION:

 

GTAIV .Net Script Hook v0.80 BETA

 

Changes in Version 0.80 BETA:

- added support for game version 1.0.2.0 (thanks to aru)

- fixed several crashing problems in the constructor of scripts

- Improved performance alot (especially when accessing many objects)

- You can now call Wait() inside Startup() of your script

- It will now reject to load scripts in ranked Multiplayer. thanks to C06alt for the great idea!

- Added basic Object and Animation support

- Added a script example that uses an external configuration file. thanks to CoMPMStR for the idea!

- Added a script example that'll make you smoke a spliff. wink.gif thanks to iriedreadlock23 for the infos!

- Added a script example that syncs ingame time with realtime

- Improved existing examples

- some minor renames again

- Added more functions, tasks and a bit of everything

 

 

Animation example:

 

      Player.Character.Animation.Play(anims, "create_spliff", animflags)     Wait(1600)     spliff = World.CreateObject(&HD130ADEF, Player.Character.Position)     spliff.AttachToPed(Player.Character, Bone.RightHand, New Vector3(0.14F, 0.03F, 0.04F), New Vector3(2.21F, -0.12F, 0.0F))     Player.Character.Animation.WaitUntilFinished(anims, "create_spliff")

 

 

 

@SlingShotUK : Thanks, i really appreciate that! I'm pretty sure that you won't have much problems with .Net. It is really easy to learn and it is actually pretty hard to do something wrong. smile.gif

BTW: I absolutely LOVE your "You can't escape the law" video! Definately one of the best GTA4 videos ever!

Edited by HazardX

Share this post


Link to post
Share on other sites
WeNoN

HELP!! error "R6030 - CRT not initialized"

Share this post


Link to post
Share on other sites
HazardX

 

HELP!! error "R6030 - CRT not initialized"

This is a bug in the new AsiLoader (based on dsound.dll). confused.gif i guess Alexander has to update the AsiLaoder again. The AsiLaoder in XliveLess works great, though.

Share this post


Link to post
Share on other sites
KewlAzMe

nvm... you just addressed it

Share this post


Link to post
Share on other sites
WeNoN

 

HELP!! error "R6030 - CRT not initialized"

This is a bug in the new AsiLoader (based on dsound.dll). confused.gif i guess Alexander has to update the AsiLaoder again. The AsiLaoder in XliveLess works great, though.

 

 

But with XliveLess I can't connect with WindowsLive

Share this post


Link to post
Share on other sites
HazardX
But with XliveLess I can't connect with WindowsLive

Thats true. I'll try to find a workaround...

Share this post


Link to post
Share on other sites
SlingShotUK
NEW VERSION:

 

GTAIV .Net Script Hook v0.80 BETA

 

Changes in Version 0.80 BETA:

- added support for game version 1.0.2.0 (thanks to aru)

- fixed several crashing problems in the constructor of scripts

- Improved performance alot (especially when accessing many objects)

- You can now call Wait() inside Startup() of your script

- It will now reject to load scripts in ranked Multiplayer. thanks to C06alt for the great idea!

- Added basic Object and Animation support

- Added a script example that uses an external configuration file. thanks to CoMPMStR for the idea!

- Added a script example that'll make you smoke a spliff. wink.gif thanks to iriedreadlock23 for the infos!

- Added a script example that syncs ingame time with realtime

- Improved existing examples

- some minor renames again

- Added more functions, tasks and a bit of everything

 

 

Animation example:

 

      Player.Character.Animation.Play(anims, "create_spliff", animflags)     Wait(1600)     spliff = World.CreateObject(&HD130ADEF, Player.Character.Position)     spliff.AttachToPed(Player.Character, Bone.RightHand, New Vector3(0.14F, 0.03F, 0.04F), New Vector3(2.21F, -0.12F, 0.0F))     Player.Character.Animation.WaitUntilFinished(anims, "create_spliff")

 

 

 

@SlingShotUK : Thanks, i really appreciate that! I'm pretty sure that you won't have much problems with .Net. It is really easy to learn and it is actually pretty hard to do something wrong. smile.gif

BTW: I absolutely LOVE your "You can't escape the law" video! Definately one of the best GTA4 videos ever!

Fantastic release HazardX.. I really want to check out the smoking example - that could be another great thing to use when making movies.

 

Love the examples you have added to this release - just what I need to get a handle on how this all works.

 

Just to check, you are essentially building an object orientated API to the game which makes use of all the natives without us having to call them directly. But, you have added support so that we can call any natives we want - even the ones you haven't built into objects so far? So using your hook I can experiment totally with all the natives the game has to offer?

I really like how you've built this.. Using easy to understand functions and objects makes total sense.. Nice way to model how the game works so it's easier and less error prone for us to create our mods.

 

Hey thanks for the comment on my movie - that totally made my night!! Really appreciate you taking the time to watch.

Share this post


Link to post
Share on other sites
CoMPMStR

Just want to let you know, when I use Ped.IgnoreMinorShockingEvents = True it says there's an error with my script. If I take it out, everything works fine.

Share this post


Link to post
Share on other sites
HazardX

 

Just want to let you know, when I use Ped.IgnoreMinorShockingEvents = True it says there's an error with my script. If I take it out, everything works fine.

Thanks, i'll look into it. Many included functions are untested, because it is almost impossible to test them all myself. Thus it may happen that some of them do not work as expected or may lead to an error.

 

@SlingShotUK: Yes, this is correct. The .Net philosophy is to have a pure object oriented and typesafe programming environment. all functions are exposed by easy to understand and intutivly named objects. every function should be usable as soon as you are able to call it (ie. by retieving an object) without the need to think about any other preconditions on your side. the framework takes care of all required steps for you. if a function that is exposed by an object can not be called at this state (and thus breaks this rule) it has to throw an exception, which clearly points out why this operation is not possible at the moment. Visual Studio, in addition, informs you about errors that are sure to cause an exception right as you type the code. It also provides live information of what methods an object contains, as soon as you try to access the contained methods of an object. Thus you don't need to learn the language or the class structure, since the environment itself will tell you what you can do and how you have to do it. as said, it is very hard to make errors in dotnet. smile.gif

you are also correct about the ability to call the native script functions. I've implemented a way to call all native functions directly (even those unimplemented by me). It automatically converts all of the included object classes and all standard value types into the format required by the game. you basically just need to call the native with the correct parameters and the framework will do the rest for you. You just need to privide the correct parameters, as the framework has no way to figure them out by itself.

Edited by HazardX

Share this post


Link to post
Share on other sites
KewlAzMe

Well i had the crashing problem with the dsound.dll loader. Now using the xliveless version, which doesn't crash. But the bodyguard script still not working.

Share this post


Link to post
Share on other sites
HazardX
Well i had the crashing problem with the dsound.dll loader. Now using the xliveless version, which doesn't crash. But the bodyguard script still not working.

The script is in the "scripts" subfolder? strange. Is a "ScriptHookDotNet.log" file in the same folder as the "ScriptHookDotNet.asi"? If yes, what does it contain?

Share this post


Link to post
Share on other sites
SlingShotUK

 

@SlingShotUK: Yes, this is correct. The .Net philosophy is to have a pure object oriented and typesafe programming environment. all functions are exposed by easy to understand and intutivly named objects. every function should be usable as soon as you are able to call it (ie. by retieving an object) without the need to think about any other preconditions on your side. the framework takes care of all required steps for you. if a function that is exposed by an object can not be called at this state (and thus breaks this rule) it has to throw an exception, which clearly points out why this operation is not possible at the moment. Visual Studio, in addition, informs you about errors that are sure to cause an exception right as you type the code. It also provides live information of what methods an object contains, as soon as you try to access the contained methods of an object. Thus you don't need to learn the language or the class structure, since the environment itself will tell you what you can do and how you have to do it. as said, it is very hard to make errors in dotnet. smile.gif

you are also correct about the ability to call the native script functions. I've implemented a way to call all native functions directly (even those unimplemented by me). It automatically converts all of the included object classes and all standard value types into the format required by the game. you basically just need to call the native with the correct parameters and the framework will do the rest for you. You just need to privide the correct parameters, as the framework has no way to figure them out by itself.

Excellent - thanks for the explanation HazardX. I installed Visual Studio Express C# last night and it seems quite straight forward - I do like the code completion functionality.

The way you have built it looks well thought out and user friendly, although the main problem is obviously learning how it all fits together and the correct way to call functions, setting up data structures etc.. But that's the fun I suppose.. wink.gif

 

I just looked at the spliff smoking example and just about get it. I assume that some of those calls were found by looking at mission scripts? The AttachToPed method which passes in some vectors would be pretty hard to find through experimentation I'd think. Am I right in thinking that timer.Start() will call the Tick() method after the time specified in the 'Interval' variable setup in the Startup() method? If you didn't have a Tick() method in your class I assume the default Tick() method would be called in your code? I'm assuming that is what the 'override' keywod does - takes over from any top level methods via inheritence?

Once tick() is called you then have to start the timer again or it will end?

 

Do you think there is any chance you could get a forum setup for this excellent mod?

Share this post


Link to post
Share on other sites
HazardX

 

I just looked at the spliff smoking example and just about get it. I assume that some of those calls were found by looking at mission scripts? The AttachToPed method which passes in some vectors would be pretty hard to find through experimentation I'd think. Am I right in thinking that timer.Start() will call the Tick() method after the time specified in the 'Interval' variable setup in the Startup() method? If you didn't have a Tick() method in your class I assume the default Tick() method would be called in your code? I'm assuming that is what the 'override' keywod does - takes over from any top level methods via inheritence?

Once tick() is called you then have to start the timer again or it will end?

 

Yes, i spent quite some time looking through decompiled scripts of the game. I guess the developers had some external or ingame tool that allows them to position two object in relation to each other, to get the desired offset and rotation values without "trail and error".

 

The scripts are indeed derived from a class called "Script". My tool looks for those classes and starts new instances of them. Then it will call methods of the script like Startup() or Tick(). The "override" is required to make sure that your code gets executed when my tool calls the method of the base class.

The Tick() method will always be called in the given interval. This is done by my tool and does not involve the "timer" seen in this example.

The timer is not part of the default script class. On the line "GTA.Timer timer = new GTA.Timer();" i define a new variable of class "GTA.Timer". This timer is a very simple class and provides only the Start and ElapsedTime methods. ElapsedTime always returns the elapsed time since Start was called the last time. It is helpful if you want to measure a timespan that differs from the script interval.

 

 

Do you think there is any chance you could get a forum setup for this excellent mod?

 

Yes, i could. At the moment the amount of questions and discussion doen't seem to require an own forum. Don't fear to clutter this thread. Just ask your questions and post your code examples if you wish to, as this is was the thread is made for.

Edited by HazardX

Share this post


Link to post
Share on other sites
hristi

It gives me the R6030 error. I hope you will fix it soon. colgate.gif

Share this post


Link to post
Share on other sites
SlingShotUK
Yes, i spent quite some time looking through decompiled scripts of the game. I guess the developers had some external or ingame tool that allows them to position two object in relation to each other, to get the desired offset and rotation values without "trail and error".

 

The scripts are indeed derived from a class called "Script". My tool looks for those classes and starts new instances of them. Then it will call methods of the script like Startup() or Tick(). The "override" is required to make sure that your code gets executed when my tool calls the method of the base class.

The Tick() method will always be called in the given interval. This is done by my tool and does not involve the "timer" seen in this example.

The timer is not part of the default script class. On the line "GTA.Timer timer = new GTA.Timer();" i define a new variable of class "GTA.Timer". This timer is a very simple class and provides only the Start and ElapsedTime methods. ElapsedTime always returns the elapsed time since Start was called the last time. It is helpful if you want to measure a timespan that differs from the script interval.

 

 

Do you think there is any chance you could get a forum setup for this excellent mod?

 

Yes, i could. At the moment the amount of questions and discussion doen't seem to require an own forum. Don't fear to clutter this thread. Just ask your questions and post your code examples if you wish to, as this is was the thread is made for.

Aha I see. Thanks for explaining Tick(). When I first looked at your code I wasn't sure how this was invoked but assumed it was probably a base mechanism. Sorry for lots of questions - which I'm bound to have more of in future. smile.gif I just find that I'm one of those developers who has to know what is going on under the surface to be able to get confident in the environment I'm working in.

 

It's incredibly exciting though.. The potential of what this opens up is immence.. The only thing I feel at the moment is that there doesn't seem to be a central resource that clearly documents how to do everything that has been discovered so far. I know there are wiki's showing functions and potential params but it would be great to be able to look up the elements we know 100% about to get quick information on how to make them work programmatically. I'm sure things will become clearer for me when I actually start playing though. wink.gif

 

One thing I was going to ask is whether it would be possible to develop some kind of development console for the game. A way to be able to issue commands directly while playing just for experimentation purposes. I.E You declare a ped, then call ped.die() while in game so you can see what happens? I imagine this is probably very very hard to achieve though.

When experiementing, do you have a test script that you keep editing and then restarting to game to get it to reload?

 

Any advice on the best way to test the scripts would be greatly appreciated.

Share this post


Link to post
Share on other sites
HazardX
One thing I was going to ask is whether it would be possible to develop some kind of development console for the game. A way to be able to issue commands directly while playing just for experimentation purposes. I.E You declare a ped, then call ped.die() while in game so you can see what happens? I imagine this is probably very very hard to achieve though.

When experiementing, do you have a test script that you keep editing and then restarting to game to get it to reload?

 

Any advice on the best way to test the scripts would be greatly appreciated.

I would love to include a console. I already had some thoughts about it, but i'm not yet sure how to best parse the input. Another problem is that i'm not able to block the input of scripts not written in .Net. they might execute stuff while writing to the console.

 

Testing the scripts requires indeed to restart the game. confused.gif The problem is that .Net code once loaded to memory has to remain there. Thus loading all scripts to memory again on every ingame load would clutter the game memory. But i don't want to waste one hotkey just for reloading. And reloading is just possible for plain scripts (*.vb or *.cs) in the "scripts" folder, not for compiled DLLs. I'll think about it, to have something ready for the next version.

 

To get the game to start faster, i use a mod that remvoes the legal screens and additionally start the game with the following parameters, to shorten loading times ALOT:

 

LaunchGTAIV.exe -windowed -height 600 -width 800 -renderquality 0 -shadowdensity 0 -texturequality 0 -novblank

 

Share this post


Link to post
Share on other sites
SlingShotUK
One thing I was going to ask is whether it would be possible to develop some kind of development console for the game. A way to be able to issue commands directly while playing just for experimentation purposes. I.E You declare a ped, then call ped.die() while in game so you can see what happens? I imagine this is probably very very hard to achieve though.

When experiementing, do you have a test script that you keep editing and then restarting to game to get it to reload?

 

Any advice on the best way to test the scripts would be greatly appreciated.

I would love to include a console. I already had some thoughts about it, but i'm not yet sure how to best parse the input. Another problem is that i'm not able to block the input of scripts not written in .Net. they might execute stuff while writing to the console.

 

Testing the scripts requires indeed to restart the game. confused.gif The problem is that .Net code once loaded to memory has to remain there. Thus loading all scripts to memory again on every ingame load would clutter the game memory. But i don't want to waste one hotkey just for reloading. And reloading is just possible for plain scripts (*.vb or *.cs) in the "scripts" folder, not for compiled DLLs. I'll think about it, to have something ready for the next version.

 

To get the game to start faster, i use a mod that remvoes the legal screens and additionally start the game with the following parameters, to shorten loading times ALOT:

 

LaunchGTAIV.exe -windowed -height 600 -width 800 -renderquality 0 -shadowdensity 0 -texturequality 0 -novblank

 

Aha, that's a clever idea!

 

So when you first developed this it must have been a very long process to test things out wasn't it?

I know when I'm developing complex web applications that you can 100% guarantee that almost every change made to a script will result in an error.. heh. Although it's just a simple CTRL-R to see the effect of the change - not a total reload of the browser. smile.gif

 

I imagine the built in validation in VS takes care of a lot of the obvious errors in coding.. But still.. It's got to be a frustrating process at times.. I suppose throwing in text outputs must help debugging.. E.G: text.output("Before call to ped die function").. type of thing..

 

 

Share this post


Link to post
Share on other sites
hristi

Please help! It's doesn't work for me..

I use the newest XLiveLess.

here's what my ScriptHookDotNet.log says file:

 

2009-01-27 21:27:07 - Initializing ScriptHookDotNet v0.73 BETA

 

2009-01-27 21:27:07 - SEARCHING FOR SCRIPTS...

2009-01-27 21:27:07 - Unable to load Assembly 'E:\Program Files\Rockstar Games\Grand Theft Auto IV\scripts\_PUT .NET SCRIPTS HERE': System.BadImageFormatException: Could not load file or assembly 'file:///E:\Program Files\Rockstar Games\Grand Theft Auto IV\scripts\_PUT .NET SCRIPTS HERE' or one of its dependencies. The module was expected to contain an assembly manifest.

File name: 'file:///E:\Program Files\Rockstar Games\Grand Theft Auto IV\scripts\_PUT .NET SCRIPTS HERE'

at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)

at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)

at System.Reflection.Assembly.LoadFrom(String assemblyFile)

at GTA.ScriptManager.LoadAssembly(String filename)

 

WRN: Assembly binding logging is turned OFF.

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

2009-01-27 21:27:07 - Loading Assembly 'E:\Program Files\Rockstar Games\Grand Theft Auto IV\scripts\Handheld Teleport Device Script By CoMPMStR.net.dll' ...

2009-01-27 21:27:07 - ...found script 'HandheldTeleportDeviceScript.CoMPMStR0'!

2009-01-27 21:27:07 - Loading Assembly 'E:\Program Files\Rockstar Games\Grand Theft Auto IV\scripts\Mega SuperJump Script By CoMPMStR.net.dll' ...

2009-01-27 21:27:07 - ...found script 'MegaSuperJumpScript.CoMPMStR0'!

2009-01-27 21:27:07 - DONE! 2 valid scripts found!

Share this post


Link to post
Share on other sites
HazardX
here's what my ScriptHookDotNet.log says file:

 

2009-01-27 21:27:07 - Initializing ScriptHookDotNet v0.73 BETA

 

You are using the old version 0.73, please download the new one.

Share this post


Link to post
Share on other sites
Otaconmgs

The .net scripthook has never worked for me. I keep getting a runtime error like this:

 

 

 

Runtime Error!

 

Program: C:...

 

R6030

-CRT not initialized

 

 

 

I have .net framework 3.5 SP1

and I code C++ with MS-Visual Studio 2008

 

I don't believe i'm missing anything, so why is it doing this? I have searched google for the error and other people have gotten it for other reasons. Has anyone else had this error?

Share this post


Link to post
Share on other sites
HazardX
The .net scripthook has never worked for me. I keep getting a runtime error like this:

 

 

R6030

-CRT not initialized

This is a problem with the new AsiLoader from Alexander. It refuses to load DLLs required by the .Net ScriptHook. The AsiLoader of XliveLess works correct.

Share this post


Link to post
Share on other sites
hristi
here's what my ScriptHookDotNet.log says file:

 

2009-01-27 21:27:07 - Initializing ScriptHookDotNet v0.73 BETA

 

You are using the old version 0.73, please download the new one.

I downloaded the new one but it's still not working..

here's what the log says in the gta4 root folder

 

 

2009-01-27 22:19:34 - Initializing ScriptHookDotNet v0.80 BETA

 

2009-01-27 22:19:34 - SEARCHING FOR SCRIPTS...

2009-01-27 22:19:34 - Loading Assembly 'E:\Program Files\Rockstar Games\Grand Theft Auto IV\scripts\Handheld Teleport Device Script By CoMPMStR.net.dll' ...

2009-01-27 22:19:34 - Loading Assembly 'E:\Program Files\Rockstar Games\Grand Theft Auto IV\scripts\Mega SuperJump Script By CoMPMStR.net.dll' ...

2009-01-27 22:19:34 - DONE! No DotNet script found!

 

2009-01-27 22:20:26 - STARTING SCRIPTS...

 

Share this post


Link to post
Share on other sites
HazardX

Don't miss the release of YAASIL - Yet Another ASI Loader ! It will run the .Net Scripthook without the R6030 problem. XliveLess does it correctly too.

 

 

 

I downloaded the new one but it's still not working..

here's what the log says in the gta4 root folder

 

 

2009-01-27 22:19:34 - Initializing ScriptHookDotNet v0.80 BETA

 

2009-01-27 22:19:34 - SEARCHING FOR SCRIPTS...

2009-01-27 22:19:34 - Loading Assembly 'E:\Program Files\Rockstar Games\Grand Theft Auto IV\scripts\Handheld Teleport Device Script By CoMPMStR.net.dll' ...

2009-01-27 22:19:34 - Loading Assembly 'E:\Program Files\Rockstar Games\Grand Theft Auto IV\scripts\Mega SuperJump Script By CoMPMStR.net.dll' ...

2009-01-27 22:19:34 - DONE! No DotNet script found!

 

2009-01-27 22:20:26 - STARTING SCRIPTS...

It is loading those DLLs but has found no valid scripts. I guess those two DLLs were made for the old version. There are new versions of those scripts available, i guess. Get those new versions of "Mega SuperJump" and "Handheld Teleport Device" and it will work.

Edited by HazardX

Share this post


Link to post
Share on other sites
CoMPMStR

 

There are new versions of those scripts available, i guess.

lol.gif Hehe.. you guess? You know I've already updated those scripts for the new scripthook.

 

 

I found some bugs though and I just want to make sure you know about them (or can set me straight).

 

Setting any value to Player.Group.SeperationRange causes bodyguards to stay idle. When they spawn they just stand in one spot and don't move.

 

Using Ped.WalkAwayAndDespawn causes script errors. When called it says there's an error with the script. This is what it says in the log file:

 

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.                        at GTA.Ped.WalkAwayAndDespawn()

 

 

Ped.Drunk doesn't cause peds to wobble as if they're drunk when set to true.

 

Setting Ped.FireDamageMultiplier to 0 doesn't make peds receive no damage from fire.

 

Vehicle.isOnFire doesn't set a vehicle on fire if set to true.

 

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

I was wondering if you could add the NoLongerNeeded sub to the model class, since there is a different NO_LONGER_NEEDED natived used for models. This way we can call Object.Model.NoLongerNeeded after we're done spawning the ped or vehicle, then call Object.NoLongerNeeded after we're completely done with the object.

 

I was also wondering if you could add a CurrentRoom property to the Vehicle class. I tried spawning a vehicle once when in the subway and it was invisible, but it was still there. And also, when setting Object.CurrentRoom to Player.Character.CurrentRoom the object still spawns invisibile inside, but outside it spawns visible.

Share this post


Link to post
Share on other sites
brightemo

 

               using (StreamWriter writer = new StreamWriter(File.OpenWrite("C:\\gta.txt")))               {                   foreach (BlipType blipType in Enum.GetValues(typeof(BlipType)))                   {                       Blip[] blips = Blip.GetAllBlipsOfType(blipType);                       foreach (Blip blip in blips)                       {                           writer.WriteLine(String.Format("Name: {0}", blip.Name));                           writer.WriteLine(String.Format("Position: {0},{1},{2}", blip.Position.X, blip.Position.Y, blip.Position.Z));                           writer.WriteLine(String.Format("Street: {0}", World.GetStreetName(blip.Position)));                           writer.WriteLine(String.Format("Type: {0}", blipType));                           writer.WriteLine(String.Format("Icon: {0}", blip.Icon));                           writer.WriteLine(String.Format("Colour: {0}", blip.Color));                           writer.WriteLine(String.Format("Display: {0}", blip.Display));                           writer.WriteLine(String.Format("Show Only When Near: {0}", blip.ShowOnlyWhenNear));                           writer.WriteLine();                       }                   }                }

 

 

Name: Player

Position: 0,0,0

Type: Pickup

Icon: Misc_Player

Colour: White

Display: 1

Show Only When Near: False

 

Name: North

Position: 0,0,0

Type: Unknown

Icon: Misc_North

Colour: White

Display: 1

Show Only When Near: False

 

Name: Waypoint

Position: 0,0,0

Type: Pickup2

Icon: Misc_Waypoint

Colour: White

Display: 1

Show Only When Near: False

 

The positions for these are all 0,0,0 and it seems to only get blips for the Player icon, the North icon and your way point destination icon (which is what I am after, but need the position).

 

Is there any work around / fixes planned?

 

Thanks

Share this post


Link to post
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

×

Important Information

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