π Apps
Managing Apps
Adding/Removing Apps
You can add or remove apps from the phone by modifying the config/config.json file:
- Navigate to
config/config.json - Locate the
appssection - Add or remove app entries as needed
- Restart the phone system (preferably the whole server)
Important Notes:
- JSON files don't support comments
- If apps don't disappear after removal, ensure you completely removed the entry (don't just comment it out)
- Always validate JSON syntax after modifications
Basic App Structure
App Restrictions
Job-Based Restrictions
You can restrict apps based on player jobs using disabledJobs and allowedJobs arrays:
Restriction Types
Disabled Jobs
- Purpose: Prevent specific jobs from accessing the app
- Usage: Add job names to
disabledJobsarray - Example: Police officers cannot access illegal communication apps
Allowed Jobs
- Purpose: Only allow specific jobs to access the app
- Usage: Add job names to
allowedJobsarray - Example: Only cartel members can access dark chat
Restriction Logic
- If
allowedJobsis defined: Only listed jobs can access the app - If
disabledJobsis defined: All jobs except listed ones can access the app - If both are defined:
allowedJobstakes precedence - If neither is defined: All jobs can access the app
Store-Hidden Apps
Set "storeHidden": true to keep an app out of the App Store / Play Store. Players cannot download it there. Install it with the InstallApp server export or an installer item.
Ghostlink USB
Ghostlink ships hidden from the store. Using ghostlink_usb installs it on the player's phone and consumes one USB after a successful installation. The player must have a phone set up. If Ghostlink is already installed, the USB is not consumed.
- Add the
ghostlink_usbdefinition frominventory-items/ox-items-*.txtorinventory-items/qb-items-*.txtto your inventory's item definitions. - Copy
inventory-items/ghostlink_usb.pnginto your inventory's image folder. For ox_inventory, useox_inventory/web/images/ghostlink_usb.png. - Restart the server, give the player a
ghostlink_usb, and use it from the inventory.
For ox_inventory, add this to ox_inventory/data/items.lua:
Change or disable the installer item in config/config.ghostlink.lua:
If you change the item name, update the inventory definition to match. Keep the ox_inventory server export and consume = 0; yseries handles consumption itself.
Ghostlink Payments
Configure skill prices and currency display in config/config.ghostlink.lua:
When CurrencyEnabled = true, yseries calls the editable payment hooks in server/custom/functions/ghostlink.lua. Add your charging logic there: framework money, crypto, or items.
Custom App Integration
Adding Custom Apps
- Create App Configuration:
- Implement App Logic:
- Create UI components in the phone interface
- Add server-side handlers if needed
- Implement app-specific functionality
App Development Guidelines
- Performance: Keep apps lightweight and responsive
- Consistency: Follow existing app design patterns
- Security: Validate all user inputs server-side
- Permissions: Respect job restrictions and permissions
Configuration Examples
Security App (Police Only)
Illegal Communications (No Police)
Universal Utility App
Troubleshooting
Common Issues
- Apps not appearing/disappearing:
- Check JSON syntax validity
- Ensure complete restart of resource/server
- Verify app entries are properly formatted
- Job restrictions not working:
- Check job names match exactly (case-sensitive)
- Verify player job data is properly set
- Test with different job assignments
- JSON parsing errors:
- Use a JSON validator to check syntax
- Remove any comments from JSON files
- Check for trailing commas
Validation Steps
- JSON Validation: Use online JSON validators
- Job Testing: Test restrictions with different job roles
- Server Logs: Check console for configuration errors
- Player Testing: Have players with different jobs test access