Cancel Event; Command

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

jonu14

Member
May 18, 2019
1
0
0
Hi,
I'm currently working on my new script, however, I don't get on with this part;
skriptfehlker.PNG
As you can see, I'm German, so the text is also German, but hopefully that will not stop you from recognizing the mistake c:
first if-condition:
Shows the player, how many warns he already has.
second if-condition:
Does the same, except for a little grammatical change.
(1 warnings to one warning)
The problem is, I'm not able to do that within a command.
Output message:
warnings.PNG
The first line corresponds to the 1st If-Condition, the second line to the 2nd If-Condition.

I don't want the first line to show up, but "cancel event" is useless.
Can you help me? Would be very nice from you c:

~jonu14
 
code_language.skript:
command /warns:
    permission: elite.player.see.warns
    trigger:
        if {verwarnungen.%player%} is 1:
            message "&7Du hast &8eine &7Verwarnung"
        else:
            message "&7Du hast aktuell &8%{verwarnungen.%player%}% &7Verwarnungen"

I don't know if this is exactly what you want but I am assuming it is this. Also, if you have the permission listed in the top, you will not need it in the code itself.
 
Status
Not open for further replies.