OrigenNetwork
Docs

Custom · origen_meth_lab

The custom/ folder and the per-module bridge/**/custom/ folders are excluded from escrow. These are the only files you should edit to extend the resource or integrate it with your stack.

text
custom/
└── server/
    └── delivery.lua   ← reward hook fired on delivery completion
 
bridge/
├── framework/custom/    (server.lua, client.lua)
├── inventory/custom/    (server.lua, client.lua)
├── fuel/custom/         (client.lua)
├── helptext/custom/     (client.lua)
├── notify/custom/       (client.lua)
├── target/custom/       (client.lua)
├── vehiclekey/custom/   (client/client.lua)
└── progressbar/custom/  (client.lua)

Only edit files inside custom/ and bridge/**/custom/. All other resource files are escrow-protected and should not be modified.


custom/server/delivery.lua

Defines the Custom hook called when a delivery is completed.

Custom.OnCompleteDelivery(source)

Invoked server-side when a player finishes a delivery and Config.Delivery.reward.type is set to 'custom'. Use it to grant your own rewards (money, items, reputation, etc.).

ParameterTypeDescription
sourcenumberPlayer server ID who completed the delivery
lua
Custom.OnCompleteDelivery = function(source)
    -- Implement reward logic here, e.g. give money or items to the player
end

This hook only runs for reward.type = 'custom'. For 'money' or 'item' rewards the payout is handled automatically using Config.Delivery.reward. See Configuration.


bridge/**/custom/

If you set any module in config/bridge.lua to 'custom', implement the matching functions in that module's custom/ file. Each file ships with TODO comments describing which functions to fill in.

For example, to use a custom inventory set BridgeConfig.Inventory = 'custom' and complete bridge/inventory/custom/server.lua and bridge/inventory/custom/client.lua.