Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Forum Support

    3. Suggestions

[BETA] GTAIV .Net ScriptHook


HazardX
 Share

Recommended Posts

 

I found how to add gps tracking for coords-blip.
Blip b = Blip.AddBlip( Vector3( 0.0f, 0.0f, 0.0f ) );b.RouteActive = true;

have fun.

I tried using Blip.RouteActive before and it didn't work for a coord blip. confused.gif

 

 

Ahh, I used your designer but when I load a form object scripthook throws: "System.NullReferenceException: Object reference not set to an instance of an object. at GTA.ScriptThread.LoadScriptNow()"

Did you add the included dll file to the GTA folder prior to running the game? I'm sure you added it as a reference to the project because you couldn't compile without it. I created it to help keep track of all the controls and events. If this isn't the case you could send me your snippet and the log details and I can try to help with it.

 

EDIT: You can probably use the TextureDrawingExample to find out how to draw the speedometer, located in scripthookdotnet.zip\scripts\for Developers\TestScriptCS\Scripts. The example itself is only for RPM but with some minor modifications you should easily be able to change it.

Edited by CoMPMStR
Link to comment
Share on other sites

#up

 

I've copyed your dll to gta iv game folder. smile.gif

 

I looked for TextureDrawingExample but I don't have geometric skill to edit it smile.gif ( I don't saying about changing v.CurrentRPM to v.Speed but to change gauge size etc. )

Link to comment
Share on other sites

berto, please do not hijack someone elses topic with requests. The requests topic are there for a reason, regardless of if the requests get furfilled or not.

Link to comment
Share on other sites

I wanna try and make peds not afraid of weapons

Tasks won't do it

I'm sure its has something to do with combat decision makers

I was reading a script from one mission and saw it had pretty much everything I had Task_Combat, Set_Relationship, Setmissioncharacter etc

But it had SET_COMBAT_DECISION_MAKER

I dont know how to use the ones built into dotnet scripthook though (or at all)

BUt if anyone knows a way to stop peds being scared of guns, could you please tell

Link to comment
Share on other sites

@all: Thanks for the positive feedback so far. I'm glad you like it. smile.gif Feel free to comment if you don't like anything or got an idea on how to improve it.

 

 

Will this work online after i have joined single player or is that something to do with the c++ stuff?

 

@anti mutiplayer modding morons:

 

My intentions are ONLY for freeroam usage with friends.

It has the same problems as the C++ hook currently, but i'm trying to fix it.

 

[EDIT] I found a way to reload the scripts after game reloading. happy.gif i'll include it in the next version of the hook.

Could you make a list of commands that can be typed in the console, i know i can use the 'help' in the console but i can't see all the other commands...

Link to comment
Share on other sites

 

Could you make a list of commands that can be typed in the console, i know i can use the 'help' in the console but i can't see all the other commands...

Use the numpad + and - keys to scroll the console. You can also use SHIFT+PGUP and SHIFT+PGDN to make the console window bigger or smaller. wink.gif Or was it the other way around...? I forgot.. confused.gif

Link to comment
Share on other sites

It is possible to disable vehicles spawning in defined area? smile.gif

ADD_SPAWN_BLOCKING_AREA looks the closest

Link to comment
Share on other sites

Has anyone written a script to spawn something in front of the player? What I would like to do is be able to spawn a ramp in front of the players car.

 

I've got this, but it spawns it above the player:

World.CreateObject("CJ_BOAT_RAMP", World.GetGroundPosition(Player.Character.Position.Around(3)))

Link to comment
Share on other sites

Has anyone written a script to spawn something in front of the player? What I would like to do is be able to spawn a ramp in front of the players car.

 

I've got this, but it spawns it above the player:

World.CreateObject("CJ_BOAT_RAMP", World.GetGroundPosition(Player.Character.Position.Around(3)))

Try this

 

