IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Post mod/code requests in the Mod Requests topic

Post mod releases in the Mod Showroom

Read the Modding Rules BEFORE posting!

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (146) « First ... 141 142 [143] 144 145 ... Last »  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 [BETA] GTAIV .Net ScriptHook

 V1.6.1.1 Released 1.0.6.0 / EFLC Support
 
Prof_Farnsworth  
Posted: Saturday, Apr 14 2012, 23:11
Quote Post


Ambient Modder
Group Icon
Group: Members
Joined: Feb 25, 2011

XXXXX



QUOTE (motorsport71 @ Tuesday, Apr 10 2012, 04:56)
When using
CODE
World.CreatePed()

and using
CODE
Ped.BecomeMissionCharacter()

to keep up a large group of mission peds, say approximately 35, and I have the script constantly replace "dead" or "nolongerneeded" peds:

Why is it that after around 100+ mission peds have been replaced they begin to spawn like a "statue" or "solid", with no brain and completely invulnerable?

Also, what can be done to prevent that? I need the pedestrian to remain a mission character to get the tasks and actions necessary, so if i nolonger want to use a ped is it better to at the desired distance "delete" the ped or go with "nolongerneeded" if it's a mission ped? Does one over the other leave a "memory leak" i believe it may be referred to?

@AngryAmoeba
I've been running the "if exists(x) andalso x isnot nothing" and though it looks confusing as you mentioned, it works quite well biggrin.gif I know it would be smart of me to look into c#, but i'm not a coder and v.b. "looked" easier to understand as i looked over the two when i decided to try to code my first .net script.

It would appear that this is caused by overloading the engine, or the scripthook. I have the same thing happen when I put the update to my business mod into my game. It creates around 90 objects and blips right now, along with the associated business functions.

Try this test. The next time you see a frozen ped. Try to go bowling. If the ball gets stuck in midair and/or the pins don't react properly, then I would suspect we have the same problem.

Unfortunately, I do not know of a solution. I tried splitting mine into two separate scripts. They work separately, about 45 businesses each, but when run together, the statue peds come back.

Only suggestion I have is lowering the amount of peds slowly. The mod I'm working on now spawns 16-17, so you should be able to go at least that high.
PM
  Top
 

 
motorsport71  
Posted: Sunday, Apr 15 2012, 20:36
Quote Post


newbie modder
Group Icon
Group: Members
Joined: Oct 20, 2009

XXXXX



@Prof_Farnsworth

Thanks, I've already split the script up so it wouldn't matter if i added / changed something else. I'll give it a try. Many appreciations. Also thanks for the insight as to what the issue may be, it'll give me something to watch for from now on.
PM
  Top
 

 
Deletor  
Posted: Saturday, Apr 21 2012, 10:21
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 21, 2012

XXXXX



I am having a nightmare of a time with the .Net Script Hook v1.7.1.7 BETA. As I understand it, the .NET scripthook includes the C++ scripthook within itself, and even though the 1.7.1.7 Beta release is purported to support GTA 1.0.4.0 (requirements state "version 1.0.1.0 up to version 1.0.7.0"), when I run the game with it installed it crashes every time on loading a savegame.

The ScriptHookDotNet.log records:

2012-04-21 12:01:23 - Initializing ScriptHookDotNet v1.7.1.7 BETA (on GTA IV version 1.0.4.0 with C++ Hook version 0.5.1)

2012-04-21 12:01:24 - WARNING: Your C++ ScriptHook version 0.5.1 and GTA IV version 1.0.4.0 are NOT known to be compatible! Use C++ ScriptHook version 0.4.0 or the newest version of the game AND the C++ ScriptHook instead!



And from the ScriptHook.log:

Log start: Sat Apr 21 12:01:20 2012
-----------------------------------------------
[INFO] GTA IV Script Hook 0.5.1 - © 2009, Aru - Initialized
[INFO] Process base address: 0x1c0000
[INFO] Auto detecting game version
[INFO] Using game version 1.0.4
[INFO] [ScriptHookDotNet] Thread started


