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: (2) 1 [2]   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 Disable auto-reverse.

 Disable the auto reverse in cars - .NET.
 
Hypertenzion  
Posted: Monday, Sep 6 2010, 08:29
Quote Post


Trick
Group Icon
Group: Members
Joined: Oct 10, 2009

dk.gif

XXXXX



Got the script working (Almost)
When I stop a car (using "S"), the car stops as expected and the picture somehow freezes (Normal, I
presume)
But how do I make the car go into reverse?

EDIT:
Just read the script through and I saw that by using "e", you switch between reverse and forward.

This post has been edited by Hypertenzion on Monday, Sep 6 2010, 08:33
PMPlayStation Network
  Top
 

 
AngryAmoeba  
Posted: Monday, Sep 6 2010, 16:21
Quote Post


Symbiont
Group Icon
Group: Members
Joined: Jan 12, 2009

us.gif

XXXXX



I'm glad you got it working. icon14.gif Yes, unfortunately the camera freezing is normal. I don't know how to fix that.

The key to switch gears is actually Tab. You can change it by editing this part of the script: "e.Key == Keys.Tab". Just replace Tab with any key in this list: http://msdn.microsoft.com/en-us/library/sy...forms.keys.aspx
PM
  Top
 

 
Hypertenzion  
Posted: Monday, Sep 6 2010, 19:42
Quote Post


Trick
Group Icon
Group: Members
Joined: Oct 10, 2009

dk.gif

XXXXX



QUOTE (AngryAmoeba @ Sep 6 2010, 17:21)
I'm glad you got it working. icon14.gif Yes, unfortunately the camera freezing is normal. I don't know how to fix that.

The key to switch gears is actually Tab. You can change it by editing this part of the script: "e.Key == Keys.Tab". Just replace Tab with any key in this list: http://msdn.microsoft.com/en-us/library/sy...forms.keys.aspx

Ah okay. Thx! wink.gif
Btw. Is it possible to make this script compatible with an XBOX 360 controller?
PMPlayStation Network
  Top
 

 
AngryAmoeba  
Posted: Tuesday, Sep 7 2010, 21:06
Quote Post


Symbiont
Group Icon
Group: Members
Joined: Jan 12, 2009

us.gif

XXXXX



It may be possible, but I personally don't know how to do it. confused.gif
PM
  Top
 

 
AngryAmoeba  
Posted: Sunday, Apr 24 2011, 04:31
Quote Post


Symbiont
Group Icon
Group: Members
Joined: Jan 12, 2009

us.gif

XXXXX



ULTRA BUMP.

I just learned how to fix that camera freezing bug.

A simple native function: SET_CAMERA_CONTROLS_DISABLED_WITH_PLAYER_CONTROLS

I've updated the code that I posted on page 1, and below are just the two functions that were updated:

CODE
   public void freezeCar() {
       if (bFrozen) return;
       GTA.Native.Function.Call("SET_CAMERA_CONTROLS_DISABLED_WITH_PLAYER_CONTROLS", 0);
       Player.CanControlCharacter = false;
       bFrozen = true;
       if (bReverse) Game.DisplayText("Switch gears to drive forward");
       else Game.DisplayText("Switch gears to reverse");
   }

   public void unfreezeCar() {
       if (!bFrozen) return;
       GTA.Native.Function.Call("SET_CAMERA_CONTROLS_DISABLED_WITH_PLAYER_CONTROLS", 1);
       Player.CanControlCharacter = true;
       bFrozen = false;
   }
PM
  Top
 

 
ginebra  
Posted: Wednesday, Nov 30 2011, 09:22
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Nov 30, 2011

XXXXX



can i ask if there is a fix for this script? a fix that can make the AI cars move with freedom near me because when i continously press the brake button the AI cars neaby stops aswell.... or is there any script that contains auto brake light feature? like in mafia 2 wherein when the car is fully stopped the brake light is automatically turned on... it does not disappear... unlike in IV, it disappears, unless you use this script but nearby AI will stop as well....
PM
  Top
 

 
AngryAmoeba  
Posted: Friday, Dec 2 2011, 23:15
Quote Post


Symbiont
Group Icon
Group: Members
Joined: Jan 12, 2009

us.gif

XXXXX



Yeah, that's a very unfortunate side-effect of taking control away from the player — the police are also forced to stop. That's just how the CanControlCharacter and SET_PLAYER_CONTROL functions work...

Physically freezing the player's vehicle looks strange, since it doesn't rock on its suspension when you stop, but it would allow the police to move normally. If you'd like to try that, I think you can just replace these two things:
CODE
GTA.Native.Function.Call("SET_CAMERA_CONTROLS_DISABLED_WITH_PLAYER_CONTROLS", 0);
Player.CanControlCharacter = false;

CODE
GTA.Native.Function.Call("SET_CAMERA_CONTROLS_DISABLED_WITH_PLAYER_CONTROLS", 1);
Player.CanControlCharacter = true;

with these:
CODE
Player.Character.CurrentVehicle.FreezePosition = true;

CODE
Player.Character.CurrentVehicle.FreezePosition = false;
PM
  Top
 

 
ginebra  
Posted: Saturday, Dec 3 2011, 13:47
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Nov 30, 2011

XXXXX



thats better... thx for the help..... icon14.gif icon14.gif icon14.gif
PM
  Top
 

 
thelaststikshipht  
Posted: Saturday, May 26 2012, 21:46
Quote Post


Pluto Nash
Group Icon
Group: Members
Joined: Feb 24, 2012

us.gif

XXXXX



First off, if any of you are still willing to respond to this tread, I would like to request permission from the owner/creator to use the code you have posted (as a mod). Secondly, I would like to request your permission to modify it. Thirdly, I would like to know how I can mod it for the game controller controls, rather than the keyboard. I do not know C#, and I don't know how to write mods either. If you would be so kind, could you possibly re-code your mod to include the Xbox 360 Left trigger for brake, Right Trigger for throttle, and Right Bumper for shifting gears? Or tell me how I kind find a tutorial on doing that, or something?

Thank you all very much for any responses I get back to this outdated thread. I appreciate it.

This post has been edited by thelaststikshipht on Saturday, May 26 2012, 21:51
Users WebsitePMMSNXbox Live
  Top
 

 
thelaststikshipht  
Posted: Wednesday, Aug 8 2012, 19:41
Quote Post


Pluto Nash
Group Icon
Group: Members
Joined: Feb 24, 2012

us.gif

XXXXX



QUOTE (AngryAmoeba @ Monday, Sep 6 2010, 16:21)
I'm glad you got it working. icon14.gif Yes, unfortunately the camera freezing is normal. I don't know how to fix that.

The key to switch gears is actually Tab. You can change it by editing this part of the script: "e.Key == Keys.Tab". Just replace Tab with any key in this list: http://msdn.microsoft.com/en-us/library/sy...forms.keys.aspx

To make it compatible with XBOX 360 controller, somehow you have to implement the keystrokes as <code>if (GTA.Game.isGameKeyPressed(GTA.GameKey.MoveForward))</code> or something like that. You can find a list of those codeNames in the documentation for the latest scripthook. I'm not sure exactly which button name you would use for the triggers, but I'm sure some one of any intelligence could figure it out through trial and error if they only knew how to impliment the code for the game controller instead of the keyboard. I am trying to work this out myself, but I am very, very new to C#... I only really have any experience in JavaScript... If somebody would be willing to help out, that would be great.
Users WebsitePMMSNXbox Live
  Top
 

 

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

0 Members:

Pages: (2) 1 [2] 

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



 
IMG IMG