API

Client side exports / events

Event: rcore_radiocar:API:OpenPlayerUI

  • Description

    • This event will open the radio UI if the vehicle meets the requirements to open the radio.

Example:

RegisterCommand("openradio", function(source, args, raw)
	TriggerEvent("rcore_radiocar:API:OpenPlayerUI")
end)

-- can be called from server-side as well
-- assuming this is a server-side command
RegisterCommand("openradioserver", function(source, args, raw)
	TriggerClientEvent("rcore_radiocar:API:OpenPlayerUI", source)
end)

Export: OpenPlayerUI

  • Description

    • This event will open the radio UI if the vehicle meets the requirements to open the radio.

Example:

Server side exports

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

And set it to true

This function will allow to the specific plate vehicle to use radio

Example:

Simple function that will return true/false if the plate owns radio

If you need to check specific type then use this export

Example:

This function will remove access to the radio for the specific plate

Example:

Last updated

Was this helpful?