Installation Guide
Follow these steps to install SF Crosshair on your FiveM server.
Prerequisites
Before installing, ensure you have:
- FiveM Server with latest artifacts
- mysql-async resource installed and running
- ESX or QBCore framework (recommended)
- Database access for SQL import
Step 1: Download & Extract
- Download the SF Crosshair resource from your purchase
- Extract the
SF-Crosshairfolder to your server'sresourcesdirectory - Ensure the folder structure looks like this:
resources/
βββ SF-Crosshair/
βββ client.lua
βββ server.lua
βββ config.lua
βββ fxmanifest.lua
βββ crosshair.sql
βββ README.md
βββ web/
βββ out/
βββ (compiled web files)Step 2: Database Setup
Import the database tables using the provided SQL file:
Method 1: phpMyAdmin
- Open phpMyAdmin in your browser
- Select your server's database
- Click "Import" tab
- Choose the
crosshair.sqlfile - Click "Go" to execute
Method 2: Command Line
mysql -u username -p database_name < crosshair.sqlMethod 3: HeidiSQL
- Open HeidiSQL and connect to your database
- Select your database
- Go to File > Load SQL file
- Select
crosshair.sqland execute
The following tables will be created:
crosshair_configs- Player crosshair configurationscrosshair_favorites- Saved favorite crosshairscrosshair_pins- Unique PINs for sharing system
Step 3: Server Configuration
Add SF Crosshair to your server.cfg:
# Add this line to your server.cfg
ensure SF-Crosshair
# Make sure mysql-async starts before SF-Crosshair
ensure mysql-async
ensure SF-CrosshairImportant: Ensure mysql-async starts before SF-Crosshair to avoid database connection issues.
Step 4: Framework Detection
SF Crosshair automatically detects your framework:
ESX Servers
- No additional configuration needed
- Automatically detects
es_extendedexport - Uses ESX character names in sharing system
QBCore Servers
- No additional configuration needed
- Automatically detects
qb-coreexport - Uses QBCore character names in sharing system
Standalone Servers
- Works without framework
- Limited to Steam names for sharing
- All other features fully functional
Step 5: Configuration (Optional)
Edit config.lua to customize the system:
-- Basic Settings
Config.Command = 'crosshair' -- Command to open menu
Config.OpenKey = 'F5' -- Default keybind
Config.ShowOnlyWhenAiming = true -- Show only when aiming
Config.DisableNativeCrosshair = true -- Disable GTA crosshair
-- Sharing Settings
Config.ShareDistance = 10.0 -- Distance for nearby sharing
-- Custom Images (optional)
Config.CustomImages = {
{
name = "Dot",
url = "https://example.com/dot.png",
preview = "Simple dot crosshair"
},
-- Add more images here
}Step 6: Start Server
- Save all configuration files
- Restart your FiveM server
- Check server console for any errors
- Look for success messages:
[SF Crosshair] Database tables checked/created successfully [SF Crosshair] ESX Framework detected (or QBCore) [SF Crosshair] v1.0 - Server loaded successfully
Step 7: Test Installation
- Join your server
- Use
/crosshaircommand or pressF5 - The crosshair menu should open
- Test basic functionality:
- Change crosshair style
- Adjust settings
- Save a favorite
- Check your PIN in Share tab
Verification Checklist
β Database Tables Created
- Check that the three tables exist in your database
β Resource Started
- Verify
SF-Crosshairappears in server console startup
β Framework Detected
- Look for framework detection message in console
β Menu Opens
- Test
/crosshaircommand works
β Settings Save
- Make changes and rejoin to verify persistence
Common Installation Issues
Resource Not Starting
- Check
fxmanifest.luaexists and is valid - Ensure resource name matches folder name exactly
- Verify
ensure SF-Crosshairis in server.cfg
Database Errors
- Confirm mysql-async is running before SF-Crosshair
- Check database connection in server.cfg
- Verify SQL file imported successfully
- Check MySQL user permissions
Menu Not Opening
- Test different keybinds in case F5 is conflicting
- Check server console for Lua errors
- Verify web files exist in
web/out/folder
Framework Not Detected
- Ensure ESX/QBCore is running before SF-Crosshair
- Check export names match your framework version
- Verify framework is properly configured
Next Steps
Once installed successfully:
- Configure - Customize settings in Configuration
- Learn Usage - Read the Usage Guide
- Setup Sharing - Understand the Sharing System
- Customize - Explore Customization Options
Support
If you encounter issues during installation:
- Discord: https://discord.gg/gsUpFV3KgR (opens in a new tab)
- Store: https://santafedev.store/ (opens in a new tab)
- Check Troubleshooting for common solutions
Installation guide by SantaFe Team π²π¦