FAQ
Common issues involving player logout, buildable doors, editor input and voice dimensions.
Logging out inside a house
Players do not automatically load back inside the property after reconnecting.
Implement this behavior for your server by locating PlayerDropped in the resource.
When the player logs out, retrieve their position and update the MySQL user position. The example below shows where this can be added.
PlayerDroppedMySQLDoors inside player-built houses
Openable doors cannot be placed reliably when building a house.
Unfreezing the doors caused them to fall through the map.
Double cursor while building
The in-game mouse remains disabled while the NUI cursor handles building input.
Rendering the in-game mouse information continuously would reduce performance.
Using both input systems would also make keybind and camera movement tracking more difficult.
Players can hear each other in different houses
The dimension system uses the FiveM SetEntityRoutingBucket native, but the voice resource must also respect routing buckets.
If players in different houses can hear one another, update the voice resource to verify that both players have the same GetEntityRoutingBucket value.
SetEntityRoutingBucketGetEntityRoutingBucketPlayer logout example
Add the server-specific position update inside the existing playerDropped handler.
static playerDropped(source: string | number) {
if (typeof source !== 'number') source = Number(source);
const Player = this.at(source);
if(Player) {
/** If dimension not the default */
// if(Player.dimension != 0) {
// const House = HouseManager.at(Player.dimension);
// if(House) {
// const houseEntrance = House.position;
// /** Update MySQL to place the player at the house entrance after logout. */
// }
// }
/** Delete at the end. */
if (this.Players.has(source)) {
this.Players.delete(source);
}
}
}