Kucluck Script
TebexDiscord
  • Introduction
  • Garage
    • KC Garage V1
      • ⚙️Installation
      • 🧰Functions
      • #️⃣Commands
      • ❓Common Issues
    • KC Garage V2
      • Installation
      • Functions
        • Jobs Impound
        • isParkingZone
        • getGarages
        • getImpounds
        • getGarageLabel
        • getImpoundLabel
        • getVehicleParkingFromPlate
      • Commands
      • Common Issues
  • Utils
    • KC Core Weapon
      • ⚙️Installation
      • ❓Common Issues
    • KC Logger
      • ⚙️Installation
      • 🧰Exports
      • 💡Tips
  • Side Jobs
    • KC Farming
      • ⚙️Installation
      • ❓Common Issues
Powered by GitBook
On this page
  • 👮 Job Impound
  • 🅿️ Get Parking Zone
  • 🗒️ Get Garage Name
  1. Garage
  2. KC Garage V1

Functions

The function created by exports is to make it easier for you to use several functions in kc_garage

👮 Job Impound

  • You can use in client

exports['kc_garage']:JobsImpound(ImpoundName, Vehicle, Identifier)
Code Block
Value
Explanation

ImpoundName

Impound key name

Your impound code name

Vehicle

Vehicle ID

you can use GetVehiclePedIsIn()

Identifier

Identifier

Player identifier

Example:

RegisterCommand('JobsImpound', function()
  local playerCoords = GetEntityCoords(PlayerPedId())
  local vehicle = GetClosestVehicle(playerCoords, 5.0)
  local playerData = ESX.GetPlayerData()
  exports['kc_garage']:JobsImpound('JobsImpound', vehicle, playerData.identifier)
end)

🅿️ Get Parking Zone

  • You can use this to find out whether the player is in the garage zone or not

exports['kc_garage']:IsParkingZone()

Example:

RegisterCommand('_rad', function()
  local parkingZone = exports['kc_garage']:IsParkingZone()
  if not IsPauseMenuActive() and not inRadialMenu and not IsDown then
    if parkingZone then
      Config.MenuItems[6] = {
        id = 'parkiran',
        title = 'Parkiran',
        icon = 'square-parking',
        type = 'cmd',
        event = 'parking',
        shouldClose = true
      }
    else
      Config.MenuItems[6] = nil
    end

    openRadial(true)
    SetCursorLocation(0.5, 0.5)
  end
end)

🗒️ Get Garage Name

  • You can get garages or impounds name in client or server

exports["kc_garage"]:GetGarageName(GaragesKeyName, ImpoundsKeyName)
Code Block
Value
Explanation

GaragesKeyName

Garage key name

Your garage code name

ImpoundsKeyName

Impound key name

Your impound code name

Example for find garages name:

## ESX Core
local garageName = exports['kc_newgarage']:GetGarageName(result[i].parking, false)
return garageName

## QB Core
local garageName = exports['kc_newgarage']:GetGarageName(result[i].garage, false)
return garageName

Example for find impounds name:

## ESX Core
local garageName = exports['kc_newgarage']:GetGarageName(false, result[i].parking)
return garageName

## QB Core
local garageName = exports['kc_newgarage']:GetGarageName(false, result[i].garage)
return garageName

Last updated 1 year ago

🧰