Customization

Hook files for integrating with your notification system, dispatch, and economy. These files are open and editable.

Hook Files

File Side Purpose
utils/client.lua Client Notifications, blips, dispatch integration, mission callbacks
utils/server.lua Server Payment hooks, reward items, logging

Client Hooks

ShowNotification

function ClientUtils.ShowNotification(message, type, duration)
    -- type: 'success' | 'error' | 'primary' | 'warning' | 'info'
end

Replace with your notification system:

function ClientUtils.ShowNotification(message, type, duration)
    exports['okokNotify']:Alert('Taxi', message, duration or 5000, type)
end

ReportIllegalSurcharge

Called when an NPC detects illegal surcharge usage. Connect to your police dispatch:

function ClientUtils.ReportIllegalSurcharge(data)
    -- data.plate, data.coords, data.vehicleModel
end

CreatePickupBlip / CreateDestinationBlip

function ClientUtils.CreatePickupBlip(coords, label)  -- return: blip handle
function ClientUtils.CreateDestinationBlip(coords, label)  -- return: blip handle

OnMissionStarted / OnMissionCompleted

function ClientUtils.OnMissionStarted(data)
    -- data.pickupCoords, data.destinationCoords
end

function ClientUtils.OnMissionCompleted(data)
    -- data.fare, data.success, data.paymentMethod
end

OnPassengerPickedUp / OnPassengerDroppedOff

function ClientUtils.OnPassengerPickedUp(data)
    -- data.isNpc, data.seatIndex
end

function ClientUtils.OnPassengerDroppedOff(data)
    -- data.isNpc, data.paid, data.fled
end

Server Hooks

OnFarePaymentReceived

function ServerUtils.OnFarePaymentReceived(driverId, amount, method, passengerId)
    -- method: 'cash' | 'card'
    -- passengerId: nil for NPC
end

OnNpcMissionComplete

function ServerUtils.OnNpcMissionComplete(driverId, data)
    -- data.fare, data.paymentMethod, data.plate, data.crashCount
end

AddRewardItem

function ServerUtils.AddRewardItem(playerId, itemName, amount)
    -- Default: framework inventory (auto-detected)
end

Replace with your inventory:

function ServerUtils.AddRewardItem(playerId, itemName, amount)
    exports['ox_inventory']:AddItem(playerId, itemName, amount)
end

Language

Two locale files:

  • lang/en.lua — Server/client strings (notifications, NPC speech)
  • lang/en.json — UI strings (meter labels, dispatch board)

To add a language, copy the English files (e.g. fr.lua, fr.json) and set Config.Locale = 'fr'.

Last updated 1 month ago