Solved stopping new player announcement

  • 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 community!

    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.

Adrihun

Member
Feb 1, 2017
368
6
0
Is there a way to make it so it doesn't announce it for the player that first joins?

code_language.skript:
on first join:
loop all players:
send loop-player title "&aNew Soul" with subtitle "&fA new soul has summoned!"
play raw sound "random.levelup" at loop-player with pitch 0.5 volume 10
stop

It will send a title to EVERYONE in the server. How do i make it so only the people see it, not the player that first joins?
 
I dont really understand what you need help on, could you try and explain it a bit better?
 
I dont really understand what you need help on, could you try and explain it a bit better?
Alright, i'll try.
Basically, Me (Adrihun) joins the server for the first time, it will say to me "Soul" "new soul has been summoned" is there a way to make it so i dont see this? only the other people
 
Here you go, try this out:
Code:
on first join:
    loop all players:
        if {firstJoin::%player%} is not set:
            set {firstJoin::%player%} to false
            stop
        else:
        send loop-player title "&aNew Soul" with subtitle "&fA new soul has summoned!"
        play raw sound "random.levelup" at loop-player with pitch 0.5 volume 10
        stop
 
That's wrong @Brendo99 , you're using "stop" so it will only loop over 1 player then stop the rest of the code.

Just add a check for if the loop-player is the player that joined:

code_language.skript:
on first join:
    loop players:
        loop-player isn't player
        send loop-player title "&aNew Soul" with subtitle "&fA new soul has summoned!"
        play raw sound "random.levelup" at loop-player with pitch 0.5 volume 10
 
That's wrong @Brendo99 , you're using "stop" so it will only loop over 1 player then stop the rest of the code.

Just add a check for if the loop-player is the player that joined:

code_language.skript:
on first join:
    loop players:
        loop-player isn't player
        send loop-player title "&aNew Soul" with subtitle "&fA new soul has summoned!"
        play raw sound "random.levelup" at loop-player with pitch 0.5 volume 10

Didnt even notice the stop there :emoji_stuck_out_tongue: I just copied and pasted his code and changed it.
 
That's wrong @Brendo99 , you're using "stop" so it will only loop over 1 player then stop the rest of the code.

Just add a check for if the loop-player is the player that joined:

code_language.skript:
on first join:
    loop players:
        loop-player isn't player
        send loop-player title "&aNew Soul" with subtitle "&fA new soul has summoned!"
        play raw sound "random.levelup" at loop-player with pitch 0.5 volume 10
thanks!!
[doublepost=1488673638,1488673364][/doublepost]
Didnt even notice the stop there :emoji_stuck_out_tongue: I just copied and pasted his code and changed it.
btw do any of you guys know why "volume 10" doesn't work? Like, i change 10 to 3 and the volume doesnt change

Using
Skript 2.2 dev 22f
SkRayFall Latest
bungee 1.11
ViaVersion latest
Spigot 1.8.9
 
Use this with SkRayFall:
code_language.skript:
play "LEVEL UP" to player at volume 3
 
Use this with SkRayFall:
code_language.skript:
play "LEVEL UP" to player at volume 3
thanks. do you know how to make it so if skript cant connect to the database it will just shutdown the server?
 
With MySQL?
yes :emoji_grinning:
please give me an example if you could because i am not that good at skript :emoji_grinning:
btw, is there a script that will remove a file in the server at the Skript start, like if you have server-icon, and the server starts, it will remove that file. Or remove 'logs' folder, because i have a script that makes a different, better log text file
 
Last edited by a moderator:
Status
Not open for further replies.