Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (84,925 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. 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

    2. Red Dead Redemption

    3. 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

Highflex

i have a problem can't launch the game with this

 

user posted image

Share this post


Link to post
Share on other sites
sjaak327
i have a problem can't launch the game with this

 

user posted image

Try Yaasil instead of Alexander's asi loader.

 

 

Share this post


Link to post
Share on other sites
algrn912005

hi, I have a question:

 

How would I check to see if a car using World.GetClosestCar exists? Because when I use it and I am around no cars, the script gives me an error. I created a check once but somehow I forgot how I did it and it's bugging me.

Share this post


Link to post
Share on other sites
HazardX
hi, I have a question:

 

How would I check to see if a car using World.GetClosestCar exists? Because when I use it and I am around no cars, the script gives me an error. I created a check once but somehow I forgot how I did it and it's bugging me.

 

dim v as Vehicle = World.GetClosestVehicle(Player.Character.Position, 3.0F)If Exists(v) Then  .... your code here ...End If

 

Share this post


Link to post
Share on other sites
Highflex

i want to create a boost mode when you press a button your car is faster for some seconds how can i do that? sorry not very good with coding suicidal.gif

Share this post


Link to post
Share on other sites
Indi

Hazard, how can you make people follow you on Bikes or something?

Share this post


Link to post
Share on other sites
boomer678
Can you rotate objects 180 degrees? while spawning?

Sure. You have to do it right after spawning the object. if obj is the name of the newly spawned object, do the following:

 

 

obj.Heading += 180

 

 

@fengyeblade: Your answer is HERE. Please don't ask the same question in multiple threads.

ok ty. Also is it possible to reload a script with the console like. !reload (script name ) or something like that. so i dont have to keep exiting then starting gta just to see if one tiny change makes it work

Share this post


Link to post
Share on other sites
pwd

This looks amazing! i've got the console to appear with '~' but how do I execute a script? For instance, the bodyguard example uses Insert and Delete right? I press insert but nothing seems to happen. I've checked out the readmes but can't seem to find out how to get that to work blush.gif .

Share this post


Link to post
Share on other sites
boomer678

Hey hazard. Could it be possible to make a INGAME MENU using the thing you did to make the console. IT seems like it would be possible.

Share this post


Link to post
Share on other sites
pwd

This looks amazing! i've got the console to appear with '~' but how do I execute a script? For instance, the bodyguard example uses Insert and Delete right? I press insert but nothing seems to happen. I've checked out the readmes but can't seem to find out how to get that to work blush.gif .

Share this post


Link to post
Share on other sites
boomer678
This looks amazing! i've got the console to appear with '~' but how do I execute a script? For instance, the bodyguard example uses Insert and Delete right? I press insert but nothing seems to happen. I've checked out the readmes but can't seem to find out how to get that to work blush.gif .

Double post.... and is the body guard.vb script in ur scripts folder?

Share this post


Link to post
Share on other sites
pwd

Yes that was the problem... script wasn't in correct folder. Sorry about that, I promise I'll make up for it by making a unique script of some sort.

Share this post


Link to post
Share on other sites
boomer678
Yes that was the problem... script wasn't in correct folder. Sorry about that, I promise I'll make up for it by making a unique script of some sort.

ok..

Share this post


Link to post
Share on other sites
Intosia

WAIT WHAT!? No ApplyForceToCar?? Damn! Please add it to the Vehicle object. moto_whistle.gif

 

Edit:

 

Is it possible to spawn a weapon and fire it?

Edited by Intosia

Share this post


Link to post
Share on other sites
iriedreadlock23

When i ReloadScripts from console, game suddenly crashes. Why is that? Other than that, script hook works excellent.

Share this post


Link to post
Share on other sites
boomer678
When i ReloadScripts from console, game suddenly crashes. Why is that? Other than that, script hook works excellent.

same happens to me

Share this post


Link to post
Share on other sites
iriedreadlock23

How can i use model hashes in World.CreateObject function?

 

I have seen that you have used this:

 

World.CreateObject(&HD130ADEF, Player.Character.Position)

 

How do i create, for example this?

 

Park_ob_MH06 - 1617209877 - 0x6064AA15

Share this post


Link to post
Share on other sites
HazardX

 

When i ReloadScripts from console, game suddenly crashes. Why is that? Other than that, script hook works excellent.

Yes, that's a very nasty problem. Spent 2 whole days on it now and am not done yet. confused.gif The .Net Garbage Collector interfers with the unmanaged ingame threads. Found and fixed several problems with it already, but i still get crashes after 2-3 reloads. suicidal.gif

Share this post


Link to post
Share on other sites
HazardX

 

How can i use model hashes in World.CreateObject function?

 

I have seen that you have used this:

 

World.CreateObject(&HD130ADEF, Player.Character.Position)

 

How do i create, for example this?

 

Park_ob_MH06  -  1617209877  -  0x6064AA15

You can supply either any integer or any string value as a model. The framework will convert it to a model object by itself. Thus you can use one of the Following Methods:

 

 

World.CreateObject(&H6064AA15, World.GetGroundPosition(Player.Character.Position.Around(3)) ) // in VBWorld.CreateObject(0x6064AA15, World.GetGroundPosition(Player.Character.Position.Around(3)) ) // in C#World.CreateObject("Park_ob_MH06", World.GetGroundPosition(Player.Character.Position.Around(3))) // should work for both

 

 

[EDIT] CoMPMStR is right, do not use Player.Position directly. The objects will not spawn on the same position as the player. Use some offset instead like World.GetGroundPosition(Player.Character.Position.Around(3)). For Objects you also need to Freeze the position of the object after spawning, or it might just fall through the world. Many Objects have no world collision.

Edited by HazardX

Share this post


Link to post
Share on other sites
CoMPMStR

 

How can i use model hashes in World.CreateObject function?

 

I have seen that you have used this:

 

World.CreateObject(&HD130ADEF, Player.Character.Position)

 

How do i create, for example this?

 

Park_ob_MH06   -   1617209877   -  0x6064AA15

The easiest way to do it is like this:

 

 

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

 

Edited by CoMPMStR

Share this post


Link to post
Share on other sites
boomer678
How can i use model hashes in World.CreateObject function?

 

I have seen that you have used this:

 

World.CreateObject(&HD130ADEF, Player.Character.Position)

 

How do i create, for example this?

 

Park_ob_MH06   -   1617209877   -  0x6064AA15

The easiest way to do it is like this:

 

 

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

 

Yea, i think im gonna release a trainer + skate park ramp spawner

Share this post


Link to post
Share on other sites
CoMPMStR
How can i use model hashes in World.CreateObject function?

 

I have seen that you have used this:

 

World.CreateObject(&HD130ADEF, Player.Character.Position)

 

How do i create, for example this?

 

Park_ob_MH06   -   1617209877   -  0x6064AA15

The easiest way to do it is like this:

 

 

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

 

Yea, i think im gonna release a trainer + skate park ramp spawner

My spawner script can now spawn objects and allow you to position them. Even though you have to cycle though to get to the skate ramps, they aren't that far from the end if you cycle in reverse. It's so much fun and adds so much more to the game. I can't thank HazardX enough. biggrin.gif

Share this post


Link to post
Share on other sites
boomer678

 

How can i use model hashes in World.CreateObject function?

 

I have seen that you have used this:

 

World.CreateObject(&HD130ADEF, Player.Character.Position)

 

How do i create, for example this?

 

Park_ob_MH06   -   1617209877   -  0x6064AA15

The easiest way to do it is like this:

 

 

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

 

Yea, i think im gonna release a trainer + skate park ramp spawner

My spawner script can now spawn objects and allow you to position them. Even though you have to cycle though to get to the skate ramps, they aren't that far from the end if you cycle in reverse. It's so much fun and adds so much more to the game. I can't thank HazardX enough. biggrin.gif

I like spawning mine going full speed on a nrg900. then you get launchedd off it and do like 3 backflips

*edit//

do u got xfire? and hazard is an ingame menu possible yet with this

Share this post


Link to post
Share on other sites
Intosia
When i ReloadScripts from console, game suddenly crashes. Why is that? Other than that, script hook works excellent.

Yes, that's a very nasty problem. Spent 2 whole days on it now and am not done yet. confused.gif The .Net Garbage Collector interfers with the unmanaged ingame threads. Found and fixed several problems with it already, but i still get crashes after 2-3 reloads. suicidal.gif

I had this myself to yesterday. I used cs scripts. It sometimes also crashed when there are a error in the script. But i also managed to reload myscript like 7-8 in a row...

Share this post


Link to post
Share on other sites
AnttiAnA

Multiplayer crashes after 10-30 seconds, executing reloadscripts crashes the game too.

Share this post


Link to post
Share on other sites
CoMPMStR

 

How can i use model hashes in World.CreateObject function?

 

I have seen that you have used this:

 

World.CreateObject(&HD130ADEF, Player.Character.Position)

 

How do i create, for example this?

 

Park_ob_MH06   -   1617209877   -  0x6064AA15

The easiest way to do it is like this:

 

 

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

 

Yea, i think im gonna release a trainer + skate park ramp spawner

My spawner script can now spawn objects and allow you to position them. Even though you have to cycle though to get to the skate ramps, they aren't that far from the end if you cycle in reverse. It's so much fun and adds so much more to the game. I can't thank HazardX enough. biggrin.gif

I like spawning mine going full speed on a nrg900. then you get launchedd off it and do like 3 backflips

*edit//

do u got xfire? and hazard is an ingame menu possible yet with this

If you are going full speed, how do you know which way the ramp will spawn? You might be going in the opposite direction and hit the back of the ramp by accident (or the side), then fall off the bike. lol.gif At least with mine, you can spawn and position it just right, then get a bike and jump it. biggrin.gif I'm sure you can go back far enough to get full speed without the ramp disappearing, and if not, you just increase the distance. tounge.gif

 

No, I don't have xfire. I have gmail though, you can chat through that if you didn't know; directly from the browser. icon14.gif

 

I think you can do ingame menus using the new PerFrameDrawing method. Something like this:

 

 

Protected Overrides Sub PerFrameDrawing(ByVal Graphics As GTA.Graphics)End Sub

 

 

I haven't done much work with it yet, but that's what it's there for. wink.gif

Edited by CoMPMStR

Share this post


Link to post
Share on other sites
webbmister64

Just wondering if you can bind keys in the console

 

For example; I tried this

 

bind "key" "spawn annihilator"

 

(doesn't work)

Share this post


Link to post
Share on other sites
iriedreadlock23

Frist, thanks for quicke replies.

 

Im interested Is there any way to push an object?

 

When i create object for example in air, how do i make it fall down?

 

There is applyforce native, so is there any way to apply force/push to objects?

Edited by iriedreadlock23

Share this post


Link to post
Share on other sites
boomer678
Frist, thanks for quicke replies.

 

Im interested Is there any way to push and object?

 

When i create object for example in air, how do i make it fall down?

 

There is applyforce native, so is there any way to apply force/push to objects?

U gotta spawn it on ground, im gonna release a trainer soon with skate park ramp spawner

Share this post


Link to post
Share on other sites
iriedreadlock23

this question was for HazardX, but thanks anyway.

 

I asked is there a way to push/apply force to any created object with HazardX's ScriptHook library, or with any Native function. So objects actually fall from the sky.

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

×

Important Information

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