Coder Social home page Coder Social logo

rp-radio's Introduction

rp-radio

All credits go to Frazzle for making this, this is just an adapted version for pma-voice.

Note

By default the radio is disabled (its meant to be used as an in-game item) to give players the radio by default in the client.lua at the top change Radio.Has to true, if you would like to make it an item look at the replies on the FiveM forum post, there is a tutorial for adding it as an ESX item.

The export that is used to give/take a players radio is exports["rp-radio"]:SetRadio(true/false) or the event Radio.Set

Exports

Getters

Export Description Return type
IsRadioOpen Check if player is holding radio bool
IsRadioOn Check if radio is switched on bool
IsRadioAvailable Check if player has a radio bool
IsRadioEnabled Check if radio is enabled bool
CanRadioBeUsed Check if radio can be used bool

Setters

Export Description Parameter(s)
SetRadioEnabled Set if the radio is enabled or not bool
SetRadio Set if player has a radio or not bool
SetAllowRadioWhenClosed Allow player to broadcast when closed bool
AddPrivateFrequency Make a frequency private int
RemovePrivateFrequency Make a private frequency public int
GivePlayerAccessToFrequency Give a player access to use a private frequency int
RemovePlayerAccessToFrequency Remove a players access to use a private frequency int
GivePlayerAccessToFrequencies Give a player access to use multiple private frequencies int, int, ...
RemovePlayerAccessToFrequencies Remove a players access to use multiple private frequencies int, int, ...

Commands

Command Description
/radio Open/close the radio
/frequency Choose radio frequency

Events

Event Description Paramters(s)
Radio.Toggle Opens/close the radio none
Radio.Set Set if player has a radio or not bool

Preview

rp-radio's People

Contributors

avarianknight avatar dolutattoo avatar frazzie avatar vestedmarius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.