Discord Thread how do i send it to every one but player

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

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.

skUnity Discord

Site Manager
Aug 5, 2023
12,749
1
0
The skUnity Discord
discord.gg
command afk:
trigger:
add 1 to {afkYN%player%}

if {afkYN%player%} is 1:
send "&b[boxcraft] &cyou are now afk" to player



if {afkYN%player%} is 2:
set {afkYN%player%} to 0


if {afkYN%player%} is 0:
send "&b[boxcraft] &ayou are no longer afk" to player
broadcast "&b[boxcraft] &a%player% is no longer afk" to "world"

variables:
{afkYN%player%} = 0

Posted by: ilikecats4104 from the skUnity Discord. View the thread on skUnity Discord here
 
alright
you wanna loop all players and then check if the loop player isn't the command sender
if it isn't, send a message to the loop player
code_language.skript:
loop all players:
  if loop-player != command sender:
something like that

Posted by: nylhus from the skUnity Discord.
 
code_language.skript:
command example:
  loop all players:
    if loop-player != command sender:
      send "hello" to loop player
something like that

Posted by: nylhus from the skUnity Discord.
 
Alright, so when you use
loop all players:, it's looping through every online player one at a time. The expression loop-player
is the player that your code is currently looping through

Posted by: nylhus from the skUnity Discord.
 
The line in the skript I sent
if loop-player != command sender
is checking if the loop-player is the same player as the command sender, and if it isn't, to send a message to that player. Basically it's going through and sending a message to every player but the command sender

Posted by: nylhus from the skUnity Discord.
 
Status
Not open for further replies.