Server
GetVehicleData
Gets vehicle data for a specific model.
exports["sd_vehicleshop"]:GetVehicleData(model)Parameters:
| Parameter | Type | Description |
|---|---|---|
model | string | Vehicle model name |
Returns: table|nil - Vehicle data or nil if not found
GetAllVehicles
Gets all vehicles from all shops.
exports["sd_vehicleshop"]:GetAllVehicles()Returns: table - Array of vehicle data
GetShopVehicles
Gets all vehicles from a specific shop.
exports["sd_vehicleshop"]:GetShopVehicles(shop)Parameters:
| Parameter | Type | Description |
|---|---|---|
shop | string | Shop identifier |
Returns: table - Array of vehicle data
Parameters:
| Parameter | Type | Description |
|---|---|---|
source | number | Player source |
Returns: boolean - true if admin, false otherwise
AddVehicleToShop
Adds a vehicle to a shop programmatically.
exports["sd_vehicleshop"]:AddVehicleToShop(shop, model, name, price, category, image)Parameters:
| Parameter | Type | Description |
|---|---|---|
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) |
Returns: boolean - Success status
RemoveVehicleFromShop
Removes a vehicle from a shop.
exports["sd_vehicleshop"]:RemoveVehicleFromShop(shop, model)Parameters:
| Parameter | Type | Description |
|---|---|---|
shop | string | Shop identifier |
model | string | Vehicle model |
Returns: boolean - Success status
RefreshVehicles
Refreshes all vehicle data from the database.
exports["sd_vehicleshop"]:RefreshVehicles()Returns: boolean - Success status
Last updated on