๐Ÿงพ
docs.scriptsfivem.com
  • ๐Ÿ‘‹Welcome
  • ๐ŸงพResources
    • ๐Ÿ“ฑsfphone
      • Installations
      • Config
      • Exports
      • Open phone
    • ๐Ÿš—sfracing
      • Installations
      • Config
      • Exports
    • ๐Ÿ’ตsfbanking
      • Installations
      • Config
      • Exports
    • ๐Ÿ’ปsfctab
      • Installations
      • Config
      • Open tablet
      • Exports // Triggers
    • ๐Ÿ› ๏ธsfcrafting
      • Installations
      • Config
      • Open crafting table
    • ๐Ÿ””sfnotify
      • Installations
      • Config
      • Exports // Triggers
    • ๐Ÿ‘ทโ€โ™‚๏ธsfjob
      • Installations
      • Config
      • Exports // Triggers
    • ๐Ÿ’ปsfjobtab
      • Installations
      • Config
      • Triggers
    • โŒšsfgps
      • Installations
      • Config
      • Exports
    • ๐Ÿ‘ฎsfpolice
      • Installations
      • Config
      • Exports/Triggers
    • ๐Ÿฅsfems
      • Installations
      • Config
      • Exports/Triggers
    • ๐Ÿ…ฟ๏ธsfgarages
      • Installations
      • Config
      • Exports/Triggers
    • ๐Ÿ›๏ธsfdoj
      • Installations
      • Config
      • Exports/Triggers
    • ๐ŸŽฃsffishing
      • Installations
      • Config
      • Triggers
    • ๐Ÿš—sfvehicleshop
      • Installations
      • Config
    • ๐Ÿ”งsfmechanic
      • Installations
      • Config
      • Exports/Triggers
    • ๐Ÿฐsfjail
      • Installations
      • Config
      • Exports
    • ๐Ÿ”‘sfkeys
      • Exports
Powered by GitBook
On this page
  • TRIGGERS/EXPORTS Lua code examples for Client Side
  • EXPORTS Lua code examples for Server Side
  1. Resources
  2. sfdoj

Exports/Triggers

TRIGGERS/EXPORTS Lua code examples for Client Side

TriggerEvent("sfdoj:tabletopen") -- open police tablet
TriggerEvent("nuifix") -- if the NUI breaks.

EXPORTS Lua code examples for Server Side

exports["sfdoj"]:getOnlinePlayers()
-- return table with data (source, fullname, phone_number, grade) 

In your radio script, add export so that the tablet shows data on which radio the officer is on

local source = source
local channel = 1 -- for e.g.
exports["sfdoj"]:setChannelRadio(source, channel)
PreviousConfigNextsffishing

Last updated 1 year ago

๐Ÿงพ
๐Ÿ›๏ธ