MrNewbScripts
My DiscordSee The StoreCommunity_BridgeGithub
  • MOTD
  • MrNewbVehicleKeys
    • Install
      • Framework
        • esx
        • qb-core
        • qbox
      • inventory
        • 🐂ox_inventory
        • qb-inventory
        • qb-inventoryv2
        • origen_inventory
        • ps-inventory
        • jpr-inventory
        • qs-inventory
      • Inventory Images
    • Exports
      • Server Exports
      • Client Exports
    • Backwards Events
      • Client Events
      • Server Events
    • FAQ
    • Commands
    • Snippet Examples
      • qb-vehicleshop
      • qb-garages
      • Common qb-core Snippets
  • MrNewbBeeKeeping
    • Install
      • Frameworks
        • qb-core
        • qbox
        • ESX
      • Inventory Images
      • Inventory
        • 🐂ox_inventory
  • MrNewbPrescriptions
    • Install
      • Framework
        • qb-core
        • qbox
        • ESX
      • inventory
        • 🐂ox inventory
        • qs-inventory
        • qb-inventory V1
        • qb-inventory v2
      • Inventory Images
    • Exports
      • Server Exports
      • Client Exports
    • Snippet Examples
      • qb-drugs
      • qbx_ambulancejob
    • FAQ
  • MrNewbPlateCarriers
    • Install
      • Framework
        • qb-core
        • qbox
        • ESX
      • inventory
        • 🐂ox_inventory
        • qb-inventoryv2
      • Inventory Images
    • Exports
      • Server Exports
  • MrNewbCustomPlates
    • Install
      • Framework
        • qb-core
        • qbox
        • ESX
      • inventory
        • ox_inventory Steps
      • Inventory Images
  • MrNewbNameChanger
    • Install
      • Frameworks
        • qb-core
        • qbox
        • ESX
      • Inventory
        • 🐂ox_inventory
        • ps-inventory
        • qb-inventoryv2
        • qb-inventory
      • Inventory Images
  • MrNewbPawn
    • Install
  • MrNewbPhoneTracker
    • Install
      • Frameworks
        • qb-core
        • qbox
        • ESX
      • Inventory Images
      • Inventory
        • 🐂ox_inventory
  • MrNewbWeaponTints
    • Install
      • inventory
        • ox_inventory Steps
      • Inventory Images
  • MrNewbGiftBox
    • Install
      • Framework
        • qb-core
        • qbox
        • ESX
      • inventory
        • ox_inventory Steps
      • Inventory Images
    • Exports
      • Server Exports
Powered by GitBook
On this page
  • GiveKeysByPlate
  • GiveKeys
  • RemoveKeysByPlate
  • RemoveKeys
  • HasKeysByPlate
  • HaveKeys
  • SetVehicleLock
  1. MrNewbVehicleKeys
  2. Exports

Server Exports

This is a list of the available server side exports.

GiveKeysByPlate

-- This export will give a player keys to a vehicle server side by the plate
-- plate is a string ie ("PLATENUMBER")
exports.MrNewbVehicleKeys:GiveKeysByPlate(source, plate)

GiveKeys

-- This export will give a player keys to a vehicle server side
-- you must pass the player source and networkid to the vehicle
-- In this example vehicle is a variable, this should be the vehicle you want the keys for
local netId = NetworkGetNetworkIdFromEntity(vehicle)
exports.MrNewbVehicleKeys:GiveKeys(source, netId)

RemoveKeysByPlate

-- This export will remove a players key to a vehicle server side
-- you must pass the player source and platestring to the vehicle
-- In this example plate is a variable, this should be the text of the plate you want to remove the keys for

local plate = "platestringhere"
exports.MrNewbVehicleKeys:RemoveKeysByPlate(source, plate)

RemoveKeys

-- This export will remove a players key to a vehicle server side
-- you must pass the player source and networkid to the vehicle
-- In this example vehicle is a variable, this should be the vehicle you to remove the keys for

local netId = NetworkGetNetworkIdFromEntity(vehicle)
exports.MrNewbVehicleKeys:RemoveKeys(source, netId)

HasKeysByPlate

-- This export will return if a player has keys for a vehicle
-- you must pass the player source and plate string of the vehicle
-- In this example vehicle is a variable, this should be the vehicle you want the keys for

local plate = "platestringhere"
exports.MrNewbVehicleKeys:HasKeysByPlate(source, plate)

HaveKeys

-- This export will return if a player has keys for a vehicle
-- you must pass the player source and networkid to the vehicle
-- In this example vehicle is a variable, this should be the vehicle you want the keys for

local netId = NetworkGetNetworkIdFromEntity(vehicle)
exports.MrNewbVehicleKeys:HaveKeys(source, netId)

SetVehicleLock

-- This export will set the lock status for a vehicle
-- you must pass the networkid of the vehicle and a lock status
-- passing 2 would lock
-- passing 1 would unlock
-- In this example vehicle is a variable, this should be the vehicle you want the keys for

local netId = NetworkGetNetworkIdFromEntity(vehicle)
exports.MrNewbVehicleKeys:SetVehicleLock(netId, 2)
PreviousExportsNextClient Exports

Last updated 3 months ago