1
0
Fork 0
forked from Simnation/Main
Main/resources/[test]/Duck_adminKZ/client.lua
2025-06-07 08:51:21 +02:00

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)