[FREE] [ESX] NKHD Plate Switcher V2

Description:
It adds an Item named Tape, which allows you to Tape your Numberplate, I have made an Example, what you can do with it. It also Includes custom Plates, which are Taped. This Version Includes an save in the Databank, so that if someone has an problem, you can change the plate to the same as before.

Example:
For Example you have an Speedcamera Script and you want the players not ot get an Fine, they can Tape their Numberplate. You can Implement this through the Implemented Export.

Preview:
Preview

Photo Preview, Only with custom Plates:
image

Resources Monitor:

Depencies:

Optional:

Optional for Custom Plates:

How to install the plates:
To overrite the Yankton plate:

Put following code into plates.cfg:

setr plate_override_yankton_plate {
	"fileName" : "plates/palteunder.png",
	"normalName" : "plates/palteunder_n.png",
	"pattern" : "AAAA1111"
}

Drag and Drop the plate Textures in the plates folder

To start it put ensure xnPlates; exec @xnPlates/plates.cfg into your server.cfg

Github:

7 Likes

A great idea.

Currently I would actually miss the database “Remove” if someone uses the tape_remover.

Perhaps instructions for “beginners” on how to replace the license plate would be helpful.

Otherwise you did a great job :wink:

Thanks for your comment!

Added that it removes the database.

Going to add an Tutorial soon

1 Like

Added Tutorial

Sick idea!!! :red_car: thanks for the free release. :smiling_face_with_three_hearts:

Nice release :slight_smile:

You must rework this:

server.lua:31: attempt to index a nil value (local ‘xPlayer’)

server.lua:31 is an end:

RegisterServerEvent('nkhd_changePlate:removeTapeItem')
AddEventHandler('nkhd_changePlate:removeTapeItem', function()
    local _source = source
    local xPlayer = ESX.GetPlayerFromId(_source)

    if xPlayer then
        xPlayer.removeInventoryItem('tape', 1)
    else
        if Config.Debug == true then
            print("Error: Player not found - player ID: " .. _source)
        end -- This end
    end
end)

Error comes here,

RegisterServerEvent(‘nkhd_changePlate:getIdentifier’)
AddEventHandler(‘nkhd_changePlate:getIdentifier’, function()
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source) ◄ ◄ ◄
local identifier = xPlayer.identifier
TriggerClientEvent(‘nkhd_changePlate:receiveIdentifier’, _source, identifier)
end)

What ESX Version do you use? at minte there is no problem

ESX Legacy 1.10.1

Should work now I hope, at my server it was only if I hadn’t selected an charakter

You were a few minutes faster now :smiley:

I actually just had the solution :grin:

I don’t know if mine even works in your esx version :grinning:
At mine it worked before also

Thats how it works :wink:

Have you ever thought about including a target option?

I think some people would be happy about that too

Do you mean like ox target?

yes. :slight_smile:

Trying to implement it

1 Like

Added an very Bad solution, but it works for now, tring to make it better

Made it better, don’t have to download my Ox Target version