Jump to content

custom damage handler


kaos057

Recommended Posts

I am trying to make a full MMO with levels, custom armor/weapons, etc. To do this I need to disable default damage and handle it myself in order to take into consideration extra hitpoints and damage modifiers from the custom gear. I know I can disable the damage on client side using onClientPlayerDamage which works for any self inflicted damage but the server side still does damage.

So is there any way to either stop all damage completely or somehow make a player have more hitpoints than others?

Link to comment

To delete player damage use:

addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), cancelEvent )  

To make another damage , you can try this:

setElementHealth ( source, getElementHealth(source) - 20 )  

-- Example

///EDIT

Oh.. someone write this first : |

Edited by Guest
Link to comment

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.
×
×
  • Create New...