Thus it is obvious that somehow the .Net Script Hook v1.7.1.7 BETA is NOT compatible with GTA 1.0.4.0 (at least for me).

HazardX, can you please release a version which has the C++ scripthook compatible with GTA 1.0.4.0? There is a good reason for using 1.0.4.0, as 1.0.7.0 is not supported well by the ENB plugin and presets. Or am I missing something here? I have searched for the answer but none is to be found. Often there is a suggestion to use both the .Net and C++ scripthooks together, but since both have the same name ScriptHook.dll I fail to see how that is possible.

Thanks in advance smile.gif
PM
  Top
 

 
Prof_Farnsworth  
Posted: Saturday, Apr 21 2012, 17:27
Quote Post


Ambient Modder
Group Icon
Group: Members
Joined: Feb 25, 2011

XXXXX



QUOTE (Deletor @ Saturday, Apr 21 2012, 10:21)
I am having a nightmare of a time with the .Net Script Hook v1.7.1.7 BETA. As I understand it, the .NET scripthook includes the C++ scripthook within itself, and even though the 1.7.1.7 Beta release is purported to support GTA 1.0.4.0 (requirements state "version 1.0.1.0 up to version 1.0.7.0"), when I run the game with it installed it crashes every time on loading a savegame.

The ScriptHookDotNet.log records:

2012-04-21 12:01:23 - Initializing ScriptHookDotNet v1.7.1.7 BETA (on GTA IV version 1.0.4.0 with C++ Hook version 0.5.1)

2012-04-21 12:01:24 - WARNING: Your C++ ScriptHook version 0.5.1 and GTA IV version 1.0.4.0 are NOT known to be compatible! Use C++ ScriptHook version 0.4.0 or the newest version of the game AND the C++ ScriptHook instead!



And from the ScriptHook.log:

Log start: Sat Apr 21 12:01:20 2012
-----------------------------------------------
[INFO] GTA IV Script Hook 0.5.1 - © 2009, Aru - Initialized
[INFO] Process base address: 0x1c0000
[INFO] Auto detecting game version
[INFO] Using game version 1.0.4
[INFO] [ScriptHookDotNet] Thread started


Thus it is obvious that somehow the .Net Script Hook v1.7.1.7 BETA is NOT compatible with GTA 1.0.4.0 (at least for me).

HazardX, can you please release a version which has the C++ scripthook compatible with GTA 1.0.4.0? There is a good reason for using 1.0.4.0, as 1.0.7.0 is not supported well by the ENB plugin and presets. Or am I missing something here? I have searched for the answer but none is to be found. Often there is a suggestion to use both the .Net and C++ scripthooks together, but since both have the same name ScriptHook.dll I fail to see how that is possible.

Thanks in advance smile.gif

scripthook.net.dll and scripthook.dll are two separate files. You can use HazardX's scripthook.net.dll 1.7.1.7, but you need to get a lower version of scripthook.dll from Aru. If you are on GTA IV 1.0.4.0, you need version 0.4.0, not 0.5.1, just as the error log states.
PM
  Top
 

 
Deletor  
Posted: Sunday, Apr 22 2012, 00:38
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 21, 2012

XXXXX



Thanks so much Prof Farnsworth tounge.gif . The scripthook package itself comes with the dll named as ScriptHook.dll, and since this is also the name of the C++ dll I thought only one could be used at a time. I was already running the C++ dll, and now thanks to your tip can run the .NET dll as well. Gracias! cool.gif
PM
  Top
 

 
Axeman420  
Posted: Saturday, May 12 2012, 21:28
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Mar 31, 2007

XXXXX



How can I store\restore rotational data from the player? (I saw Direction, it was Vector3, but, seemed to be read only, so I could only store the data.)

Request: A DoubleClick event for Forms\Controls would be nice, I can probably fake it, but those are very handy when working on ListBox types, and things like that. That way you can select an item(index\slot) via Click, and activate an action via DoubleClick.

---

