πŸ“–
Documentation
  • Welcome!
  • Common Issues
    • Keymaster
    • Updating resources
  • πŸ“„Scripts
    • πŸš™AdvancedParking
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • Events (server)
      • Events (client)
      • FAQ
    • 🚚VehicleTransport
      • Installation
      • How to use it
      • Creating a new transport
      • Exports (client)
      • Events (server & client)
    • πŸ”‘VehicleKeyChain
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • FAQ
    • πŸ—œοΈVehicleClamp - Pre-Release
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • Integration
        • ESX
        • QB
    • πŸ“„VehicleRegistration
      • Installation
      • Exports (server)
      • Exports (client)
    • πŸ“ƒVehicleInteraction
      • Installation
    • πŸ—ΊοΈVehicleTracker
      • Installation
      • Exports (server)
      • Exports (client)
    • 🌐JobTracker
      • Installation
    • πŸ•΅οΈβ€β™‚οΈVehicleForceFirstPerson
      • Installation
    • 🎯BulletRicochet
      • Installation
  • πŸ†“Free Scripts
    • πŸ“žkimi_callbacks
      • Installation
      • Exports (server)
      • Exports (client)
      • Examples
    • 🚜VehicleDeformation
      • Installation
      • Exports (server)
      • Exports (client)
    • 🎦OrbitCam
      • Installation
      • Exports (client)
      • Commands
    • πŸ”οΈEarthquakeSimulator
      • Installation
      • Exports (server)
      • Commands
    • πŸ’€DeathCam
      • Installation
Powered by GitBook
On this page
  • Enable
  • UpdateVehicle
  • GetVehiclePosition
  • GetVehiclePositions
  • DeleteVehicle
  • DeleteVehicleOnServer
  1. Scripts
  2. AdvancedParking

Exports (client)

Enable

Enable/disable automatic saving of vehicles for a client.

Parameters: enable - bool - true to enable, false to disable

exports["AdvancedParking"]:Enable(false)


UpdateVehicle

Allows manually updating a vehicle if necessary.

Parameters: vehicle - int - Valid vehicle entity handle

exports["AdvancedParking"]:UpdateVehicle(vehicle)


GetVehiclePosition

Returns the position of a single vehicle.

Parameters: plate - string - The license plate text of a vehicle.

Returns: vector3? - The position of the vehicle or nil.

local position = exports["AdvancedParking"]:GetVehiclePosition(plate)


GetVehiclePositions

Returns the positions of several given vehicles.

Parameters: ... - string - The license plates of several vehicles as parameters.

Returns: dictionary<plate, position> - The positions of the vehicles. Can be empty if none was found.

local positions = GetVehiclePositions(plate1, plate2, plate3)
for plate, position in pairs(positions) do
    print(plate .. ": " .. tostring(position))
end


DeleteVehicle

Deletes a vehicle from the world and the internal table so that it doesn't respawn.

Parameters: vehicle - int - The vehicle to delete. keepInWorld? - bool - If the vehicle should stay in the world.

exports["AdvancedParking"]:DeleteVehicle(vehicle, false)


DeleteVehicleOnServer

Delete a vehicle without having access to the entity directly. At least one of the first three parameters must be provided.

Parameters: identifier? - string - The unique identifier provided by AdvancedParking. networkId? - int - The vehicle entity's network id. plate? - string - The vehicles license plate text. keepInWorld? - bool - If the vehicle should stay in the world.

local identifier = Entity(vehicle).state.ap_id
local networkId = NetworkGetNetworkIdFromEntity(vehicle)
local plate = GetVehicleNumberPlateText(vehicle)

exports["AdvancedParking"]:DeleteVehicleOnServer(identifier, networkId, plate, true)
PreviousExports (server)NextEvents (server)

Last updated 9 months ago

πŸ“„
πŸš™