Jump to content
Nd_

else running when the skript is successful

Recommended Posts

Code:

command /kit <text>:
           description: Get a Kit
           permission: getkit
           executable by: players
           trigger:
                      world is "ul_KitPVP":
                                 if arg 1 is "default":
                                            give player 1 wooden sword
                                            equip player with all leather armor
                                            message "&4You have equipped the Default kit"         
                                 else if arg 1 is "Cop":
                                            player has permission "kit.cop"
                                            equip player with all leather armor
                                            dye player's helmet blue
                                            dye player's chestplate blue
                                            dye player's leggings blue
                                            dye player's boots blue
                                            message "&4You have equipped the &1Cop&4 kit" 
                                            else:
                                            message "&4You don't have the &1Cop&4 kit"
                                 else:
                                            message "&4The Kit %argument% isn't a kit"
                      else:
                                 message "&4You are not in the KitPVP world"

When I type /kit Cop, it shows the You have equipped the Cop kit and You don't have the Cop kit(if you have the permission) and gives you the kit. If you don't have the permission, it does nothing. Adding stop after the You have equipped the Cop kit message stops it from showing both messages, but it won't send the You don't have the cop kit message if you don't have the permission

Share this post


Link to post
Share on other sites
33 minutes ago, OMan100 said:

It looks like you didnt Indent your code correctly.

I advise you to read this tutorial https://skripthub.net/tutorials/17 and specifically the Core Concepts of Skript part

Thanks

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...