Btw, awesome work on this, the possibilities are amazing.

I do a bit of hacking myself, and have a project that would benefit greatly from using a similar technique. I would love to learn from your work. (I have a basic idea of what's been done, but, can't quite figure it all out.)

Mind if I PM you, and get advice on it? (I won't bother you too much, just need a few questions answered.)

This post has been edited by Axeman420 on Sunday, May 13 2012, 01:20
PM
  Top
 

 
MulleDK19  
Posted: Tuesday, May 15 2012, 14:06
Quote Post


1337 Programmer
Group Icon
Group: Members
Joined: May 30, 2009

dk.gif

XXXXX



QUOTE (Axeman420 @ Saturday, May 12 2012, 21:28)
How can I store\restore rotational data from the player? (I saw Direction, it was Vector3, but, seemed to be read only, so I could only store the data.)

Use Rotation.

If you need to use direction use Helper.DirectionToRotation.
Users WebsitePM
  Top
 

 
Axeman420  
Posted: Thursday, May 17 2012, 05:52
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Mar 31, 2007

XXXXX



Having a bit of trouble with peds going out of existence.

I have three checks for ped.Exist(), and some ped != null checks in place, and it STILL happens, apparently, peds can go out of existence mid function, which means, you would need to either wrap the whole thing in a try\catch(which may not be a good idea), wrap every ped related call with Exist() checks, or come up with a better solution on your end. (Not sure what could be done, outside of what you've done already, though.)

In particular, the exception has popped up while using a DecisionMaker. (ApplyTo(ped))

My script just randomly grabs a ped, and applies various behaviors to them.

CODE

   // Insane
   public static void Insane(Ped p)
   {
       // Sanity Check (Keeps unwanted peds out, cops, etc,.)
       if (!SanityCheck(p)) return;

       // Toughen Up
       DecisionMaker d = DecisionMaker.LoadBehavior(DecisionMaker.BehaviorTemplate.Tough);
       d.ApplyTo(p);

       // Go Nuts!
       p.Task.ClearAll();
       p.Weapons.FromType(Weapon.SMG_Uzi);
       p.Weapons.Uzi.Ammo = 5000;
       p.Weapons.Select(Weapon.SMG_Uzi);
       p.StartKillingSpree(true);
   }


For what it's worth, I didn't experience the error until I added the DecisionMaker.

QUOTE

Error during Tick in script 'PedsEnhanced':
                      GTA.NonExistingObjectException: Invalid call to an object that doesn't exist anymore!
                         at GTA.DecisionMaker.ApplyTo(Ped Ped)
                         at PedBehavior.Insane(Ped p)
                         at PedsEnhanced.PedsEnhanced_Tick(Object sender, EventArgs e)
                         at GTA.Script.TryTick()
                         at GTA.Script.DoTick()
                         at GTA.ScriptThread.OnTick()


---

Request:

I would love a custom task for use with TaskSequence.

That way I could have a ped, run somewhere, and then explode, or whatever.

CODE

public void CustomTask(Action<Ped> pAction)
{
  // I don't know how you are storing the ped ref, but it needs passed here.. (Could let us supply it..)

   pAction(ped);
}

TaskSequence task;
task.AddTask.CustomTask(ExplodePed);

void ExplodePed(Ped p)
{
  World.Explode(p.Position); // pseudo...
}


The hard bits, are triggering the custom sequence, and passing the ped ref around properly.

But, hopefully, it's doable. smile.gif

This post has been edited by Axeman420 on Monday, May 21 2012, 01:56
PM
  Top
 

 
slyde  
Posted: Tuesday, May 22 2012, 08:46
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 23, 2011

XXXXX



How can I set EngineHealth to 0 (like, engine no working no more but without to set it on fire or crash the car)?

I already tryied to set it to 0 (Player.Caracter.CurrentVehicle.EngineHealth=0) but it doesn't work...

Some help would be appreciated!
PM
  Top
 

 
Axeman420  
Posted: Tuesday, May 22 2012, 20:29
Quote Post


Square Civilian
Group Icon
Group: Members
Joined: Mar 31, 2007

XXXXX



QUOTE (slyde @ Tuesday, May 22 2012, 08:46)
How can I set EngineHealth to 0 (like, engine no working no more but without to set it on fire or crash the car)?

I already tryied to set it to 0 (Player.Caracter.CurrentVehicle.EngineHealth=0) but it doesn't work...

Some help would be appreciated!

Are you sure your code is being executed? (Add a Game.DisplayText("I work!"); in there to be sure.)

Because, I wrote a script that fried engines on enemy vehicles using the same method, it works fine. (It may not work on the players vehicle, perhaps HazardX made code to avoid that, or something, but it should work.)

I believe you can turn off the engine via a command too, something like Vehicle.EngineRunning = false;, that may be more what you're looking for. (Edit: Player.Character.CurrentVehicle.EngineRunning = false;)

This post has been edited by Axeman420 on Tuesday, May 22 2012, 20:35
PM
  Top
 

 
Southern_Smoke  
Posted: Thursday, May 24 2012, 10:49
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jun 18, 2011

gr.gif

XXXXX



Hey Guys,

i need your help. I need a simple script, which creates cars.
For example:

1) Admiral, xxx, xx, yyy, yy, zz, zzz, Doorlock=true, Alarm=off
2) Banshee, xxx, xx, yyy, yy, zz, zzz, Doorlock=true, Alarm=off

