# Accessible code

{% tabs %}
{% tab title="config.lua" %}

```lua
Config = {
    Notify = {
        duration = 5000, -- miliseconds
        position = 'top-right' -- 'top' or 'top-right' or 'top-left' or 'bottom' or 'bottom-right' or 'bottom-left' or 'center-right' or 'center-left'
    },

    RentVehicle = {
        Model = "taxi",
        Price = 500, -- price for rent
        SpawnLocation = {
            x = 916.7601,
            y = -170.5526,
            z = 74.0686,
            heading = 102.4279
        },
        Time = 300, -- for how long player can be out of vehicle in order not to stop the job
    },
    
    NPCMissions = {
        PaymentSplit = {
            enabled = true,     -- if true, money will be split between driver and society
            societyPercentage = 50,  -- percentage that goes to society (0-100)
            driverPercentage = 50    -- percentage that goes to driver (0-100)
        }
    },

    PricePerMeter = 0.5,
    NPC_Reward = 500, -- reward for driving npcs (government order)
    CompanyPrice = 500000,
    
    Target = {
        PedCoords = vector4(885.2797, -177.6391, 74.7003, 233.7115),
        ped = "a_m_y_business_03",
        distance = 5
    },

    NeedJob = false,
    JobName = "taxi", -- only if Config.NeedJob is true
    
    Wardrobe = {
        Enabled = true,
        Uniforms = {
            male = {
                outfitName = "Taxi Driver Male",
                components = {
                    [3] = {drawable = 11, texture = 0},   -- Torso
                    [4] = {drawable = 35, texture = 0},   -- Legs
                    [6] = {drawable = 10, texture = 0},   -- Shoes
                    [8] = {drawable = 15, texture = 0},   -- Undershirt
                    [11] = {drawable = 13, texture = 0},  -- Top
                }
            },
            female = {
                outfitName = "Taxi Driver Female",
                components = {
                    [3] = {drawable = 9, texture = 0},    -- Torso
                    [4] = {drawable = 34, texture = 0},   -- Legs
                    [6] = {drawable = 9, texture = 0},    -- Shoes
                    [8] = {drawable = 15, texture = 0},   -- Undershirt
                    [11] = {drawable = 86, texture = 0},  -- Top
                }
            }
        },
        Location = vector3(894.4448, -181.0158, 75.7002), -- Location of the wardrobe marker
        Marker = {
            type = 20,
            size = {x = 0.7, y = 0.7, z = 0.7},
            color = {r = 255, g = 255, b = 255, a = 100}
        }
    }
}

function giveVehicleKeys(vehicle)
    -- presetuped for ESX & QB frameworks
end

-- Framework
-- your framework loading here
```

{% endtab %}

{% tab title="gov\_orders.lua" %}

```lua
Gov_Orders = {
    vector3(881.8501, -515.0347, 57.2119),
    vector3(1148.4355, -995.6866, 45.4239),
    vector3(1304.9442, -1630.1829, 52.1889),
    vector3(424.2299, -1783.1376, 28.7924),
    vector3(-18.0380, -1455.9142, 30.4724),
    vector3(-191.2565, -1637.3353, 33.3844),
    vector3(51.4340, -1904.5940, 21.4959),
    vector3(429.8043, -2099.0039, 20.7244)  
}

Gov_Config = {
    NPCModels = {
        "a_m_y_business_01",
        "a_f_y_business_01", 
        "a_m_m_business_01",
        "a_f_m_business_01",
        "a_m_y_tourist_01",
        "a_f_y_tourist_01"
    },
    Animations = {
        Enter = "mini@strip_club@enter_walk_enter",
        Exit = "mini@strip_club@exit_walk_exit"
    },
    Timings = {
        EnterTimeout = 20, -- seconds to wait for NPC to enter vehicle
        ExitWalkAway = 5,  -- seconds to wait before deleting NPC after walking away
        ExitAnimation = 2   -- seconds to wait for exit animation
    },
    WalkAwayDistance = 50.0 -- units for NPC to walk away before despawning
}
```

{% endtab %}

{% tab title="markers.lua" %}

