Jump to content
  • 0

else running when the skript is successful


Question

Posted

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 run /kit Cop, it shows both the &4You have equipped the &1Cop&4 kit and the &4You don't have the &1Cop&4 kit messages. Also, it you don't have the permission, it says(or does) anything. I tried putting stop  after the Equip Cop message, but only fixed one problem.

Thanks

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

add stops

so in the code, after one thing runs like it gives you the kit and runs the items, add a

stop

so that the code halts and doesn't continue to the else statement

Edited by BluBoy3ch0

 


[PATRON] Echology

image.png.25b196fc30999f9133398315a98c2b11.png

Sponk = Weeb


 

  • 0
Posted

Please don't reply to posts that haven't been active in over a month.

LOCKED

Quote

“When life gives you lemons, don't make lemonade. Make life take the lemons back! Get mad!"

Default - 12/12/2015

[VIP] - 10/8/2018

[JR.MOD] - 9/12/2020

[MOD] - 10/14/2020

Guest
This topic is now closed to further replies.
×
×
  • Create New...