Quantcast

Jump to content

» «
Photo

[C++] Adding car parts to spawned cars

6 replies to this topic
FaTony
  • FaTony

    C++ guy

  • Members
  • Joined: 12 Aug 2011

#1

Posted 21 April 2012 - 11:32 AM

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?

Fantaseb
  • Fantaseb

    One Nation, One Love, But Who? ;)

  • BUSTED!
  • Joined: 17 Oct 2011

#2

Posted 21 April 2012 - 12:38 PM

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

FaTony
  • FaTony

    C++ guy

  • Members
  • Joined: 12 Aug 2011

#3

Posted 21 April 2012 - 01:36 PM

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

Fantaseb
  • Fantaseb

    One Nation, One Love, But Who? ;)

  • BUSTED!
  • Joined: 17 Oct 2011

#4

Posted 22 April 2012 - 01:39 PM

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.

mikelarry
  • mikelarry

    Player Hater

  • BUSTED!
  • Joined: 22 Apr 2012

#5

Posted 23 April 2012 - 11:59 PM

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

FaTony
  • FaTony

    C++ guy

  • Members
  • Joined: 12 Aug 2011

#6

Posted 24 April 2012 - 06:05 AM Edited by FaTony, 24 April 2012 - 06:34 AM.

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.

Fantaseb
  • Fantaseb

    One Nation, One Love, But Who? ;)

  • BUSTED!
  • Joined: 17 Oct 2011

#7

Posted 25 April 2012 - 01:55 PM

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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users