1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

anything wrong with this?

Discussion in 'Skript' started by Doorstep_, Feb 14, 2021.

Thread Status:
Not open for further replies.
  1. Doorstep_

    Doorstep_ Member

    Joined:
    Dec 18, 2020
    Messages:
    16
    Likes Received:
    0
    command /Something:
    Trigger:
    if {server::command::Something::%player%} is not set:
    send "Nice, How did you find this? Well here's your prize."
    give player 32 diamonds
    set {server::command::Something::%player%} to "You can't use this command anymore!"
    else:
    send "&7%{server::command::Something::%player%}%"
     
  2. TehCheetah

    TehCheetah Member

    Joined:
    Feb 7, 2021
    Messages:
    49
    Likes Received:
    1
    Hey there!

    First off here, please make sure you use the CODE tags when writing your code!

    - At the end of a "send" you gotta say "to player" (There are more, but player is the most common one used.). Example:
    Code (Text):
    1.  
    2.   send "Hello there!" to player
    3.  


    - Try instead of "give player 32 diamonds" do
    Code (Text):
    1.  
    2. execute console command "/give %player% diamond 32"
    3.  


    - You have to set A variable to true or false or something else like a number or a letter, ect.
    - You can shorten the Variable a lot. just use {Something.%player%}

    Ill try and remake your Skript. Doesn't mean I'm perfect :emoji_slight_smile:

    Code (Text):
    1.  
    2. command /Something:
    3.     trigger:
    4.         if {something.%player%} is not set:
    5.             set {something.%player%} to false
    6.         send "&7How did you find this? Anyways, heres a prize!" to player
    7.         if {something.%player%} is false:
    8.             execute console command "give %player% diamond 32"
    9.             wait 2 ticks
    10.             set {something.%player%} to true
    11.         else:
    12.             if {something.%player%} is true:
    13.                 send "&7You already found this command! You cannot use it anymore."to player
    14. [/I]
    15.  
     
Thread Status:
Not open for further replies.

Share This Page

Loading...