Client exports & Client Events

Client Event: pinkFrog_radioList:closeUI

This client event disconnects the player from the radio and closes the radio UI. It can be used in systems where the player should no longer have access to radio communication.

Example use cases:

  • In the death system of ambulancejob, to automatically disconnect the player from the radio when they die.

  • In a cuff/arrest system, to remove the player from the radio when they get cuffed.

Client Event Name:

TriggerEvent('pinkFrog_radioList:closeUI')

Using this event ensures that players cannot continue using the radio after dying or being restrained. Here is an example of usage in one of the ambulancejob scripts.

Export: connectRadioFrequency

This export allows you to connect a player to a specific radio frequency directly from another script.

Syntax:

Parameters:

  • channel (number) – The radio frequency/channel the player will connect to.

  • restricted (boolean) – Determines whether the script should check if the player has permission to join a restricted channel.

  • checkItem (boolean) – Determines whether the script should check if the player has the required radio item.

Parameter explanation:

  • If restricted is set to true, the system will verify whether the player has access to restricted channels (for example job-based channels).

  • If restricted is set to false, the player will connect to the frequency even if the channel is normally restricted.

  • If checkItem is set to true, the system will check if the player has the required radio item in their inventory.

  • If checkItem is set to false, the item requirement will be ignored.

Example usage:

Last updated