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!

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

Solved Send a Title to everyone

Discussion in 'Requests' started by iCritiqing, Sep 23, 2017.

  1. i

    iCritiqing Member

    Joined:
    Jul 4, 2017
    Messages:
    13
    Likes Received:
    0
    So i want to send every player a title about the server is restarting
    the Title is "&c&lServer Restarting"
    the Subtitle is "&ain [time] seconds"

    Here's my code:

    Code (Skript):
    1. options:
    2.  
    3.     prefix: &c&lSoul&f&lStars &8&l>> &r
    4.  
    5.  
    6.  
    7. command /icrst [<text>]:
    8.  
    9.     permission: icritiqing.restarttimings.use
    10.  
    11.     permission message: {@prefix}&cOH HELL NO!
    12.  
    13.     trigger:
    14.  
    15.         #passwordnya yang ada di dalem tanda petik!
    16.  
    17.         if arg 1 is "120204":
    18.        
    19.             broadcast ""
    20.  
    21.             broadcast ""
    22.  
    23.             broadcast "{@prefix}&a%player% &cmenyalakan mode restart! !"
    24.  
    25.             broadcast ""
    26.  
    27.             broadcast ""
    28.            
    29.             wait 1 second
    30.  
    31.             broadcast ""
    32.  
    33.             broadcast ""
    34.  
    35.             broadcast "{@prefix}&cServer ini akan di restart dalam waktu 10 detik!"
    36.  
    37.             broadcast ""
    38.  
    39.             broadcast ""
    40.  
    41.             wait 5 second
    42.  
    43.             broadcast ""
    44.  
    45.             broadcast ""
    46.  
    47.             broadcast "{@prefix}&cServer ini akan di restart dalam waktu 5 detik!"
    48.  
    49.             broadcast ""
    50.  
    51.             broadcast ""
    52.  
    53.             wait 1 second
    54.  
    55.             broadcast ""
    56.  
    57.             broadcast ""
    58.  
    59.             broadcast "{@prefix}&cServer ini akan di restart dalam waktu 4 detik!"
    60.  
    61.             broadcast ""
    62.  
    63.             broadcast ""
    64.  
    65.             wait 1 second
    66.  
    67.             broadcast ""
    68.  
    69.             broadcast ""
    70.  
    71.             broadcast "{@prefix}&cServer ini akan di restart dalam waktu 3 detik!"
    72.  
    73.             broadcast ""
    74.  
    75.             broadcast ""
    76.  
    77.             wait 1 second
    78.  
    79.             broadcast ""
    80.  
    81.             broadcast ""
    82.  
    83.             broadcast "{@prefix}&cServer ini akan di restart dalam waktu 2 detik!"
    84.  
    85.             broadcast ""
    86.  
    87.             broadcast ""
    88.  
    89.             wait 1 second
    90.  
    91.             broadcast ""
    92.  
    93.             broadcast ""
    94.  
    95.             broadcast "{@prefix}&cServer ini akan di restart dalam waktu 1 detik!"
    96.  
    97.             broadcast ""
    98.  
    99.             broadcast ""
    100.  
    101.             execute console command "restart"
    102.  
    103.         else if arg 1 is not "120204":
    104.  
    105.             send "{@prefix}&cPassword salah!"
    106.  
    107.         else:
    108.  
    109.             send "{@prefix}&c/icrst (password)"
    110.  
    111.             send "{@prefix}&cPassword ada di dalam skript ''rewstart.sk''"
    112.  
    113.             stop
    I searched the docs and i found that i can use SkRayFall to make titles and subtitles, so i make this

    send player title "&cServer Restarting" with subtitle "&ain 10 seconds" for 5 seconds
    wait 5 seconds
    send player title "&cServer Restarting" with subtitle "&ain 5 seconds" for 1 seconds
    wait 1 seconds
    send player title "&cServer Restarting" with subtitle "&ain 4 seconds" for 1 seconds
    wait 1 seconds
    send player title "&cServer Restarting" with subtitle "&ain 3 seconds" for 1 seconds
    wait 1 seconds
    send player title "&cServer Restarting" with subtitle "&ain 2 seconds" for 1 seconds
    wait 1 seconds
    send player title "&cServer Restarting" with subtitle "&ain 1 seconds" for 1 seconds

    But that only sends it to me(i think, haven't tested that out yet)

    but, i want it to send it to all online players
     
  2. Best Answer:
    Post #2 by Orangejuiceyummy, Sep 24, 2017
  3. Orangejuiceyummy

    Joined:
    Jan 26, 2017
    Messages:
    20
    Likes Received:
    0
    Loop all player and send your stuff to the loop-player.
     
  4. Donut

    Addon Developer

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    175
    Medals:
Loading...