What's new

Vehicle Attachments

Not open for further replies.


Dec 29, 2015

Vehicle Attachments
Development OverviewFeature Name: Vehicle Attachments
Script Author: TommyB
Feature Version: Version 2.5

The Vehicle Attachments system was implemented in Version 2.5 as a feature for vehicles besides /mod. It works just as the /clothing system for players, but instead it is adding objects to vehicles.

The system's idea has been around the development for quite a while now, but with the 2.5 update the players are now available to use it. Of course some restrictions to such system are necessary, they will be stated down below as you read the guide. One of the main restrictions of the system is that you can only place the objects on your owned vehicles.

The system uses a pre-set list of objects that can be attached to your vehicle. Some of the objects have collision model, so we had to implement a movement command that can move the object around the vehicle without a problem.

Core FeaturesThe Vehicle Attachments system allows the player to customize their vehicles with a pre-set list of objects that are purchasable anywhere. You don't have to go to a mechanic garage in order to be able to pruchase the items.

Two new commands have been added to the script for this feature:
  • /vattachments - Used to access the menu of the system
  • /vattachedit - Used to move the objects with collision model

To add an object you have to sit inside your vehicle and type in /vattachments.
Core Features

It is highly suggested to pick a flat ground and face North while you edit your objects using the axis version, because the outcome of the object after saving might be different from what you positioned.

Once you typed the command in, you face the following dialog:


You can only have maximum 5 objects attached at a time.
You click on the slot you want your object in and you will get to this menu:


In this menu you see the object list you can work with. Some of the objects are working with a collision model, so they are marked with a red name. The rest are the non-collision objects, marked white. We select one to buy.


You get a message in the chat about abusing the system and the results of it. Also get a message about having vehicle mods and the consequences of it.

Now that you are aware of all these informations, you are ready to position your object.
There are two ways of doing it, one is to remain in your car and move your camera with the following keys:
  • Arrow UP - Camera moves up.
  • Arrow DOWN - Camera moves down.
  • Numpad Key 4 - Camera rotates to the left.
  • Numpad Key 6 - Camera rotates to the right.
This is probably the most used method by everyone, there is only one negative effect to it that is you cannot move your camera with small adjustments.

But there is a second method to move your object around, that is to step out of your car and hold the SPACE key to move your camera around, whilst you edit the object. This method works as the same it does for the furniture system or the /clothing system. The positive effect to it that is you can move your camera with slight adjustments too, the negative effect of it that you have to step back into your car, in order to finish the movement. Otherwise it will cancel your purchase.




After positioning the object and saving it in its place, you can purchase more if you want to have more or if you can have more. Let's see how the positioning works for the objects that are using collision models.


As you can see, the system tells you to use a specific command - /vattachedit - in order to be able to move the object around your car. The feature will place the object way above your vehicle, this is to prevent it from damaging your car upon purchase. But your center point is low inside the car, in the middle of it (approximately between the two front seats), you will add or subtract to this 0, 0, 0 coordinate.
Also you have to remember that this center coordinate is the pivot point for all your objects if you use this - /vattachedit - command. In that case you have to count and calculate the coordinates of your already placed, but non-collisional object if you want to use this command to edit those ones aswell.


The command tells you a pre-set of how the command should work. In order to get the command to work, you cannot leave empty spaces between the syntaxes. That means you have to fill out the empty coordinate's place with a 0, if you have to. The command works with fractions aswell, so you can place them in the command aswell.
You can be precise up to .001 with the fraction numbers, in case you need a really fine positioning for your object.

In order to make the command work, you don't have to use the letters given in the pre-set of the command, you just have to type in something looking like this:


This is my command that I used to make the Laptop object positioned on the Feltzer's gearbox.
These coordinates you fill into the syntaxes of the /vattachedit command, will be the coordinates/rotations of the object on each axises. These are the basic directions of an object on each axises, rotation axises:





Now that you are aware of the positioning of both methods and sub-methods, you should get a look around the menu after placing an object on your car. Bring it up with /vattachments again, and select a slot. It will bring you to a dialog with 4 options.
  • Put away - Hides/shows the object
  • Edit position - Brings you back to the positioning, if you wanna adjust your object.
  • Duplicate item - Duplicates the object, you can select the duplicated object from the menu and edit its position.
  • Delete item - Permanently removes the object from the vehicle.


After you filled all your five slots in, you can hide the objects, edit or delete them. Hiding them won't free up the slot, so you still have the object(s) in your car's /vattachments inventory. Deleting it will remove the object permanently, but you can purchase it once again and position it again where you want to.
Duplicating will place the new object upon the position of the old one, so you edit it from there.

Only five objects can be placed per vehicle. You should bear in mind that abusing of the system, or messing around with it OOCly is completly forbidden. You shall RP having the object in your vehicle if it is shown by the script, chose the type of objects you want on your car. Any case of abuse of the system will result in a permanent ban from the server.

Related Commands
  • /vattachments
  • /vattachedit


Dec 29, 2015
Highlighted this part of the Documentation due to some people making assistances about the instance.

It is highly suggested to pick a flat ground and face North while you edit your objects using the axis version, because the outcome of the object after saving might be different from what you positioned.
Not open for further replies.