Only a VB script....can you help me?
PM
  Top
 

 
Threepwood  
Posted: Tuesday, May 29 2012, 08:34
Quote Post


Calm like a bomb.
Group Icon
Group: Members
Joined: Jul 13, 2008

XXXXX



Hey guys.. what opportunities do I have to manipulate car characteristics also known as handling? Grip and height position..

Any hint would be helpful, thanks smile.gif
PM
  Top
 

 
Driftking120  
Posted: Tuesday, May 29 2012, 22:07
Quote Post


Madman
Group Icon
Group: Members
Joined: Jun 16, 2010

XXXXX



Hi there,
I think the file you are looking for is called "handling.dat".
It helps manipulate grip and ride height, Rob.Zombie makes a lot of handling lines for Smokey's cars,
so maybe he could help you with getting started.
PM
  Top
 

 
Threepwood  
Posted: Wednesday, May 30 2012, 05:55
Quote Post


Calm like a bomb.
Group Icon
Group: Members
Joined: Jul 13, 2008

XXXXX



Thanks Driftking, thats common knowledge for a modder like I am wink.gif You meant it good I guess.
But take a look were we are here, in the .NET Scripthook topic.. so its kinda obvious I ask for a way to do it with .NET.. wink.gif
PM
  Top
 

 
wilus0503  
Posted: Sunday, Jun 3 2012, 15:01
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jun 2, 2012

pl.gif

XXXXX



i'm sorry for my weak english.

My problem relies on it, that scripthookdotnet.asi it is not started.

In GTAIV main folder, file of notebook scripthookdotnet does not appear.

I had versions earlier 1.0.4.0, and scripthookdotnet.asi Version 0.893 BETA worked correctly , but doesn't work some mods.
I have decided modernize GTAIV to 1.0.7.0 and use "GTAIV .Net Script Hook v1.7.1.7 BETA" .

but.. now only work mods .asi , and don't work mods .net sad.gif

screen on my GTAIV main folder:

user posted image

it's good install all file ?

Mods .net put in scripts folder.

please for help

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

Jest tutaj jakiś polak? nie umiem angielskiego tounge.gif
PM
  Top
 

 
Rushlink  
Posted: Saturday, Jun 23 2012, 06:45
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Aug 25, 2011

XXXXX



I'm having problems with some code i've written.

This was working, but no longer works at all!!!
I am completely stumped as to why this isn't working! It doesn't make sense to me at all.

When the script loads, the lights are on. As soon as it goes into the tick and attempts to update any of the lights positions, etc... the lights all go away...
I understand that everything looks stupid - this isn't my entire code, but this section should run on its own... It doesn't...

