Skip to content

refactor: improve ped loading, error handling, and config management#733

Closed
LenixDev wants to merge 5 commits intoQbox-project:mainfrom
LenixDev:main
Closed

refactor: improve ped loading, error handling, and config management#733
LenixDev wants to merge 5 commits intoQbox-project:mainfrom
LenixDev:main

Conversation

@LenixDev
Copy link
Contributor

@LenixDev LenixDev commented Jan 8, 2026

Description

  1. avoid loading an unused variable
  2. loading the chosen gender ped model instead of random ones
  3. better error handling on the chat exports
  4. extending the server name from the server config with a default fallback instead of passing a default string
  5. changed the nationalities, just found it kinda fun to have a real game nationality. (optional)

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

- Move defaultSpawn require statement after early return condition
- Keep character module logic clear when using external characters
- Adjust whitespace for better readability
- Update randomPed function to accept accurateModelIndex for precise model selection
- Modify spawnDefault function to pass accurateModelIndex to randomPed when provided
- Change spawnDefault call to use character gender as accurateModelIndex parameter
- Ensure player model and appearance setting respects the accurate model choice
- Keep existing screen fade and spawn manager logic intact with new parameter support
- Wrap exports.chat:addMessage calls with pcall to catch and log errors
- Add error printing using lib.print.error on failure
- Ensure player OOC and proximity OOC message sending is safely handled
- Improve robustness of chat messaging in client and server scripts
- Update serverName to dynamically use GetConvar('sv_hostname', 'Server')
- Ensure serverName reflects current server hostname configuration
- Keep default spawn position and notify position unchanged
- Removed extensive list of nationalities from data/nationalities.lua
- Added a new list featuring fictional locations from a game universe
- Simplified return table to focus on place names instead of nationalities
- Improved maintainability by narrowing scope of data provided
@LenixDev LenixDev closed this by deleting the head repository Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant