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)


  Reply to this topicStart new topicStart Poll

 native function help?

 
Fantaseb  
Posted: Wednesday, May 9 2012, 14:19
Quote Post


One Nation, One Love, But Who? ;)
Group Icon
Group: BUSTED!
Joined: Oct 17, 2011

uk.gif

XXXXX



Would there be a Native function to make the car go faster? Like superspeed? As it would be cool, to switch bewteen the car going super super fast, then normal speed and not having to edit the handling file to make car super fast........
PM
  Top
 

 
motorsport71  
Posted: Thursday, May 17 2012, 01:43
Quote Post


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

XXXXX



Try this Native:

CODE
APPLY_FORCE_TO_CAR


You can give the car a nice hard boost from the rear (Y position). If you wanted it to "accelerate" maybe apply small force on an interval, it will "stack" so speed will continue to increase. You could, using a fixed (-Z force) hold the car to the ground better making it "heavier" so it doesn't bounce around.

Link to the native:

http://www.gtamodding.com/index.php?title=APPLY_FORCE_TO_CAR
PM
  Top
 

 
Skorpro  
Posted: Wednesday, May 30 2012, 17:47
Quote Post


GTAholiker
Group Icon
Group: Members
Joined: Jul 19, 2009

eu.gif

XXXXX



Hi,

maybe this is what you need smile.gif Check this out...

C++ script:

CustomFiberThread.cpp

CODE

// Global
int intSpeed = GetPrivateProfileIntA("Speed", "MaxSpeed", 280, "./Your Mod.ini"); // Set MaxSpeed to 280 km/h in INI
int intAcc = GetPrivateProfileIntA("Speed", "Acceleration", 70, "./Your Mod.ini"); // Set Acceleration to 70 in INI
Vehicle highSpeedCar;
f32 maxSpeed, carSpeed, carAcc;



void CustomFiberThread::SkorproCarSpeedup()
{
maxSpeed = (float) intSpeed; // int to float
carAcc = (float) intAcc;  // int to float
 
GetCarCharIsUsing(GetPlayerPed(), &highSpeedCar);
GetCarSpeed(highSpeedCar, &carSpeed);
SetVehHasStrongAxles(highSpeedCar, 1);
SetCarStrong(highSpeedCar, 1);
SetCarOnGroundProperly(highSpeedCar);

maxSpeed = maxSpeed / 3.61f; // MaxSpeed Divisor (Default: 3.61f)!
carAcc = carAcc / 100.0f;

if ((IsControlPressed(2, 40) & 1) != 0) // InGameKey => In Vehicle Accelerate (=40)
{
 carSpeed += carAcc;
 SetCarForwardSpeed(highSpeedCar, carSpeed);
 if (carSpeed >= maxSpeed)
 {
  carSpeed = maxSpeed;
  SetCarForwardSpeed(highSpeedCar, carSpeed);
 }
}
}


.........


void CustomFiberThread::RunScript()
{
while(IsThreadAlive())
{
 // Vehicle Speedup!
 if (IsCharInAnyCar(GetPlayerPed()))
 {
  if ((GetAsyncKeyState(key) & 1) != 0) // key = Your OWN key for TURBO!!!!
  {
   SkorproCarSpeedup();
  }
 }
 Wait(0);
}
}

Don't forget to change the "key"!

CustomFiberThread.h
CODE

.........

void SkorproCarSpeedup();

.........


Usage: In any car press <key> + "W" (your acceleration key).

PS: This is an old script taken from my "Parked Cars v1.3" mod!

Users WebsitePM
  Top
 

 

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

0 Members:

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



 
IMG IMG