Guard Plugin Problem

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Brandawg

Member
May 8, 2017
19
0
1
23
So I am using Citizens and SkRayFall Plugin to help me make a custom guard plugin. But I don't know how to make it so once a player makes a guard it's ID is put into a category called guard and I can check if a player is near a guard when he/she attacks here is my code.
code_language.skript:
command /guard:
    trigger:
        create a citizen named "&9&lGuard" at location of player
        set {_c} to last created citizen
        message "&8You have created a Guard"
        make citizen {_c} hold iron sword
        set citizen last created citizen max health to 400
on damage of a player:
    if distance between the player and citizen {_c} is smaller than 20:
        make citizen {_c} attack player
 
Status
Not open for further replies.