RP Injured Systemt
#1

I have a question.

How do you make a RolePlay injured system? Like after you died, You spawn again but injured

Displaying: "You're injured, Call an EMS, /service ems"

Like that.

What should i use, OnPlayerDeath or what?

Any codes?
Reply
#2

when they die get their position, onplayerspawn (check if they're dead), set their position and apply an animation freezing and locking their x y z so they can't move. put a gametext over it saying what you want
Reply
#3

I haven't ever played as a RPG player, though for RP servers - it would be looking good in case if the player reaches the minimum HP specified, he/she gets injured and the walk-style then changes. Making them not possible to jump and in case if the velocity is being increased than the limit, making the player fall would be good.

Under OnPlayerDeath, you are not able to ask the player to call an EMS service as they'd get redirected to OnPlayerSpawn (OnPlayerDeath calls only when player is dead). Check if player's HP is too low or do as a server sided HP system and calculate the amount. And then you can use animations.
Reply
#4

use on OnPlayertakedamage

or use a timer to check the player's health .
Reply
#5

Will try it out, thanks.
Reply
#6

You can't do it using OnPlayerDeath callback, I've tried it and it didn't work however I recommend you to apply a timer checking the player's health everyone second if it reaches (1) for example then apply an animation to him, freeze him, GameTextForPlayer, and do whatever else you want to do.
Reply
#7

@DaniceMcHarley.

The way i use is this, Once the player has 0 health, He will respawn to his last position and the injured system would trigger with a timer repeating every 1 second, Showing him a gametext - Playing the dead animation, If the animation didn't match with the dead animation, I play the dead animation ( To avoid playing the animation every 1 second ). Once his health reach 5.0 (Using a health checker), I will kill the timer and respawn him in the hospital starting with 1.0 health.

- Would that work perhaps?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)