Skip to content

Types

If you found some weird/custom types in our documentation you can find what they mean on this page. If you are missing any let use know on Discord.

GarageType

Type of garage.

Type

Valid option Description
indoor This garage uses an IPL or shell for it's interior.
outdoor This garage is outdoor and doesn't require any teleporting to an IPL or shell.

VehicleType

Type of vehicles.

Type

Valid option Description
road This is a road vehicle garage. (cars & motorcycles)
sea This is a garage for sea vehicles like boats.
air This is a garage for air vehicles like airplanes and helicopters.
choppers Only helicopters are able to park here.
airplanes Only airplanes are able to park here.

ParkingType

Type of parking.

Type

Valid option Description
public Everyone can park here.
private Only people renting this garage (or are given access by the owner) can enter & park here.
property Only the owner or people given access can enter & park here.
job Only people with the given job can enter & park here.
impound The garage where impounded vehicles go.

GarageRentType

The renting type of this rentable garage.

Type

Valid option Description
spot You rent only 1 spot, other players can rent the other spots.
garage You rent the full garage, you can manage access to it yourself.

GarageAccessType

The access type of this garage access entry.

Type

Valid option Description
player accessValue will be a framework id of a player.
job accessValue will be a job name.
gang accessValue will be a gang name.

VehicleStatus

The current status of the vehicle.

Type

Valid option Description
available Vehicle is available somewhere in the world. If not it can be valet'd.
to_scrap Vehicle should be scrapped. Can still be driven and valet'd.
scraped Vehicle has been scrapped. It won't spawn in the world until insurance payment is provided (unless disabled) then it can be valet'd back to you.
unavailable Fallback status. Vehicle is for some unknown reason long term unavailable and couldn't be spawned in the world. You can request it to be valet'd to you to set it back to available again.

CanImpoundFunc

An extra function that checks if a player is allowed to impound or not.

Info

Will always be run from the server side.

Arguments

Name Type Description
Bridge CoreObject Our rn-bridge core object. Kind of the same as a qb-core or ESX core object. TypeScript auto completion/suggestion should help you use it.
source number | undefined The server id of the player who is trying to impound a vehicle. Source is undefined if the server console impounds the vehicle.
vehicle number | null The (server-sided) vehicle entity id that is targeted for the impound. If this is null then this isn't a server sided vehicle.

Example

export const UserConfig: IUserConfig = {
  // ...
  canImpound: function(Bridge: CoreObject, src?: number, vehicle?: number | null) {
    // Run some checks like this, just make sure to return a boolean
    return IsPlayerAceAllowed(source, "groups.admin")
  },
  // ...
}

CanReleaseOwnFunc

An extra function that checks if a player is allowed to release their own vehicle or not.

Info

Will always be run from the server side.

Arguments

Name Type Description
Bridge CoreObject Our rn-bridge core object. Kind of the same as a qb-core or ESX core object. TypeScript auto completion/suggestion should help you use it.
source number The server id of the player who is trying to release a vehicle.
vehicle number The (server-sided) vehicle entity id that is targeted for releasing.

Example

export const UserConfig: IUserConfig = {
  // ...
  canReleaseOwnedVehicles: function(Bridge: CoreObject, src: number, vehicle: number) {
    // Run some checks like this, just make sure to return a boolean
    return IsPlayerAceAllowed(source, "groups.admin")
  },
  // ...
}

AllowedTo

A function that checks if a user has access.

Info

Will always be run from the server side.

Arguments

Name Type Description
source number The server id of the player who is trying to perform a config screen action.
configTab string | null The tab the user tries to access or manipulate.
If null the user is trying to open the screen itself.
args any[] An array with other arguments based on request type.
If you really want to use these, check out AllowedToSpecific.

Example

export const UserConfig: IUserConfig = {
  // ...
  allowedToManageConfigScreen: function (source: number, configTab: string, ...args: any[]) {
    // Run some checks like this, just make sure to return a boolean
    return IsPlayerAceAllowed(source, "groups.admin")
  },
  // ...
}

