License Plates (for Vehicles) - user-grinch/ModelExtras GitHub Wiki

Available from ModelExtras v2.0+

🪪 License Plates (Regional & Illuminated Plates)

ModelExtras includes a complete, high-definition License Plate rendering system that is 100% compatible with the IVF (Improved Vehicle Features) standard.

It automatically provides region-specific plate textures based on the current in-game city or countryside location, as well as emissive nighttime plate illumination when headlights are activated.


🎨 1. Material Setup for 3D Models

To adapt your vehicle's license plate mesh to ModelExtras:

  1. In 3ds Max, Blender, or ZModeler, assign a material named carpback to the license plate geometry polygon.
  2. Apply proper UV mapping over the standard rectangular plate texture template.
  3. ModelExtras will dynamically generate the plate text and overlay the regional background texture during gameplay.

🌆 2. Regional Plate Textures

The plugin detects the vehicle's zone and automatically applies the authentic San Andreas regional plate:

Zone / Region Daytime Texture Nighttime Illuminated Texture
Los Santos (City) plate_ls plate_ls_l
San Fierro (City) plate_sf plate_sf_l
Las Venturas (City) plate_lv plate_lv_l
Red County / Countryside / Desert plate_cs plate_cs_l

📁 Texture source: The built-in plate textures are loaded from ModelExtras/ME_TEXDB.TXD. The plate background names above identify the textures used by the plugin.


🌙 3. Automatic Nighttime & Headlight Illumination

When any of the following conditions are met:

  • The in-game time enters the night period (21:00 to 06:00), OR
  • The player or NPC turns on vehicle headlights,

ModelExtras automatically:

  1. Swaps the background texture to its emissive night version (plate_*_l).
  2. Increases the material's ambient surface reflectance (MaterialAmbientOn), creating a realistic, glowing license plate illumination effect.

⚙️ 4. JSONC Configuration (Custom Plate Colors)

You can tint the plate mesh material when vehicle lights are on or off via the vehicle's .jsonc configuration file in ModelExtras/data/ or modloader/. This setting does not change the rendered plate text color:

{
  "plate": {
    "material": {
      "color": { "red": 255, "green": 212, "blue": 95 },      // Tint applied when headlights are ON
      "color_off": { "red": 255, "green": 212, "blue": 95 }  // Tint applied when headlights are OFF
    }
  }
}

Use an RGB object ({ "red": ..., "green": ..., "blue": ... }) or an RGB array ([255, 212, 95]). Alpha is not applied to the plate material by the current implementation.


💡 Features Summary for Modders:

  • IVF-style materials: Models using compatible plate material names can use ModelExtras plate rendering without changing their material setup.
  • Dynamic Characters: Renders sharp license plate characters using plate_char raster font texture.
  • SA-MP Support: Server-defined plate text is supported by SA-MP 0.3.7-R1, 0.3.7-R3/R3-1, 0.3.7-R5, and 0.3.DL-1. Other client versions are not confirmed by the current compatibility code.
  • Realistic Ambience: Ambient brightness levels can be fine-tuned via [LIGHTS] MaterialAmbientMul in ModelExtras.ini.