Vehicle Shop
Functions
Server

Server Functions

GetVehicleData

Gets vehicle data for a specific model.

exports["sd_vehicleshop"]:GetVehicleData(model)
  • model: string - Vehicle model name

Return: table|nil - Vehicle data or nil if not found

GetAllVehicles

Gets all vehicles from all shops.

exports["sd_vehicleshop"]:GetAllVehicles()

Return: table - Array of vehicle data

GetShopVehicles

Gets all vehicles from a specific shop.

exports["sd_vehicleshop"]:GetShopVehicles(shop)
  • shop: string - Shop identifier

Return: table - Array of vehicle data

IsPlayerAdmin

Checks if a player is an admin.

exports["sd_vehicleshop"]:IsPlayerAdmin(source)
  • source: number - Player source

Return: boolean - True if admin, false otherwise

AddVehicleToShop

Adds a vehicle to a shop programmatically.

exports["sd_vehicleshop"]:AddVehicleToShop(shop, model, name, price, category, image)
  • shop: string - Shop identifier
  • model: string - Vehicle model
  • name: string - Display name
  • price: number - Vehicle price
  • category: string - Vehicle category
  • image: string - Image URL (optional)

Return: boolean - Success status

RemoveVehicleFromShop

Removes a vehicle from a shop.

exports["sd_vehicleshop"]:RemoveVehicleFromShop(shop, model)
  • shop: string - Shop identifier
  • model: string - Vehicle model

Return: boolean - Success status

RefreshVehicles

Refreshes all vehicle data from the database.

exports["sd_vehicleshop"]:RefreshVehicles()

Return: boolean - Success status