Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Set vehicle damage

Featured Replies

hello i was working and i have lost the code wich made a car spawn with damaged doors and windows. it was done with nativefunction. can someone help me? i have decompied my own code wich contains that part. here it is:

NativeFunction.CallByName<uint>("SMASH_VEHICLE_WINDOW", new NativeArgument[2]
      {
        NativeArgument.op_Implicit((IHandleable) this.victim),
        NativeArgument.op_Implicit(0)
      });
      NativeFunction.CallByName<uint>("SMASH_VEHICLE_WINDOW", new NativeArgument[2]
      {
        NativeArgument.op_Implicit((IHandleable) this.victim),
        NativeArgument.op_Implicit(1)
      });
      NativeFunction.CallByName<uint>("SMASH_VEHICLE_WINDOW", new NativeArgument[2]
      {
        NativeArgument.op_Implicit((IHandleable) this.victim),
        NativeArgument.op_Implicit(-1)
      });
      NativeFunction.CallByName<uint>("SET_VEHICLE_DOOR_OPEN", new NativeArgument[4]
      {
        NativeArgument.op_Implicit((IHandleable) this.victim),
        NativeArgument.op_Implicit(5),
        NativeArgument.op_Implicit(true),
        NativeArgument.op_Implicit(true)
      });
      NativeFunction.CallByName<uint>("SET_VEHICLE_DOOR_OPEN", new NativeArgument[4]
      {
        NativeArgument.op_Implicit((IHandleable) this.victim),
        NativeArgument.op_Implicit(3),
        NativeArgument.op_Implicit(true),
        NativeArgument.op_Implicit(true)
      });

 

How about you show your own code from vs before assuming something from a decompiler is yours. Nobody will help you if it's someone else's code.

  • 3 months later...

You could use this to get back on track on your project, you should be able to figure out what goes where from this =) .

 

Door indexes: 

 

0 = Front Left, //Front left window

1 = Front Right, //Front right window

2 = Back Left, //Middle left window

3 = Back Right, //Middle right window

4 = Hood, //Back left window

5 = Trunk //Back right window

6 = Toggle Extra //Windscreen

7 = Toggle Extra //Back window

 

Door indexes also go in the same pattern as vehicle seats, but - 1. For example, index -1 is the driver, but index 0 is the passenger. This is the same case for all "normal" cars (What I mean by that is, if the car has extra seats, you need to check the VehicleSeat enum).

 

The natives you need/used:

void SET_VEHICLE_DOOR_OPEN(Vehicle vehicle, int doorIndex, BOOL loose,   BOOL openInstantly)

void SMASH_VEHICLE_WINDOW(Vehicle vehicle, int index)

 

Your topic does unfortunately look like a case of code theft so you're going to have to figure out the other stuff out yourself 😃

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.