AllowedAdminCar

A function that checks if a user is allowed to use the admincar command.

Info

Will always be run from the server side.

Arguments

Name Type Description
source number The server id of the player who is trying to perform this action.

Example

export const UserConfig: IUserConfig = {
  // ...
  allowedToAdminCar: function(source: number) {
    // Run some checks like this, just make sure to return a boolean
    return IsPlayerAceAllowed(source, "groups.admin")
  },
  // ...
}

AllowedToSpecific

An object with functions to run more specific permission checks then AllowedTo

Info

All functions will always be run from the server side.

AllowedToGet

Triggered when a user is trying to fetch or get data for the config screen.

Arguments

Name Type Description
source number The server id of the player who is trying to perform a config screen action.
configTab string | null The tab the user tries to access or manipulate.
If null the user is trying to open the screen itself.
databaseId number | string | undefined The database id of what the user is trying to access.

Example

export const UserConfig: IUserConfig = {
  // ...
  allowedToManageConfigScreen: {
    // ...
    allowedToGet: function(source: number, configTab: string, databaseId?: number | string) {
      // Run some checks like this, just make sure to return a boolean
      return IsPlayerAceAllowed(source, "groups.admin")
    }
    // ...
  },
  // ...
}

AllowedToSave

Triggered when a user is trying to save data from the config screen to the database.

Arguments

Name Type Description
source number The server id of the player who is trying to perform a config screen action.
configTab string | null The tab the user tries to access or manipulate.
If null the user is trying to open the screen itself.
data Record<string, ConfigScreenRecord> The data the user is trying to save to the database.

Example

export const UserConfig: IUserConfig = {
  // ...
  allowedToManageConfigScreen: {
    // ...
    allowedToSave: function(source: number, configTab: string, data: Record<string, ConfigScreenRecord>) {
      // Run some checks like this, just make sure to return a boolean
      return IsPlayerAceAllowed(source, "groups.admin")
    }
    // ...
  },
  // ...
}

AllowedToDelete

Triggered when a user is trying to delete something from the database through the config screen.

Arguments

Name Type Description
source number The server id of the player who is trying to perform a config screen action.
configTab string | null The tab the user tries to access or manipulate.
If null the user is trying to open the screen itself.
databaseId number | string The database id of what the user is trying to delete.

Example

export const UserConfig: IUserConfig = {
  // ...
  allowedToManageConfigScreen: {
    // ...
    allowedToDelete: function(source: number, configTab: string, databaseId?: number | string) {
      // Run some checks like this, just make sure to return a boolean
      return IsPlayerAceAllowed(source, "groups.admin")
    }
    // ...
  },
  // ...
}

AllowedToUtils

Triggered when a user is trying to use utilities.

Arguments

Name Type Description
source number The server id of the player who is trying to perform a config screen action.
configTab string | null The tab the user tries to access or manipulate.
If null the user is trying to open the screen itself.
utilKey string The internal utility name the use is trying to use.
data Record<string, any> An object with data that is needed to run the utility correctly.
Utility keys
Utility key Refers to
moveToGarage Move vehicle to an inside garage
giveKeys Give vehicles keys to given player

Example

export const UserConfig: IUserConfig = {
  // ...
  allowedToManageConfigScreen: {
    // ...
    allowedToUtils: function(source: number, configTab: string, utilKey: string, data?: Record<string, any>) {
      // Run some checks like this, just make sure to return a boolean
      return IsPlayerAceAllowed(source, "groups.admin")
    }
    // ...
  },
  // ...
}

GarageModel

Basic garage database model.

Interface