CODE
using System;
using System.Collections.Generic;
using System.Text;
using GTA;
using System.Drawing;
using System.Windows.Forms;

namespace PLM
{
   public class plm : Script
   {


       public System.Drawing.Color blue;
       public System.Drawing.Color red;
       public System.Drawing.Color white;
       public System.Drawing.Color yellow;
       private bool firstrun = true;
       private bool firstveh = true;


       //Lights
       //                   //F/B    |  AREA      |  L/R   | TYPE  | DONE?
       public Light light1; //FRONT  |  OUTSIDE   |  LEFT  | PRIM  | COMPLETED
       public Light light2; //FRONT  |  OUTSIDE   |  RIGHT | PRIM  | COMPLETED
       public Light light3; //REAR   |  OUTSIDE   |  LEFT  | PRIM  | COMPLETED
       public Light light4; //REAR   |  OUTSIDE   |  RIGHT | PRIM  | COMPLETED
       public Light light5; //FRONT  |  MIDDLE1   |  LEFT  | PRIM  | COMPLETED
       public Light light6; //FRONT  |  MIDDLE1   |  RIGHT | PRIM  | COMPLETED
       public Light light7; //REAR   |  MIDDLE1   |  LEFT  | PRIM  | COMPLETED
       public Light light8; //REAR   |  MIDDLE1   |  RIGHT | PRIM  | COMPLETED
       public Light light9; //FRONT  |  MIDDLE2   |  LEFT  | PRIM  | COMPLETED
       public Light light10;//FRONT  |  MIDDLE2   |  RIGHT | PRIM  | COMPLETED
       public Light light11;//REAR   |  MIDDLE2   |  LEFT  | PRIM  | COMPLETED
       public Light light12;//REAR   |  MIDDLE2   |  RIGHT | PRIM  | COMPLETED
       public Light light13;//FRONT  |  INSIDE    |  LEFT  | PRIM  | COMPLETED
       public Light light14;//FRONT  |  INSIDE    |  RIGHT | PRIM  | COMPLETED
       public Light light15;//REAR   |  INSIDE    |  LEFT  | PRIM  | COMPLETED
       public Light light16;//REAR   |  INSIDE    |  RIGHT | PRIM  | COMPLETED
       public Light light17;//FRONT  |  LEFT      |  LEFT  | PRIM  | COMPLETED
       public Light light18;//REAR   |  LEFT      |  LEFT  | PRIM  | COMPLETED
       public Light light19;//FRONT  |  RIGHT     |  RIGHT | PRIM  | COMPLETED
       public Light light20;//REAR   |  RIGHT     |  RIGHT | PRIM  | COMPLETED


