Help with send different messages for all players

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

  • 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.

Rootzera

Member
Apr 26, 2020
3
0
0
23
Code:
command /a <text>:
    trigger:
        message "Type1: &b%argument 1%" to all players within 5 meters of the player
        message "Type2: &c%argument 1%" to all players the distance between 6 meters and 15 meters of the player


Hi, first sorry for my poor english.
So, I don't know how I get the player to send a different message to two types of players. The first type of message the player is 5 meters from the player and this first one works, but in the second type I would like players between 6 and 15 meters to receive the different message and not the first type of message.
 
Code:
command /YourCommand [<text>]:
    trigger:
        loop all players:
            send "Your Message here" to loop-player
 
Sorry, I read through this issue a bit too quickly.

Code:
command /testcommand [<text>]:
    trigger:
        send "Type1: &b%argument 1%" to players in radius 5 around player
        send "Type2: &c%argument 1%" to players in radius 6-15 around player

I verified myself, that the code works. although optimizations could definetly be made, I think you understand the working of the code
 
Thank you very much, but even with your help I couldn't develop the skript with the conditional, I tried it in many ways and it didn't work, could you help me?

Code:
command /a <text>:
    trigger:
        if players is in radius 5 around player:
            send "Type1: &b%argument 1%"
        else:
            send "Type2: &c%argument 1%" to players in radius 6-15 around player
 
Thank you very much, but even with your help I couldn't develop the skript with the conditional, I tried it in many ways and it didn't work, could you help me?

Code:
command /a <text>:
    trigger:
        if players is in radius 5 around player:
            send "Type1: &b%argument 1%"
        else:
            send "Type2: &c%argument 1%" to players in radius 6-15 around player



Try this, I didn't test it out though
Code:
command /a <text>:
    trigger:
        loop players in radius 5 around player:
            send "Type1: &b%argument 1%" to loop-player
        else:
            send "Type2: &c%argument 1%" to players in radius 6-15 around player
 
Status
Not open for further replies.