Exports (server)
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.
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.
GetVehiclePositions
Returns the positions of several given vehicles.
Parameters:
... - string
- Variable number of license plates as arguments.
Returns:
dictionary<string, vector3>
- The positions of the vehicles. Can be empty if none was found.
DeleteVehicleUsingData
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.
EnsureStateBag
Ensures that a specific state bag on an entity is saved by AdvancedParking.
Parameters:
vehicle - int
- The vehicle to check the state bag.
bagKey - string
- The key of the state bag to check for.
Returns:
bool
- true on success, false when e.g. state bag was missing
GetVehicleFromStateBagValue
Tries to find a vehicle that has a specific state bag value attached.
Parameters:
bagKey - string
- The key to search for.
bagValue - any
- The value to search for.
Returns:
int?
- The vehicle handle if a match was found.
GetStateBagsFromVehicle
Gets all state bags from a vehicle that has been saved by AdvancedParking.
Parameters:
vehicle - int
- The vehicle handle.
Returns:
dictionary<bagKey, bagValue>
- A table containing all found state bag keys and values.
GetStateBagsFromPlate
Gets all state bags from a vehicle that has been saved by AdvancedParking given its plate.
Parameters:
plate - string
- The vehicle's license plate text.
Returns:
dictionary<bagKey, bagValue>
- A table containing all found state bag keys and values.
Last updated