       public plm()
       {
           Interval = 10;
           this.Tick += new EventHandler(this.plm_tick);




           //Initalize colors
           string hexValue = "#0000FF";
           System.Drawing.Color blue = System.Drawing.ColorTranslator.FromHtml(hexValue);
           hexValue = "#FF0000";
           System.Drawing.Color red = System.Drawing.ColorTranslator.FromHtml(hexValue);
           hexValue = "#FFFFFF";
           System.Drawing.Color white = System.Drawing.ColorTranslator.FromHtml(hexValue);
           hexValue = "#E69900";
           System.Drawing.Color yellow = System.Drawing.ColorTranslator.FromHtml(hexValue);

           //Initalize lights
           light1 = new GTA.Light(blue, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light2 = new GTA.Light(red, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light3 = new GTA.Light(blue, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light4 = new GTA.Light(red, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light5 = new GTA.Light(blue, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light6 = new GTA.Light(red, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light7 = new GTA.Light(blue, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light8 = new GTA.Light(red, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light9 = new GTA.Light(blue, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light10 = new GTA.Light(red, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light11 = new GTA.Light(blue, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light12 = new GTA.Light(red, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light13 = new GTA.Light(blue, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light14 = new GTA.Light(red, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light15 = new GTA.Light(blue, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light16 = new GTA.Light(red, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light17 = new GTA.Light(blue, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light18 = new GTA.Light(blue, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light19 = new GTA.Light(red, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light20 = new GTA.Light(red, 1, 5000, Player.Character.GetOffsetPosition(new Vector3(0.5F, 0, 1)));
           light1.Enabled = true;
           light2.Enabled = true;
           light3.Enabled = true;
           light4.Enabled = true;
           light5.Enabled = true;
           light6.Enabled = true;
           light7.Enabled = true;
           light8.Enabled = true;
           light9.Enabled = true;
           light10.Enabled = true;
           light11.Enabled = true;
           light12.Enabled = true;
           light13.Enabled = true;
           light14.Enabled = true;
           light15.Enabled = true;
           light16.Enabled = true;
           light17.Enabled = true;
           light18.Enabled = true;
           light19.Enabled = true;
           light20.Enabled = true;
           light1.Range = 100.0F;
           light2.Range = 100.0F;
           light3.Range = 100.0F;
           light4.Range = 100.0F;
           light5.Range = 100.0F;
           light6.Range = 100.0F;
           light7.Range = 100.0F;
           light8.Range = 100.0F;
           light9.Range = 100.0F;
           light10.Range = 100.0F;
           light11.Range = 100.0F;
           light12.Range = 100.0F;
           light13.Range = 100.0F;
           light14.Range = 100.0F;
           light15.Range = 100.0F;
           light16.Range = 100.0F;
           light17.Range = 100.0F;
           light18.Range = 100.0F;
           light19.Range = 100.0F;
           light20.Range = 100.0F;

       }

       private void plm_tick(object sender, EventArgs e)
       {
           Interval = 30;
           if (Exists(Player.Character.CurrentVehicle))
           {
               //update the light position
               light1.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(-0.43F, -0.09F, 0.847F)); //done
               light2.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(0.45F, -0.09F, 0.847F)); //done
               light3.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(-0.43F, -0.45F, 0.847F)); //done
               light4.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(0.45F, -0.45F, 0.847F)); //done
               light5.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(-0.31F, -0.09F, 0.847F)); //done
               light6.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(0.33F, -0.09F, 0.847F)); //done
               light7.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(-0.31F, -0.45F, 0.847F)); //done
               light8.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(0.33F, -0.45F, 0.847F)); //done;
               light9.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(-100.09F, -0.09F, 0.847F)); //done
               light10.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(0.21F, -0.09F, 0.847F)); //done
               light11.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(-100.09F, -0.45F, 0.847F)); //done
               light12.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(0.21F, -0.45F, 0.847F)); //done
               light13.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(-0.06F, -0.09F, 0.848F)); //done
               light14.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(0.08F, -0.09F, 0.848F)); //done                
               light15.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(-0.06F, -0.45F, 0.848F)); //done
               light16.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(0.08F, -0.45F, 0.848F)); //done
               light17.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(-0.54F, -100.06F, 0.850F)); //done
               light18.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(-0.54F, -0.39F, 0.850F)); //done
               light19.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(0.55F, -100.06F, 0.850F)); //done
               light20.Position = Player.Character.CurrentVehicle.GetOffsetPosition(new Vector3(0.55F, -0.39F, 0.850F)); //done

               light1.Color = yellow;
               light1.Color = yellow;
               light2.Color = yellow;
               light3.Color = yellow;
               light4.Color = yellow;
               light5.Color = yellow;
               light6.Color = yellow;
               light7.Color = yellow;
               light8.Color = yellow;
               light9.Color = yellow;
               light10.Color = yellow;
               light11.Color = yellow;
               light12.Color = yellow;
               light13.Color = yellow;
               light14.Color = yellow;
               light15.Color = yellow;
               light16.Color = yellow;
               light17.Color = yellow;
               light18.Color = yellow;
               light19.Color = yellow;
               light20.Color = yellow;

               light1.Enabled = true;
               light1.Enabled = true;
               light2.Enabled = true;
               light3.Enabled = true;
               light4.Enabled = true;
               light5.Enabled = true;
               light6.Enabled = true;
               light7.Enabled = true;
               light8.Enabled = true;
               light9.Enabled = true;
               light10.Enabled = true;
               light11.Enabled = true;
               light12.Enabled = true;
               light13.Enabled = true;
               light14.Enabled = true;
               light15.Enabled = true;
               light16.Enabled = true;
               light17.Enabled = true;
               light18.Enabled = true;
               light19.Enabled = true;
               light20.Enabled = true;
           }
       }

   }





}



