For the complete documentation index, see llms.txt. This page is also available as Markdown.

Client

Synchronous client-side decision functions located in `custom/client/validate.lua`. Return `true` to allow the action or `false` to block it.

CanSellNPC

Validates before a player starts or initiates selling to an NPC.

Signature

CanSellNPC(zoneData) -> boolean

Data Structure (zoneData)

{
    uid = "zone_1", -- string or "anywhere"
    setting = {
        name = "Downtown",
        currency = "cash",
        coprequired = 1,
        robchance = 10,
        rejectchance = 15
    }
}

Example

CanSellNPC = function(zoneData)
    if IsPedInAnyVehicle(PlayerPedId(), false) then
        Lib47.Notify('You cannot sell drugs from inside a vehicle!', 'error')
        return false
    end
    return true
end

CanSellDealer

Validates before a player opens a dealer menu or sells items to a dealer.

Signature

Data Structure (shopData)

Example


CanBuyDealer

Validates before a player purchases items from a dealer.

Signature

Example


CanAccessCornerboy

Validates before a player opens a cornerboy ped interaction menu.

Signature

Data Structure (cornerboyData)

Example


CanStockCornerboy

Validates before a player stocks drugs into a cornerboy.

Signature


CanHarvestField

Validates before a player begins harvesting a plant in a drug field.

Signature

Data Structure (fieldData)

Example


CanCollect

Validates before a player collects from a collection zone.

Signature

Data Structure (collectData)


CanProcess

Validates before a player starts processing in a lab zone.

Signature

Data Structure (processData)


CanHandcraft

Validates before a player starts handcrafting an item.

Signature

Data Structure (craftData)


CanUseDrug

Validates before a player consumes a drug.

Signature

Data Structure (drugData)

Example

Last updated