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.

Vehicle Constructor with Modification 'add-on' like Armour or turbo?

Featured Replies

I have searched but came up empty, and non of the 8 vehicle constructor-overloads has anything to include any modification Add-ons, so not even sure it is possible.
I create a car for the Player like:
Vehicle callCar = new Vehicle("POLICE2", carSpawnPoint);
chauf.WarpIntoVehicle(callCar, -1);
chauf.Tasks.DriveToPosition(trafikUnJamPoint, 20f, VehicleDrivingFlags.DriveAroundObjects, 5f);

The Ped chauf then deliver that car to the player.
But the car is horrible sensitive to gunshots, because it is without armour. It takes 8-9 bullets, and then blow-up!
Because of that i need to give the car armour, but do not know how to add Modifications.

Is it possible?
                                       

See my plugin here:
https://www.youtube.com/watch?v=peqSXuTfIyY

Let me know if you find it interesting.
Best Regards.

  • Author
13 hours ago, LMS said:

Every vehicle has a Modsproperty you can use. Make sure to install a default modkit first using it, then you can set the index for other mods.

 

I can not make that work.
After you advised me about the Mods-property, and i found that using Mods made an instance of VehicleModder, that brought me to the method ApplyAllMods();


I figured out how to use it in a call with an existing Vehicle as quailifier as
callCar.Mods.ApplyAllMods();
That builds without errors, but it does nothing to the instance of callCar, there are no modifications.
I think the reason is this

13 hours ago, LMS said:

Make sure to install a default modkit first using it

I do not understand what you mean?
Do i need to add an additional API-reference named 'modkit'.
It eludes me, because i have no issues adding modification in default LSPD from the garage-menu, so why is the mod-kit not available in RAGE-sdk, when using it in a plugin?
I do not understand what the sentence "install a default modkit" means?
Is it an using-directive?
I already has RAGE and
using Rage.Native;
using Rage.Attributes;

Adding

using Rage.ModKit
-Is not accepted in VS
There is only one thread in API Development that contain anything about Mods-property. That is sooo strange.?!
There is no code.

See my plugin here:
https://www.youtube.com/watch?v=peqSXuTfIyY

Let me know if you find it interesting.
Best Regards.

  • Author
18 hours ago, LMS said:

vehicle.Mods.InstallModKit

oh Call a Method named InstallModKit!
I should have figured that out.
Unfortunately there are no effect in calling that
I does it like:
     Vehicle callCar = new Vehicle(theModel, point); //defined as String and Vector3 in the call
                    callCar.Mods.InstallModKit();
                    callCar.Mods.ApplyAllMods();

But nothing is changed.
Do i forget something ?

-Or does it not work with emergency vehicles -It is a POLICE2 that i am trying to upgrade.
Should have said that earlier, if it has any influence.

 

 

See my plugin here:
https://www.youtube.com/watch?v=peqSXuTfIyY

Let me know if you find it interesting.
Best Regards.

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.