Any Ideas??

Thanks
PM
  Top
 

 
Rushlink  
Posted: Saturday, Jun 23 2012, 06:48
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Aug 25, 2011

XXXXX



QUOTE (wilus0503 @ Sunday, Jun 3 2012, 15:01)
i'm sorry for my weak english.

My problem relies on it, that scripthookdotnet.asi it is not started.

In GTAIV main folder, file of notebook scripthookdotnet does not appear.

I had versions earlier 1.0.4.0, and scripthookdotnet.asi Version 0.893 BETA worked correctly , but doesn't work some mods.
I have decided modernize GTAIV to 1.0.7.0 and use "GTAIV .Net Script Hook v1.7.1.7 BETA" .

but.. now only work mods .asi , and don't work mods .net sad.gif

screen on my GTAIV main folder:

user posted image

it's good install all file ?

Mods .net put in scripts folder.

please for help

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

Jest tutaj jakiś polak? nie umiem angielskiego tounge.gif

ScripthookDotNet.asi needs to go into the ROOT gtaIV folder

Any .net SCRIPTS go into the 'scripts' folder
PM
  Top
 

 
vdhAbraxas  
Posted: Monday, Jun 25 2012, 08:36
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jun 25, 2012

XXXXX



All hope is gone. I've been trying to figure it out for hours, but I'm just too stupid for it and need your help guys sad.gif

I'm trying to get native function to work

CODE

float x1 = 0.0f;
float x2 = 0.0f;
float x3 = 0.0f;
   
GTA.Native.Function.Call("GET_NTH_CLOSEST_CAR_NODE", Player.Character.Position.X, Player.Character.Position.Y, Player.Character.Position.Z, 3,  x1, x2, x3 );

Game.DisplayText("Test "+ x1 + " " + x2 + " " +x3 + " ", 15000);


And all I get is:
Error during NetHook.Tick:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Scripting.NativeContext2.Invoke(SByte* name, NativeContext2* cxt)
at GTA.Native.Function.BaseCall(String Name, Parameter[] Arguments)
at GTA.Native.Function.Call(String Name, Parameter[] Arguments)
at GTA.Native.Template.Invoke()
at GTA.ScriptDomain.RemoteEvent(RemoteEventArgs ev)
at GTA.ScriptDomain.ProcessRemoteEvents()
at GTA.ScriptDomain.Tick()
at GTA.NetHook.Tick()

I've tried with other car node native functions, but also without success. I'm new to modding and .NET and try to learn from examples etc., but this time I'm hopeless.

This post has been edited by vdhAbraxas on Monday, Jun 25 2012, 08:39
PM
  Top
 

 
kmccmk9  
Posted: Sunday, Jul 8 2012, 15:47
Quote Post


Crackhead
Group Icon
Group: Members
Joined: May 12, 2007

XXXXX



Hi! Great mod. I'm working on a script that loads a custom model I made, but not added to the game. Is there anyway to add it as a resource into the script and spawn it that way? I've been studying the texture drawing example however I can't seem to use it for models instead.
PMXbox Live
  Top
 

 
fengyeblade  
Posted: Monday, Jul 16 2012, 16:47
Quote Post


Blade Feng Land
Group Icon
Group: Members
Joined: Feb 1, 2009

cn.gif

XXXXX



HI hazardX. i am back. What are you get new mod ?
PM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Pages: (146) « First ... 141 142 [143] 144 145 ... Last »

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG