Jump to content
7katwoal12

Set vehicle damage

Recommended Posts

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)
      });

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×