Skip to content

Add liscence plates to a vehicle

Guillaume BÉNIT edited this page Dec 22, 2016 · 1 revision

If you want add license plates to your vehicles, you need input and edit this code in your vehicle file :

LicensePlate=LicensePlate or {}

LicensePlate.ModelPlates={
    ["models/buggy.mdl"]={
        {
            pos=Vector(0,64.5,15),
            ang=Angle(0,180,90),
            scale=0.05
        },
        {
            pos=Vector(0,-108,20),
            ang=Angle(0,0,90),
            scale=0.05
        }
    }
}

Else, for add new vehicles you need edit LicensePlate/lua/autorun/licenseplate_veh.lua.

Add a new line and paste this code under the last vehicle.

["models/buggy.mdl"]={
    {
        pos=Vector(0,64.5,15),
        ang=Angle(0,180,90),
        scale=0.05
    },
    {
        pos=Vector(0,-108,20),
        ang=Angle(0,0,90),
        scale=0.05
    }
}

models/buggy.mdl is the model of vehicle.

{
    pos=Vector(0,64.5,15),
    ang=Angle(0,180,90),
    scale=0.05
},

This is the front parameters of the license plate.

{
    pos=Vector(0,-108,20),
    ang=Angle(0,0,90),
    scale=0.05
}

This is the rear parameters of the license plate.

Vector(0,64.5,15) is the position of the plate on the vehicle (x,y,z).

Angle(0,180,90), is the tilt of the plate on the vehicle.

0.05 is the size of the plate on the vehicle.

License Plate

Addon for Garry's Mod. Add license plates on your vehicles !

Download last release : LicensePlate-master.zip

Download snapshot release : LicensePlate-dev.zip

Follow this addon on Steam Workshop (for server) : License plate

Follow this addon on Steam Workshop (for client) : License plate - content

Clone this wiki locally