-
-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onPlayerTeleport
false positive with default resources
#3993
Comments
onPlayerTeleport
false positive with default resources
Thanks for the report! The false positive happens due to improper use of the |
What is the point of doing it? now cheater just use this newly created trigger to teleport ... |
In the Freeroam script, any player can teleport anywhere. As discussed in the PR for the event addition, it was designed to help developers and server owners identify cheaters who teleport without any server-side action, not to protect the use of the setElementPosition function on the client side. |
Some of the I didn't check what other default resources are affected by this, I only tested freeroam & interiors |
Maybe worth to add some option to set element authority, for example you can set that given element can be edited only from server side |
Lets not off-topic this thread more. A proposal issue about disabling clientside @imfelipedev If there is a cheater who can change his/her position, then that cheater can also add himself/herself a vehicle or just get into an already spawned one and teleport with that, this way it won't get triggered. As I noted in the first post, knowing the positions from & to the player teleports would be more comfortable than any ugly way of retrieving these uppon this event trigger. Getting these as event params for the handler function. Dimensions and Interiors can also be passed for more comfort but not important. function handlePlayerTeleporting(fromX, fromY, fromZ, toX, toY, toZ, fromDim, fromInt, toDim, toInt) -- fromDim, fromInt, toDim, toInt are not important to add
iprint(source) -- player who triggered
-- TODO
end
addEventHandler("onPlayerTeleport", root, handlePlayerTeleporting) I don't know how will you solve the vehicle teleporting problem, (if you plan to 'fix' it) but I think that this event in this form is not ideal. |
I think it's totally valid to block functions like this on the client side. The problem is that it would break many scripts, and I'm not sure if something like that would be accepted by the team. As for vehicle teleportation and parameters, I'm working on that. |
Describe the bug
Hello!
We've tested this new event and it gives false positives with
interiors
andfreeroam
(F2 menu) resources. Didn't test other resources.Another thing:
it would be cool when the event triggers, to get the position, interior, dimension from & to where the player teleports as params.
Steps to reproduce
interiors
orfreeroam
Version
Client & Server: 22934
Additional context
No response
Relevant log output
Security Policy
The text was updated successfully, but these errors were encountered: