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 FrameworkServer

Server

Synchronous server-side decision functions located in custom/server/validate.lua. Return true to allow the action on the server or false to reject it.

CanSellNPCServer

Validates before awarding money and removing drugs during NPC drug sales.

CanSellNPCServer = function(source, zoneData, item, amount, price, currency)
    return true
end
Parameter Type Description
source number Player server ID
zoneData table Zone configuration table or default setting
item string Item name being sold
amount number Quantity being sold
price number Total price expected
currency string Currency type (cash, black_money, etc.)
  • Returns: boolean - true to approve transaction, false to reject.

CanSellDealerServer

Validates when a player sells items to a dealer shop.

CanSellDealerServer = function(source, shopData, item, amount, price, currency)
    return true
end
Parameter Type Description
source number Player server ID
shopData table Dealer configuration table
item string Item name being sold
amount number Quantity being sold
price number Total price expected
currency string Currency type
  • Returns: boolean - true to approve sale, false to reject.

CanBuyDealerServer

Validates when a player purchases items from a dealer shop.

CanBuyDealerServer = function(source, shopData, item, amount, price, currency)
    return true
end
Parameter Type Description
source number Player server ID
shopData table Dealer configuration table
item string Item name being purchased
amount number Quantity being purchased
price number Total price required
currency string Currency type
  • Returns: boolean - true to approve purchase, false to reject.

CanStockCornerboyServer

Validates when a player deposits drugs into a corner boy.

CanStockCornerboyServer = function(source, cornerboyData, item, amount)
    return true
end
Parameter Type Description
source number Player server ID
cornerboyData table Corner boy configuration table
item string Item name being stocked
amount number Quantity being stocked
  • Returns: boolean - true to approve deposit, false to reject.

CanHarvestFieldServer

Validates when a player requests to start harvesting a plant in a drug field.

CanHarvestFieldServer = function(source, fieldData, plantId)
    return true
end
Parameter Type Description
source number Player server ID
fieldData table Field configuration table
plantId number Plant index in field
  • Returns: boolean - true to approve harvesting, false to reject.

CanCollectServer

Validates when a player claims an item from a collection zone.

CanCollectServer = function(source, collectData)
    return true
end
Parameter Type Description
source number Player server ID
collectData table Collection zone configuration table
  • Returns: boolean - true to approve collection, false to reject.

CanProcessServer

Validates when a player processes materials in a laboratory zone.

CanProcessServer = function(source, processData)
    return true
end
Parameter Type Description
source number Player server ID
processData table Process zone configuration table
  • Returns: boolean - true to approve processing, false to reject.

CanHandcraftServer

Validates when a player finishes handcrafting an item.

CanHandcraftServer = function(source, craftData)
    return true
end
Parameter Type Description
source number Player server ID
craftData table Handcraft recipe table
  • Returns: boolean - true to approve crafting, false to reject.

CanUseDrugServer

Validates before a drug is consumed and its effects are applied on the server.

CanUseDrugServer = function(source, item, drugData)
    return true
end
Parameter Type Description
source number Player server ID
item string Drug item name being consumed
drugData table Drug configuration and effects table
  • Returns: boolean - true to approve drug consumption, false to reject.
Previous
Client
Next
Client
On this page
CanSellNPCServerCanSellDealerServerCanBuyDealerServerCanStockCornerboyServerCanHarvestFieldServerCanCollectServerCanProcessServerCanHandcraftServerCanUseDrugServer