Hotwire Scriptinin Triggerını Veyaut Exportunu M3_Admin İçerisinde SpawnVehicle Fonkiyonuna Eklemen Gerekli Yoksa Düzkontak İster
--givevehicle
RegisterNetEvent('m3:admin:client:spawnVehicle')
AddEventHandler('m3:admin:client:spawnVehicle', function(vehiclemodel, type)
local playerPed = PlayerPedId()
local pCoords = GetEntityCoords(playerPed)
ESX.Game.SpawnVehicle(vehiclemodel, pCoords, 1, function (vehicle)
TaskWarpPedIntoVehicle(playerPed, vehicle, -1)
local newPlate = GeneratePlate()
local vehicleProps = ESX.Game.GetVehicleProperties(vehicle)
vehicleProps.plate = newPlate
SetVehicleNumberPlateText(vehicle, newPlate)
TriggerServerEvent('m3:admin:server:saveVehicle', vehicleProps, type)
TriggerServerEvent('m3:vehiclelock
lateRegister', newPlate)
end)
end)
m3_admin araç spawn kodu burda tam olarak nereye ne yazacağım ?