Kartik Scripts

Surveillance Drone

The Surveillance Drone is a highly advanced tactical tool that allows officers to deploy a flyable quadcopter to scan rooftops, spy on barricaded suspects, search dark areas, and transport small items.

Technical Features

  • FPV Pilot View: Deploying the drone attaches the player's camera to the drone's lens, offering full flight control (ascend, descend, yaw, pitch, roll).
  • Search Spotlight: Toggle a high-powered overhead spotlight to illuminate dark scenes.
  • Drone Stash: Features a small built-in inventory container allowing the drone to carry and drop off small items (e.g. keycards, cuffs, lockpicks) remotely.
  • Battery Life: Drains battery charge during flight. The pilot must land the drone and swap out a depleted battery (drone_battery_empty) for a charged one (drone_battery) to keep flying.

How to Pilot & Use In-Game

  1. Deploy Drone: Select the police_drone item in your inventory and place it on the ground.
  2. Take Control: Use the drone_remote item to link with the drone. Your camera will switch to FPV flight mode.
  3. Flight Controls:
    • W / A / S / D: Pitch and Roll.
    • Space / Shift: Ascend and Descend.
    • Q / E: Yaw (Rotate).
    • H: Toggle Spotlight.
    • G: Open Drone Stash.
    • Backspace: Exit FPV Mode (Drone stays in the air).
  4. Replacing Battery: Target the grounded drone in-game, select "Replace Battery", and choose a charged battery from your inventory.

Pairing the Remote

  • When you deploy a drone, a drone_remote in your inventory is paired to it automatically and you get a "Remote paired with drone" notification.
  • An unpaired remote is used first. If you have none, a remote that was paired to a drone that is no longer deployed is re-paired to the new one. A remote paired to another officer's drone that is still in the air is left alone.
  • If you use a remote that is not paired yet while your own drone is deployed, it pairs to your drone on the spot.
  • A remote stays paired to its drone, so you can hand it to another officer to fly your drone.

ox_inventory Setup

Use the item definitions from the Items page. The remote and drone must not stack (stack = false) so each one keeps its own pairing and serial.

Leave out consume and the client block so the script handles item use. If you prefer to trigger the items from ox_inventory directly, both of these work:

['drone_remote'] = {
    label = 'Drone Transmitter',
    weight = 500,
    stack = false,
    close = true,
    client = { export = 'kartik-policejob.useRemote' },
},
['police_drone'] = {
    label = 'Police Surveillance Drone',
    weight = 2500,
    stack = false,
    close = true,
    client = { export = 'kartik-policejob.useDrone' },
},

The client events kartik-policejob:drone:useRemote and kartik-policejob:drone:useItem also work as client = { event = '...' }.

On this page