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

 [C++] Adding car parts to spawned cars

 ScriptHook
 
FaTony  
Posted: Saturday, Apr 21 2012, 11:32
Quote Post


C++ guy
Group Icon
Group: Members
Joined: Aug 12, 2011

XXXXX



I'm trying to spawn Sentinel used by gang members in northern Alderney. That one with nice spoiler and green chrome. Unfortunately, when I call Scripting::CreateCar, it spawns normal Sentinel without any nice features. I've searched this forum and found that there's something called 'livery' and also Scripting::IsVehicleExtraTurnedOn, but I can't find a function to set extras and all mods that do this are closed source (what a shame).

Can somebody help me?
PM
  Top
 

 
Fantaseb  
Posted: Saturday, Apr 21 2012, 12:38
Quote Post


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

uk.gif

XXXXX



QUOTE (FaTony @ Saturday, Apr 21 2012, 11:32)
I'm trying to spawn Sentinel used by gang members in northern Alderney. That one with nice spoiler and green chrome. Unfortunately, when I call Scripting::CreateCar, it spawns normal Sentinel without any nice features. I've searched this forum and found that there's something called 'livery' and also Scripting::IsVehicleExtraTurnedOn, but I can't find a function to set extras and all mods that do this are closed source (what a shame).

Can somebody help me?

Go into the Vechile.ide, go to the end of the sentinel and put ext_all ext_strong then, go into the popcyle and change the cars where you want them and they will spawn with full bodykit


ext_all = all cars attachments attached.

ext_string = makes the car strong as it wont be strong when attaching the above function to the vechile in the .ide file. you need to edit the common.rpf enjoy
PM
  Top
 

 
FaTony  
Posted: Saturday, Apr 21 2012, 13:36
Quote Post


C++ guy
Group Icon
Group: Members
Joined: Aug 12, 2011

XXXXX



I don't want to modify any of the game files.
PM
  Top
 

 
Fantaseb  
Posted: Sunday, Apr 22 2012, 13:39
Quote Post


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

uk.gif

XXXXX



Im not sure then, I have never tried anything any other way to get all the addons on the car. Thats probably the only way.
PM
  Top
 

 
mikelarry  
Posted: Monday, Apr 23 2012, 23:59
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: Apr 22, 2012

XXXXX



just go to the gtaforums irc and ask aru, i talked to him the other day in there
PM
  Top
 

 
FaTony  
Posted: Tuesday, Apr 24 2012, 06:05
Quote Post


C++ guy
Group Icon
Group: Members
Joined: Aug 12, 2011

XXXXX



Found, it's Scripting::TurnOffVehicleExtra.

It's not included with ScriptHook SDK.

The code should be like this:
CODE
namespace Scripting
{
   static void TurnOffVehicleExtra(Vehicle vehicle, eVehicleExtra extra, b8 off)
   {
       NativeInvoke::Invoke<NATIVE_TURN_OFF_VEHICLE_EXTRA, ScriptVoid>(vehicle, extra, off);
   }
}


Also, documentation.

This post has been edited by FaTony on Tuesday, Apr 24 2012, 06:34
PM
  Top
 

 
Fantaseb  
Posted: Wednesday, Apr 25 2012, 13:55
Quote Post


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

uk.gif

XXXXX



QUOTE (mikelarry @ Monday, Apr 23 2012, 23:59)
just go to the gtaforums irc and ask aru, i talked to him the other day in there

Can you put a link up the the IRC channel so I can ask Aru something. Cheers
PM
  Top
 

 

0 User(s) are reading this topic (0 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