ev_customplates

EV_CUSTOMPLATE is a custom made ressource. Completely edited and changed to work properly and optimized.

EV Custom Plate System

The EV Custom Plate System allows players to customize their vehicle license plates using a streamlined menu and integration with various frameworks and systems like QBCore, ox_lib, and more.


Configuration

The configuration file defines the core settings for the Custom Plate system. Below are the key parameters:

Core Settings


Usage Instructions

Item Requirements

  • Players need the item defined in CustomPlateName (default: customplate) in their inventory to access the custom plate menu.

Changing a Plate

  1. Ensure the player has the required item in their inventory.

  2. Approach a vehicle that the player owns.

  3. Trigger the Custom Plate Menu:

    • If using ox_lib, a menu with the title defined in Title will appear.

    • Enter a plate name following the requirements:

      • Minimum Characters: Defined in MinNumbers (default: 4).

      • Maximum Characters: Defined in MaxNumbers (default: 8).

      • Placeholder Text: Displays in the input field before typing (default: EVOLVED).

  4. Confirm the new plate, provided it doesn’t contain any blacklisted words from FilteredWords.


Integration Details

Framework Support

The system supports the following frameworks:

  • QBCore: Set framework = "qb".

  • ESX: Set framework = "esx".

Inventory and Progress Systems

  • Inventory: Options include ox or qb to validate if the player has the required item.

  • Progress Bar: Displays progress when applying the plate. Options include ox or qb.

Notifications

Customize notifications with the Notify parameter. Supported systems:

  • ox_lib, qb-core, mythic_notify, and others.


Developer Notes

Debugging

Set Debug = true in the configuration to enable detailed prints for troubleshooting.

Blacklisted Words

Edit the FilteredWords array to update the list of banned words. Players attempting to use these words will receive an error notification.

Key Systems

Set AltKeys = true if using alternative key systems (e.g., T1ger, Mono). This ensures compatibility with third-party key management.


Example Scenarios

Player Flow

  1. Requirement Check: The player’s inventory is checked for the customplate item.

  2. Menu Interaction: The player enters their desired plate name using the input dialog.

  3. Validation:

    • Plate length is checked against MinNumbers and MaxNumbers.

    • Input is sanitized against the FilteredWords list.

  4. Plate Applied: If validation passes, the new plate is applied to the vehicle, and a confirmation notification is sent.

Notifications

  • Success: "Plate applied successfully!" (customizable in your framework’s notify system).

  • Failure: Notifications are sent if:

    • The plate length is invalid.

    • The player doesn’t own the vehicle.

    • The plate contains blacklisted words.


Last updated