Menan AK47
MENAN AK47DOCS
DiscordStore
Navigation
Menu
Welcome
FAQ
ak47_lib
ak47_target
ak47_ambulancejob
ak47_banking
ak47_business
ak47_carboosting
ak47_cardealer
ak47_clothingshop
ak47_crafting
ak47_crime
ak47_crutch
ak47_deliveryjob
ak47_drugdealerv2
ak47_drugmanagerv3
Commands
Events
Validate
Client
Server
Addiction
Overdose
Dispatch
ak47_drugmissions
ak47_ecommerce
ak47_farming
ak47_fishing
ak47_fraudsystem
ak47_fuelstations
ak47_gangs
ak47_garage
ak47_garbagejob
ak47_hookahloungev2
ak47_housing
ak47_hud
ak47_iclothingv3
ak47_idcardv2
ak47_inventory
ak47_jobgarage
ak47_khusbites
ak47_khusland
ak47_leafnlatte
ak47_mafiasupply
ak47_mechanic
ak47_moneywash
ak47_multicharacter
ak47_npcmed
ak47_outfitbag
ak47_playershop
ak47_policejob
ak47_prospecting
ak47_radio
ak47_rentalcar
ak47_safezone
ak47_sitchair
ak47_smokingv2
ak47_supermarket
ak47_switch
ak47_territories
ak47_vehiclekeys
ak47_vipshop
Loaf
DocsMulti FrameworkClient

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 opening negotiation with an NPC during drug sales.

CanSellNPC = function(zoneData, item, amount, price)
    return true
end
Parameter Type Description
zoneData table Zone configuration table or default settings
item string Item name being sold
amount number Quantity to sell
price number Total price expected
  • Returns: boolean - true to permit sale, false to cancel.

CanSellDealer

Validates before selling items to a dealer shop.

CanSellDealer = function(shopData, item, amount, price)
    return true
end
Parameter Type Description
shopData table Dealer configuration table
item string Item name being sold
amount number Quantity to sell
price number Total money expected
  • Returns: boolean - true to permit sale, false to cancel.

CanBuyDealer

Validates before purchasing items from a dealer shop.

CanBuyDealer = function(shopData, item, amount, price)
    return true
end
Parameter Type Description
shopData table Dealer configuration table
item string Item name being purchased
amount number Quantity to buy
price number Total money required
  • Returns: boolean - true to permit purchase, false to cancel.

CanStockCornerboy

Validates before depositing drugs into a corner boy inventory.

CanStockCornerboy = function(cornerboyData, item, amount)
    return true
end
Parameter Type Description
cornerboyData table Corner boy configuration table
item string Item name being stocked
amount number Quantity to stock
  • Returns: boolean - true to permit deposit, false to cancel.

CanTakeCornerboyProfit

Validates before withdrawing profits from a corner boy.

CanTakeCornerboyProfit = function(cornerboyData, amount, currency)
    return true
end
Parameter Type Description
cornerboyData table Corner boy configuration table
amount number Profit amount to withdraw
currency string Currency type (cash, black_money, etc.)
  • Returns: boolean - true to permit withdrawal, false to cancel.

CanHarvestField

Validates before starting to harvest a plant in a drug field.

CanHarvestField = function(fieldData, plantId)
    if IsPedInAnyVehicle(PlayerPedId(), false) then
        return false
    end
    return true
end
Parameter Type Description
fieldData table Field configuration table
plantId number Plant index in field
  • Returns: boolean - true to permit harvesting, false to cancel.

CanCollect

Validates before collecting materials from a collection zone.

CanCollect = function(collectData)
    return true
end
Parameter Type Description
collectData table Collection zone configuration table
  • Returns: boolean - true to permit collection, false to cancel.

CanProcess

Validates before starting processing in a laboratory zone.

CanProcess = function(processData)
    return true
end
Parameter Type Description
processData table Process zone configuration table
  • Returns: boolean - true to permit processing, false to cancel.

CanHandcraft

Validates before starting to handcraft an item.

CanHandcraft = function(craftData)
    return true
end
Parameter Type Description
craftData table Handcraft recipe table
  • Returns: boolean - true to permit crafting, false to cancel.

CanUseDrug

Validates before consuming a drug item.

CanUseDrug = function(item, drugData)
    if IsPedInAnyVehicle(PlayerPedId(), false) and drugData.usetype == 'bong' then
        Lib47.Notify('You cannot use a bong while driving!', 'error')
        return false
    end
    return true
end
Parameter Type Description
item string Item name being consumed
drugData table Drug configuration and effects table
  • Returns: boolean - true to permit drug consumption, false to cancel.
Previous
Server
Next
Server
On this page
CanSellNPCCanSellDealerCanBuyDealerCanStockCornerboyCanTakeCornerboyProfitCanHarvestFieldCanCollectCanProcessCanHandcraftCanUseDrug