GTA.Object o = World.CreateObject("CJ_BOAT_RAMP", World.GetGroundPosition(Player.Character.GetOffsetPosition(new Vector3(0f, 5f, 0f))));

 

Link to comment
Share on other sites

Has anyone written a script to spawn something in front of the player? What I would like to do is be able to spawn a ramp in front of the players car.

 

I've got this, but it spawns it above the player:

World.CreateObject("CJ_BOAT_RAMP", World.GetGroundPosition(Player.Character.Position.Around(3)))

Try this

 

GTA.Object o = World.CreateObject("CJ_BOAT_RAMP", World.GetGroundPosition(Player.Character.GetOffsetPosition(new Vector3(0f, 5f, 0f))));

 

Yes that works, but then I realized what I'm actually looking for is this:

 

 

 

       Dim pv As Vehicle = Player.Character.CurrentVehicle       If (Exists(pv)) Then           World.CreatePed(Model.BasicCopModel, World.GetGroundPosition(pv.Position + pv.Direction * 10))       End If

 

 

 

The next problem is the object's rotation. How can I get it to match the vehicle, so regardless of which way I'm driving the car will hit the ramp correctly?

Link to comment
Share on other sites

It is possible to set unlimited passengers in bus?

Ya that would be nice. It looks wierd having only 3 people riding the bus

Link to comment
Share on other sites

How can I display my own text without interrupting any other text

I have also noticed that setting the time scale doesn't always work

 

I would just like to note that

 

Blip.Display

 

3 = Show Blip Arrow and On mini map but not on big map

 

5 = Only mini map

 

And when I change the scale of a blip it only changes the map version

 

And how do you set up a camera? and then bring it back to the player

Edited by lilmcnessy
Link to comment
Share on other sites

I figured out how to do my own text

But I can't seem to edit the camera and change its angle, position and restore it to normal

are there any examples on this?

 

And does anyone know what could cause peds and cars not to spawn correctly and just freeze on the spot?

It was just a temporary issue, where has everyone gone, 2 months ago heaps of people were posting

 

You know how you can make an array of vector3 and models etc

 

Vector3[] ppos = new Vector3[] {

 

How do make them for strings, ints and floats and weapons

Edited by lilmcnessy
Link to comment
Share on other sites

Have a look at some C# (= Csharp) tutorials on the internet wink.gif. You could google with "C# declare array" or something like that.

Link to comment
Share on other sites

You make an array of any type pretty much the same way as you did for a Vector3.

 

Have a look at this stie for arrays -> http://www.c-sharpcorner.com/UploadFile/ma...WithArrays.aspx

The arrays aren't working as I planned so I only have the position so its alright now

If you dont know how much data it must hold i suggest using List's.

 

http://dotnetperls.com/list

 

List<Vehicles> cars = new List<Vehicles>();

cars.Add(a_car);

Link to comment
Share on other sites

Anybody have some sample about calling a police backup?

Why do you want this ?

 

Do you know anything about vb.net ? If not you should learn the basics first wink.gif

Link to comment
Share on other sites

Anybody have some sample about calling a police backup?

Why do you want this ?

 

Do you know anything about vb.net ? If not you should learn the basics first wink.gif

Yeah like you are the smart head, if you dont know anything then shut you fu***ng mouth smile.gif

 

Basic yeah basic, go learn yourself moron.

Link to comment
Share on other sites

Nokia, such an additude won't get you far here. He wasn't cursing at you or anything...

 

Anyway, on topic:

Try something like: TRIGGER_POLICE_RESPOND, or something like that. I know there's a native that is very similar to that one.

Link to comment
Share on other sites

 

Nokia, such an additude won't get you far here. He wasn't cursing at you or anything...

 

Anyway, on topic:

Try something like: TRIGGER_POLICE_RESPOND, or something like that. I know there's a native that is very similar to that one.

Thats what i was looking for, thank you smile.gif

 

munni jokud smile.gif

Edited by Nokia555
Link to comment
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
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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