FrenchCat

Help regarding PlayerDamage & hasBeenDamagedBy

Recommended Posts

Hello guys,
I used to make some simple scripts on SAMP/MTA and I would like you to take a look at those two events :

http://wiki.sa-mp.com/wiki/OnPlayerTakeDamage
https://wiki.multitheftauto.com/wiki/OnPlayerDamage

As you can see when someone gets injured we get interesting parameters such as the player that caused the damage and the weapon that he used.
I would like to get the same infos on RAGE:MP (when a player gets injured I want to know who is the other player that injured him).

From what I understand I will have to play around with those two things :
https://wiki.rage.mp/index.php?title=PlayerDamage
https://wiki.rage.mp/index.php?title=Entity::hasBeenDamagedBy
But to be honest I have no clue how to use hasBeenDamagedBy, and it also looks like PlayerDamage is a server side-event and hasBeenDamagedBy is a client-side function so there are some tricky stuff to do to make them work together and I have no clue how to do it.

It would have been nice if there was an "attacker" parameter in the PlayerDamage event, just like PlayerDeath has a "killer" parameter.
Some help regarding what I want to achieve would be very nice !

Thank you ! ^_^

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.