Skip to content
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

Make onVehicleDamage identical to onClientVehicleDamage #3943

Open
1 task done
derxgbb opened this issue Jan 10, 2025 · 0 comments
Open
1 task done

Make onVehicleDamage identical to onClientVehicleDamage #3943

derxgbb opened this issue Jan 10, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@derxgbb
Copy link

derxgbb commented Jan 10, 2025

Is your feature request related to a problem? Please describe.

It would be nice if serverside event onVehicleDamage would be the same as clientside event onClientVehicleDamage so we would have the attacker, used weapon, positions etc params on serverside as well. Scripters wouldn't need to rely on client code.

Example usage:
Imagine a gamemode where you collect some money, xp etc on your charachter but if you die you lose it.
Players don't want to lose progress so they'll do anything against that, for example disconnecting from the server when they take damage.
We built up a system where you can't disconnect in the next 15 seconds if you take damage (from players). (you can, but you will get a surprise)
Problem is that if the player is in a vehicle we can't retrieve why the vehicle got damaged. For example if the driver just collided with a wall etc. We would need to use the clientside variant of the event but relying on client code today is not efficient. Cheaters can stop client code executing and all other malicious stuff.

Describe the solution you'd like

function handleVehicleDamage(attacker, weapon, loss, x, y, z, tire)
    -- TODO
end
addEventHandler("onVehicleDamage", root, handleVehicleDamage)

Describe alternatives you've considered

clientside variant of the event works

Additional context

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.
@derxgbb derxgbb added the enhancement New feature or request label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant