Jump to content

heal a player if his health isn't to the max


BLK22

Recommended Posts

Hi, i need some help to complete this script.

I am looking for create an command (/heal) which can be used by players who their health isn't to the max (i dont know if you unterstand me)

Here is my code :

command /heal:
    permission: sk.heal
    permission message: "&cTu n'as &lpas la permission&r &cd''executer cette commande !"
    aliases: /hl
    trigger:
        if player's health is:
            send "&cVotre vie est au &lMaximum &c!"
        else:
            heal player
            send "&aVotre vie est de nouveau au &2&lMaximum &a!"

 

I am french so if you see some misstakes, I am sorry !

Edited by BLK22
Link to comment
Share on other sites

  • 2 months later...
On 4/28/2023 at 12:11 PM, BLK22 said:

Hi, i need some help to complete this script.

I am looking for create an command (/heal) which can be used by players who their health isn't to the max (i dont know if you unterstand me)

Here is my code :

command /heal:
    permission: sk.heal
    permission message: "&cTu n'as &lpas la permission&r &cd''executer cette commande !"
    aliases: /hl
    trigger:
        if player's health is:
            send "&cVotre vie est au &lMaximum &c!"
        else:
            heal player
            send "&aVotre vie est de nouveau au &2&lMaximum &a!"

 

I am french so if you see some misstakes, I am sorry !

command /heal:
    permission: sk.heal
    permission message: "&cTu n'as &lpas la permission&r &cd''executer cette commande !"
    aliases: /hl
    trigger:
        if player's health is 10:
            send "&cVotre vie est au &lMaximum &c!"
        else:
            heal player
            send "&aVotre vie est de nouveau au &2&lMaximum &a!"

 

#that should fix it for you

Link to comment
Share on other sites

  • 3 weeks later...
command /heal:
    permission: sk.heal
    permission message: "&cTu n'as &lpas la permission&r &cd''executer cette commande !"
    aliases: /hl
    trigger:
        if player's health is not player's max health:
            heal player
            send "&aVotre vie est de nouveau au &2&lMaximum &a!"
            stop
        send "&cVotre vie est au &lMaximum &c!"
        

 

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