Jump to content

Had player fallen to the ground?


DarkLink

Recommended Posts

Posted

Okay guys, I guess that was already been posted something about this..

I searched but didnt find the post :S

So at the event onPlayerDamage I want to know if the source ( the player that got damage ) hitted the ground..

Let me get it clear: When player gets punched sometimes he falls on the ground.

I wanna know if there is some function that does that. isPlayerOnGround is not for this, I already notice on wiki.

My friend told me, to use getGroundPosition and then get Z position of the player and if its less than a certain amount (that I need to test) he (the player that got punched) is on ground..

But here comes alot of problems:

1º this function is client side, and will mess my things..

2º Me and my friend are not 100% sure if Z position of a player changes between his states (up, crounch, down on floor)..

Thanks guys, would appreciate some help here :/

Posted
when a player get the damage by fall, the weapon is 54

its described here Death reasons

Thanks for ur help, but its not that what I am looking for.

Its when its damaged, not when its dead .

And I wanna know if he falls to the ground when its damaged.

Ty

Posted

I made it u can close it.

btw solution:

  
    task = getPedSimplestTask ( source ) 
     
    if (task == "TASK_SIMPLE_FALL") then 
                 --do wtv u want here.. 
        end 
  

Posted

Guys can u help me?

I have been testing, and this is not the best solution..

Becouse some times the source ( player that got hitted) goes to ground, but he's task is not TASK_SIMPLE_FALL , that was suppose to be..

I tested it with outputchatbox..

Any better solution?

TY

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...