onClient doesn’t work
Description of the problem
onClient doesn’t work emitServer(Raw) doesn’t work
AltV related events work alt.emit works (client and server)
I’ve tried with freeroam resource I just downloaded from website, they don’t work
Reproduction steps
Emitting a custom server events from client
Expected behaviour
It should work
Additional context
No response
Operating system
Windows 11
Version
16.2.15 release
Crashdump ID
No response
Confirmation of issue's presence
- [X] By submitting this ticket, I affirm that I have verified the presence of this issue on the latest RC (Release Candidate) version available at the time of writing this ticket.
Without code, no reproducing.
Works for me here.
Please add logs and resources to repo it.
Most servers with >100 players didnt have problems.
Otherwise issue will closed in 2 days
I have this problem too.
web:
alt.emit('emitServerEvent', 'login:attempt', this.state.loginForm.username, this.state.loginForm.password, this.state.loginForm.rememberMe);`
client:
this.browser.on('emitServerEvent', (name: string, ...args: any[]) => {
alt.logDebug(`emitServerEvent: ${name}, ${args}`); // triggered
alt.emitServer(name, ...args);
});
server:
alt.onClient('login:attempt', this.loginAttempt.bind(this));
async loginAttempt(player: alt.Player, username: string, password: string, remember: boolean): Promise<void> {
alt.log('login Attempt triggered'); // not triggered
emitServer broken when I upgrade server to latest 16.2.8 -> 16.2.19 server onClient cannot receive