Commands
This page covers all available commands in Koja-Crafting, their usage, permissions, and examples.
π Command Overview
Koja-Crafting provides two admin commands for managing player progression and blueprints:
/addblueprint
Grant blueprint to player
Admin
[playerID] [item]
/addexp
Give experience to player
Admin
[playerID] [amount]
π Permission System
Who Can Use Commands?
Commands are restricted to players with admin permissions. Access is controlled by Config.AdminGroups:
-- In shared/config.lua
Config.AdminGroups = { 'admin', 'owner', 'superadmin', 'god' }How it works:
Script checks player's job/group from framework (ESX/QBCore)
If player's group matches any in
Config.AdminGroups, command executesIf no match, player receives permission denied message
Configuration Examples:
-- ESX Standard
Config.AdminGroups = { 'admin', 'superadmin', 'owner' }
-- QBCore Standard
Config.AdminGroups = { 'admin', 'god' }
-- Custom Setup
Config.AdminGroups = { 'moderator', 'admin', 'developer', 'owner' }
-- Restricted (Owners only)
Config.AdminGroups = { 'owner' }For detailed permission setup, see Admin Permissions.
π· Add Blueprint Command
Command Syntax
/addblueprint [playerID] [blueprintItem]Parameters
playerID
Number
Target player's server ID
β Yes
blueprintItem
String
Blueprint item name from config
β Yes
What It Does
Grants a special blueprint to the specified player.
Saves blueprint to player's database record (koja-crafting table).
Unlocks the corresponding item in crafting menu (if level requirement met).
Sends notification to the player.
Persists through server restarts and player disconnects.
Blueprint Configuration
In shared/config.lua:
blueprints = {
{
respname = 'parachute',
name = 'Parachute',
category = 'advanced',
image = './images/parachute.webp',
blueprintItem = 'parachute_blueprint', -- β This is what you use in command
craftingTime = 120,
requiredLevel = 4,
resources = {
{ name = 'cloth', amount = 10 },
{ name = 'rope', amount = 5 }
},
exp = 150
}
}Command to give:
/addblueprint 1 parachute_blueprintError Messages
π Add Experience Command
Command Syntax
/addexp [playerID] [amount]Parameters
playerID
Number
Target player's server ID
β Yes
amount
Number
XP amount to add
β Yes
What It Does
Adds specified XP to player's current experience.
Automatically calculates if player levels up.
Handles multiple level-ups in one command.
Saves progress to database immediately.
Notifies player of new level/XP.
Unlocks items if new level requirement met.
Error Messages
π οΈ Console vs In-Game
Running from Server Console
Commands can also be executed from server console:
# In server console (txAdmin, etc.)
addexp 1 500
addblueprint 5 weapon_blueprintNote: When running from console (source = 0), permission checks are bypassed.
π Command Reference Table
/addblueprint
[id] [item]
Admin
Grant blueprint
β Yes
/addexp
[id] [amount]
Admin
Give XP
β Yes
π Related Documentation
For permission setup, see Admin Permissions
For XP system details, see Player Progression
For blueprint configuration, see Crafting Stations
For server setup, see Server Settings
Last updated