if you want to use any of these exports you need to enable them in config.lua So go to your config.lua look for this
Config.OnlyCarWhoHaveRadio
-- All types can be find in config.lua
-- Look for Config.RadioStyle
GiveRadioToCar(LicensePlate, typeRadio)
function GetVehPlate(source)
return GetVehicleNumberPlateText(GetVehiclePedIsIn(GetPlayerPed(source)))
end
function IsPedInAnyVehicle(source)
return GetVehiclePedIsIn(GetPlayerPed(source), false) ~= 0
end
RegisterNetEvent("rcore_itemradio:sendLicensePlate", function()
if not IsPedInAnyVehicle(source) then
return
end
local plate = GetVehPlate(source)
exports.rcore_radiocar:GiveRadioToCar(plate, 2)
end)
HasCarRadio(LicensePlate)
HasCarRadioType(LicensePlate, radioType)
function GetVehPlate(source)
return GetVehicleNumberPlateText(GetVehiclePedIsIn(GetPlayerPed(source)))
end
function IsPedInAnyVehicle(source)
return GetVehiclePedIsIn(GetPlayerPed(source), false) ~= 0
end
RegisterNetEvent("rcore_itemradio:sendLicensePlate", function()
if not IsPedInAnyVehicle(source) then
return
end
local plate = GetVehPlate(source)
if exports.rcore_radiocar:HasCarRadio(plate) then
print("this plate", plate, "does have already the radio")
else
print("this plate", plate, "sadly doesnt have radio!")
end
end)
RemoveRadioFromCar(LicensePlate)
function GetVehPlate(source)
return GetVehicleNumberPlateText(GetVehiclePedIsIn(GetPlayerPed(source)))
end
function IsPedInAnyVehicle(source)
return GetVehiclePedIsIn(GetPlayerPed(source), false) ~= 0
end
RegisterNetEvent("rcore_itemradio:sendLicensePlate", function()
if not IsPedInAnyVehicle(source) then
return
end
local plate = GetVehPlate(source)
exports.rcore_radiocar:RemoveRadioFromCar(plate)
end)