πApps
The YSeries phone system allows you to add, remove, and restrict apps through configuration files. Apps can be restricted based on player jobs or completely removed from the phone.
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.jsonLocate the
appssectionAdd 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
{
"key": "app_identifier",
"name": "App Display Name",
"description": "App Category/Description",
"defaultApp": false
}App Restrictions
Job-Based Restrictions
You can restrict apps based on player jobs using disabledJobs and allowedJobs arrays:
{
"key": "darkchat",
"name": "Dark Chat",
"description": "Communication",
"defaultApp": false,
"disabledJobs": ["police"],
"allowedJobs": ["cartel"]
}Restriction Types
Disabled Jobs
Purpose: Prevent specific jobs from accessing the app
Usage: Add job names to
disabledJobsarrayExample: Police officers cannot access illegal communication apps
"disabledJobs": ["police", "sheriff", "fbi"]Allowed Jobs
Purpose: Only allow specific jobs to access the app
Usage: Add job names to
allowedJobsarrayExample: Only cartel members can access dark chat
"allowedJobs": ["cartel", "gang", "mafia"]Restriction Logic
If
allowedJobsis defined: Only listed jobs can access the appIf
disabledJobsis defined: All jobs except listed ones can access the appIf both are defined:
allowedJobstakes precedenceIf neither is defined: All jobs can access the app
Custom App Integration
Adding Custom Apps
Create App Configuration:
{
"key": "myapp",
"name": "My Custom App",
"description": "Utilities",
"defaultApp": false,
"allowedJobs": ["mechanic"]
}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)
{
"key": "police_mdt",
"name": "Police MDT",
"description": "Law Enforcement",
"defaultApp": false,
"allowedJobs": ["police", "sheriff", "fbi"],
"icon": "shield"
}Illegal Communications (No Police)
{
"key": "encrypted_chat",
"name": "Encrypted Chat",
"description": "Communication",
"defaultApp": false,
"disabledJobs": ["police", "sheriff", "fbi", "ems"]
}Universal Utility App
{
"key": "calculator",
"name": "Calculator",
"description": "Utilities",
"defaultApp": true
}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
Debug Commands
-- Check current player job
/jobLast updated