Keys Type Optional Description
id Number No Unique garage id.
displayName String No Display name of the garage.
garageType GarageType | String No Type of garage. Allows custom types.
vehicleType VehicleType No Vehicle type this garage supports.
parkingType ParkingType No Type of parking
parkingCost Number | null No Cost to park (if any).
parkingCostInterval Number | null No Interval for parking cost billing.
maxParkingDuration Number | null No Maximum time a vehicle can be parked here.

ExportedGarageModel

Garage model with exported metadata.

Interface

Note

This interface extends GarageModel.

Keys Type Optional Description
ownerFrameworkId String | null No Framework id of the owner.
rentType GarageRentType | null No Renting type for this garage.
trackingProxy Vector3 | null No Position used for tracking.
allowedJobs String[] | null No Jobs allowed to access this garage.
canManageEventName String | null No Event name used to check if a user can manage this garage.
eventOnTowingNeeded String | null No Event name to emit when towing is needed.

IndoorGarageModel

Indoor garage model.

Interface

Note

This interface extends ExportedGarageModel.

Keys Type Optional Description
interiorId Number No Interior id used for this garage.
garageType "indoor" No Garage type (indoor).
carEntrance Vector4 No Vehicle entrance position.
carExit Vector4 No Vehicle exit position.
entrance Vector4 No Player entrance position.
canEnterEventName String | null No Event name used to check if a user can enter.

ExportedIndoorGarageModel

Indoor garage model with export metadata.

Interface

Note

This interface extends IndoorGarageModel.

Keys Type Optional Description
amountOfParkingSpots Number No Total parking spots inside the garage.

OutdoorGarageModel

Outdoor garage model.

Interface

Note

This interface extends ExportedGarageModel.

Keys Type Optional Description
garageType "outdoor" No Garage type (outdoor).
blipPos Vector3 No Blip position for the map.
polyzone PolyZone No Parking area polyzone.
maxParkingSpots Number No Maximum parking spots available.

ValidGarageModel

Refers to either IndoorGarageModel or OutdoorGarageModel depending on the garage type.

PlayerVehicleModel

The exported model for player vehicles.

Interface

Keys Type Description
id Number Database identifier
ownerFrameworkId String The framework id of the player who owns the vehicle.
model String Either the named vehicle model or stringified hash of the vehicle model.
plate String(8) The plate text of the vehicle.
Limit of 8 characters, only letters and numbers are allowed, no spaces either. Failing to follow these limitation may result in the script not recognizing vehicles and other weird things.
status VehicleStatus The current status of the vehicle.
parkedAt Number | null The garage the vehicle is currently parked at. Null = not parked in a garage.
parkedInSpot Number | null The spot the vehicle is currently parked in. Is only set if parked in an indoor garage.
parkedWhen Number (unix timestamp) | null A unix timestamp of when the vehicle was parked.
impounded Boolean If the vehicle is impounded or not.
impoundedAt Number (unix timestamp) | null A unix timestamp of when the vehicle was impounded.
lastPos Vector4 The last known position of the vehicle.
mods JSON An object with all type of vehicle mods installed in the vehicle. We reused QBCore's vehicle mod reading and setting for this so if you'd like to know more check out QBCore's resources for more info.

It doesn't matter what framework you use, we implemented the functionality in rn-bridge and made the code standalone.

ScrapyardModel

The exported model for scrapyards.

Interface

Keys Type Description
id Number Database identifier
displayName String Display name of this scrapyard.
scrapPos Vector3 Coordinates of where the interactable position is going to be.
npcSpawnPoint Vector4 Coordinates of where the NPC will spawn from.
npcModel String Ped model name you want the NPC to have.

TowTarget

Where you need to tow the vehicle to.

Type

Valid option Description
"IMPOUND" Vehicle needs to be towed to an impound.
"SCRAP" Vehicle needs to be towed to a scrapyard and be scraped.

DispatchReason

The reason for this dispatch call.

Type

Valid option Description
"stolen_npc_vehicle_parking" An non-player vehicle (stolen by player) is being (tried) parked at a garage.