```lua
Markers = {}

Markers.Coords = {
    GetEmployed = {
        x = 895.3169,
        y = -179.5863,
        z = 74.7003
    }
}

Markers.Types = { -- https://docs.fivem.net/docs/game-references/markers/ (the marker type to draw)
    GetEmployed = 1,
    GovernmentOrder = 1
}

Markers.Colors = {
    GetEmployed = {
        r = 255,
        g = 239,
        b = 0
    },
    GovernmentOrder = {
        r = 255,
        g = 239,
        b = 0
    }
}
```

{% endtab %}

{% tab title="translation.lua" %}

```lua
Translation = {}

Translation = {
    Button = {
        GetEmployed = "Get Employed",
        Leave = "Leave"
    },
    TaxiJob = "Cab Driver Job",

    NotBought = "NOT BOUGHT",

    NotEmployed = "You are not employed as a taxi driver",
    AlreadyRented = "You've already rented taxi vehicle",

    SuccessfullyRented = "Taxi successfully rented",
    NotEnoughMoney = "You don't have enough money",

    BoughtCompany = "Taxi Company successfully bought",

    PassengerBoarded = "Passenger boarded, take him to the desired location marked on the GPS",
    GovJobStarted = "Job started, go to the waypoint marked on the GPS",
    GovOrderFinished = "You have successfully government order and received $%s",

    NewOrder = "The taxi company has just received a new order, use 'J' and view the order",

    GovOrderFinishedSplit = "You have completed the order! You made $%d and the taxi company got $%d",
    
    WardrobeTitle = "Taxi Wardrobe",
    WardrobePrompt = "[E] Access Wardrobe",
    PutOnUniform = "Put On Uniform",
    PutOnUniformDesc = "Change into your work uniform",
    TakeOffUniform = "Take Off Uniform",
    TakeOffUniformDesc = "Change back to your regular clothes",
    UniformPutOn = "You have changed into your work uniform",
    UniformTakenOff = "You have changed back to your regular clothes",
    NoOutfitToRestore = "No previous outfit to restore",

    VehicleSelection = "Choose Your Taxi",
    VehiclePrice = "Rental Cost: $%d",

    [1] = "Access the boss menu",
    [2] = "Boss Menu",
    [3] = "Withdraw Money",
    [4] = "Money In Society",
    [5] = "Withdraw money from Taxi Company",
    [6] = "Withdrawal Amount",
    [7] = "You have successfully withdrawn $%s from Taxi Company",
    [8] = "Sell Taxi Company",
    [9] = "Sell Taxi Company to the Government",
    [10] = "Company Value",
    [11] = "Confirmation Menu",
    [12] = "Are you sure you want to sell the company?",
    [13] = "You have successfully sold Taxi Company for $%s",
    [14] = "You don't have job as a Taxi Driver"
}
```

{% endtab %}

{% tab title="client/call\_taxi.lua" %}

```lua
RegisterNetEvent("uniq-taxi:client:sendAlert")
AddEventHandler("uniq-taxi:client:sendAlert", function()
    local ped = PlayerPedId()
    local position = GetEntityCoords(ped)
    local fposition = {x = position.x, y = position.y, z = position.z}

    QBCore.Functions.TriggerCallback("uniq-taxi:server:addTaxiCall", function() end, fposition)
    taxiAlert() -- send message to all employed taxis
end)

RegisterCommand("calltaxi", function()
    TriggerEvent("uniq-taxi:client:sendAlert")
end)
```

{% endtab %}

{% tab title="client/editable.lua" %}

```lua
function sendNotify(title, description, type)
    lib.notify({
        title = title,
        description = description,
        duration = Config.Notify.duration,
        type = type,
        position = Config.Notify.position
    })
end

RegisterNetEvent('uniq-taxi:notify', sendNotify)
```

{% endtab %}

{% tab title="client/orders.lua" %}

```lua
inordersmenu = false

RegisterCommand("+taxiorders", function()
    if LocalPlayer.state.rentedVehicle and (not inordersmenu) and (not LocalPlayer.state.govOrderStarted) then
        SendNUIMessage({type = "show_orders", status = true})
        SetNuiFocus(true, true)
        inordersmenu = true
    end
end)

RegisterKeyMapping('+taxiorders', 'Show Taxi Orders', 'keyboard', 'J')
```

{% endtab %}
{% endtabs %}
