Quantcast

Jump to content

» «
Photo

Spawn vehicles inside interiors

No replies to this topic
FaTony
  • FaTony

    C++ guy

  • Members
  • Joined: 12 Aug 2011

#1

Posted 30 April 2012 - 07:53 PM Edited by FaTony, 30 April 2012 - 08:25 PM.

When I call CreateCar, spawned vehicle gets assigned default interior. If player is inside interior, spawned vehicle is invisible. I can't find native function to set interior of the vehicle.

Any help?

EDIT: And again I didn't search hard enough. I was searching for "interior" before, after I changed that to "room" I quickly found SET_ROOM_FOR_CAR_BY_KEY.

Here's C++ function:
CODE
static void SetRoomForCarByKey(Vehicle vehicle, eInteriorRoomKey key)
{
NativeInvoke::Invoke<NATIVE_SET_ROOM_FOR_CAR_BY_KEY, ScriptVoid>(vehicle, key);
}


You can find key using GetKeyForCharInRoom for example.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users