Admin Settings
This page covers admin permission configuration and available admin commands for managing Koja-Crafting.
π§ Configuration Options
All admin settings are located in shared/config.lua under the ADMIN PERMISSIONS section.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- ADMIN PERMISSIONS
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.AdminGroups = { 'admin', 'owner', 'superadmin', 'god' }π Setting Description
Admin Groups
Config.AdminGroups = { 'admin', 'owner', 'superadmin', 'god' }Purpose: Define which player groups have access to admin commands.
How it works:
The script checks if a player's group matches any entry in this list
Case-sensitive (must match exact group names in your framework)
π οΈ Available Admin Commands
Add Blueprint Command
Command: /addblueprint [playerID] [blueprintItem]
Purpose: Grant a blueprint to a player, allowing them to craft special items.
Syntax:
/addblueprint [playerID] [blueprintItem]Parameters:
playerID
Number
Target player's server ID
1, 5, 42
blueprintItem
String
Blueprint item name from config
parachute_blueprint
Examples:
# Give parachute blueprint to player 1
/addblueprint 1 parachute_blueprint
# Give weapon blueprint to player 5
/addblueprint 5 weapon_blueprintWhat happens:
Blueprint is added to player's database record
Player receives notification
Blueprint item becomes available in crafting menu
Player can now craft the associated item
Requirements:
Player must be online
Blueprint must exist in crafting config
Item must have
blueprintItemfield defined
Blueprint Configuration Example:
blueprints = {
{
respname = 'parachute',
name = 'Parachute',
category = 'tools',
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 = 100
}
}Add Experience Command
Command: /addexp [playerID] [amount]
Purpose: Grant experience points to a player for crafting level progression.
Syntax:
/addexp [playerID] [amount]Parameters:
playerID
Number
Target player's server ID
1, 5, 42
amount
Number
XP amount to add
100, 500, 1000
Examples:
# Give 100 XP to player 1
/addexp 1 100
# Give 500 XP to player 5 (might level up)
/addexp 5 500What happens:
XP is added to player's current experience
Player's level is recalculated automatically
If enough XP, player levels up (possibly multiple times)
Player receives notification with new level
Progress saved to database immediately
π Permission Errors
Debugging Permission Issues
Enable debug mode:
Config.Debug = trueCheck console output:
[KOJA-CRAFTING] Player 5 attempting admin command
[KOJA-CRAFTING] Player group: 'user'
[KOJA-CRAFTING] Required groups: admin, superadmin, owner
[KOJA-CRAFTING] Permission deniedCheck framework initialization:
[koja-crafting] INITIALIZING FRAMEWORK: ESXπ Admin Command Reference
/addblueprint
[playerID] [item]
Grant blueprint to player
Admin group
/addexp
[playerID] [amount]
Give XP to player
Admin group
π Related Documentation
For progression system details, see Player Progression
For crafting configuration, see Crafting Stations
For server setup, see Server Settings
For command implementation, see Commands
Last updated