mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

triggerServerEvent doesn't work for some players

Open RatajVaver opened this issue 1 year ago • 2 comments

Describe the bug

Server events are never fired when triggered by some clients. This issue started happening to few players on my server in last few days. Fresh installation of MTA client on different hard drive helped one of them, another solved it by installing nightly version and it worked for them as well, for many other players neither solution solves it.

Steps to reproduce

Example code:

-- client
addEventHandler("onClientResourceStart", getResourceRootElement(), function()
    iprint(triggerServerEvent("testEvent", getLocalPlayer()))
end)

-- server
addEvent("testEvent", true)
addEventHandler("testEvent", getRootElement(), function()
    iprint("OK!")
end)

Client 1 gets only "INFO: true" and "OK!" is never printed on the server. Client 2 gets both "INFO: true" and "OK!" is printed on the server. Tested on 2 different servers, it produces the same result on both, therefore it seems to be MTA client issue.

Version

Client 1: Multi Theft Auto v1.6-release-22556 (Windows 10, 64-bit) Client 2: Multi Theft Auto v1.6-release-22556 (Windows 11, 64-bit) - works for them

Server 1: Multi Theft Auto v1.6-release-22558 (Windows 10, 64-bit) Server 2: Multi Theft Auto v1.6-release-21846 (Debian 11, 64-bit)

Security Policy

  • [X] I have read and understood the Security Policy and this issue is not security related.

RatajVaver avatar Jun 26 '24 17:06 RatajVaver

Try doing something like setElementHealth instead of iprint. It's possible that this is a bug caused by some of the recent debug view/log changes.

Edit: Although I don't see why they would affect iprint tbh...

bum8hj avatar Jun 26 '24 17:06 bum8hj

We have some interference caused by the AC for some players at the moment, it will be fixed soon™.

botder avatar Jun 26 '24 19:06 botder

Hi, I would like to ask what the "soon" really means. The bug has persisted for more than three weeks now, many players are unable to connect to our server due to the server not being able to load the login panel, the situation with cheaters has not changed, on the contrary they continue to use spoofers and harm us and realistically we don't see that light of hope at the end of the dark tunnel full of anticheat fixes. Not being able to join a roleplay server for more than three weeks, where one is supposed to take care of the players, is a really annoying issue and we would like to know more.

Dzardys avatar Jul 18 '24 14:07 Dzardys