forked from Simnation/Main
21 lines
No EOL
800 B
Lua
21 lines
No EOL
800 B
Lua
local QBCore = exports['qb-core']:GetCoreObject()
|
|
|
|
RegisterCommand("ak", function()
|
|
local ped = PlayerPedId()
|
|
local vehicle = QBCore.Functions.GetClosestVehicle(GetEntityCoords(ped))
|
|
|
|
if vehicle and IsPedInAnyVehicle(ped, false) then
|
|
local input = lib.inputDialog('Kennzeichen ändern', {
|
|
{ type = 'input', label = 'Neues Kennzeichen (max 8 Zeichen)', required = true, max = 8 }
|
|
})
|
|
|
|
if input and input[1] then
|
|
local newPlate = input[1]:upper()
|
|
TriggerServerEvent('kennzeichen:changePlate', VehToNet(GetVehiclePedIsIn(ped, false)), newPlate)
|
|
else
|
|
QBCore.Functions.Notify("Ungültige Eingabe!", "error")
|
|
end
|
|
else
|
|
QBCore.Functions.Notify("Du musst im Fahrzeug sitzen!", "error")
|
|
end
|
|
end) |