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!
You can always check out skUnity Downloads for downloads and any other information about Skript!
i made this skript in 1 minute so i don't know if it works correctly, i think yes cuz i see no errors on itHey, i've been trying to create multiple commands like /tpall or /killall or /kickall, but I dont want it to affect the one sending the command, how can I do that ?
loop all players:
loop-player is not %target%:
#do stuff
command /tpall [<offlineplayer>]:
permission message: &cYou have no permissions.
permissions: rank.admin
executable by: players
trigger:
if arg-1 is not set:
if number of all players >= 2:
loop all players:
if loop-player is not player:
teleport loop-player to player
send "&eYou were teleported to &6%player%." to loop-player
send "&aAll players have been teleported to you."
else:
send "&cNo players to teleport to your location."
else:
if arg-1 is online:
if number of all players >= 2:
loop all players:
if loop-player is not arg-1:
teleport loop-player to arg-1
send "&eYou were teleported to &6%arg-1%." to loop-player
send "&eAll players have been teleported to you." to arg-1
else:
send "&cNo player matching &e%arg-1% &cis connected to this server."
- loop all players:
- if loop-player is not player:
thanks, im gonna try iti made this skript in 1 minute so i don't know if it works correctly, i think yes cuz i see no errors on it
take this as example
Code:loop all players: loop-player is not %target%: #do stuff
Code:command /tpall [<offlineplayer>]: permission message: &cYou have no permissions. permissions: rank.admin executable by: players trigger: if arg-1 is not set: if number of all players >= 2: loop all players: if loop-player is not player: teleport loop-player to player send "&eYou were teleported to &6%player%." to loop-player send "&aAll players have been teleported to you." else: send "&cNo players to teleport to your location." else: if arg-1 is online: if number of all players >= 2: loop all players: if loop-player is not arg-1: teleport loop-player to arg-1 send "&eYou were teleported to &6%arg-1%." to loop-player send "&eAll players have been teleported to you." to arg-1 else: send "&cNo player matching &e%arg-1% &cis connected to this server."
So, it works perfectly , I tried that on /killall it works but when I add "spawn loop-player" it doesn't respawn them :/thanks, im gonna try it
command /killall:
permission: skript.killall
permission message: [&6Flash's Server&r] &cYou don't have permission to do that.
trigger:
loop all players in player's world:
loop-player is not player:
loop-player is not "FastAs_Flash":
kill loop-player
send "[&6Flash's Server&r] &4Killed all players in your world !"
send "[&6Flash's Server&r] &4You were killed by %player%" to loop-player
wait 2 ticks
spawn loop-player
You have to set the spawnpoint with another command and then teleport all playersthanks, im gonna try it
[doublepost=1591254337,1591253587][/doublepost]
So, it works perfectly , I tried that on /killall it works but when I add "spawn loop-player" it doesn't respawn them :/
[doublepost=1591254408][/doublepost]Code:command /killall: permission: skript.killall permission message: [&6Flash's Server&r] &cYou don't have permission to do that. trigger: loop all players in player's world: loop-player is not player: loop-player is not "FastAs_Flash": kill loop-player send "[&6Flash's Server&r] &4Killed all players in your world !" send "[&6Flash's Server&r] &4You were killed by %player%" to loop-player wait 2 ticks spawn loop-player
command /setspawn [<text>]:
permission message: [&6Flash's Server&r] &cYou don't have permission to do that.
permission: skript.setspawn
usage: /setspawn
trigger:
if arg-1 is not set:
set {spawn} to player's location
send "&aYou've set the spawnpoint at &f%{spawn}%&a."
else:
send "Unknown command."
command /spawn [<offlineplayer>] [<text>]:
permission message: [&6Flash's Server&r] &cYou don't have permission to do that.
permission: skript.spawn
executable by: players
usage: /spawn <player>
trigger:
if arg-1 is not set:
if arg-2 is not set:
teleport player to {spawn}
send "&aYou've teleported to spawn."
else:
send "Unknown command."
else:
if arg-2 is not set:
if arg-1 is online:
teleport arg-1 to {spawn}
send "&aYou've teleported &e%arg-1% &ato spawn."
send "&aYou were teleported to spawn." to arg-1
else:
send "&cNo player matching &e%arg-1% &cis connected to this server."
else:
send "Unknown command."
command /killall [<text>]:
permission message: [&6Flash's Server&r] &cYou don't have permission to do that.
permission: skript.killall
usage: /killall
trigger:
if arg-1 is not set:
loop all players in player's world:
loop-player is not player or "FastAs_Flash":
kill loop-player
heal loop-player #to prevent death title bug
teleport loop-player to {spawn}
send "[&6Flash's Server&r] &4You were killed by %player%" to loop-player
send "[&6Flash's Server&r] &4Killed all players in your world !"
else:
send "Unknown command."
on join:
teleport player to {spawn}
nvm it was a /spawnpoint bugYou have to set the spawnpoint with another command and then teleport all players
You can also use something like ''on join'' event.Code:command /setspawn [<text>]: permission message: [&6Flash's Server&r] &cYou don't have permission to do that. permission: skript.setspawn usage: /setspawn trigger: if arg-1 is not set: set {spawn} to player's location send "&aYou've set the spawnpoint at &f%{spawn}%&a." else: send "Unknown command." command /spawn [<offlineplayer>] [<text>]: permission message: [&6Flash's Server&r] &cYou don't have permission to do that. permission: skript.spawn executable by: players usage: /spawn <player> trigger: if arg-1 is not set: if arg-2 is not set: teleport player to {spawn} send "&aYou've teleported to spawn." else: send "Unknown command." else: if arg-2 is not set: if arg-1 is online: teleport arg-1 to {spawn} send "&aYou've teleported &e%arg-1% &ato spawn." send "&aYou were teleported to spawn." to arg-1 else: send "&cNo player matching &e%arg-1% &cis connected to this server." else: send "Unknown command." command /killall [<text>]: permission message: [&6Flash's Server&r] &cYou don't have permission to do that. permission: skript.killall usage: /killall trigger: if arg-1 is not set: loop all players in player's world: loop-player is not player or "FastAs_Flash": kill loop-player heal loop-player #to prevent death title bug teleport loop-player to {spawn} send "[&6Flash's Server&r] &4You were killed by %player%" to loop-player send "[&6Flash's Server&r] &4Killed all players in your world !" else: send "Unknown command."
Code:on join: teleport player to {spawn}
ye, but ''spawn %players%'' doesn't works so u have to make one or also, use ''force %players% to respawn"nvm it was a /spawnpoint bug
command /killall [<text>]:
permission message: [&6Flash's Server&r] &cYou don't have permission to do that.
permission: skript.killall
usage: /killall
trigger:
if arg-1 is not set:
loop all players in player's world:
loop-player is not player or "FastAs_Flash":
kill loop-player
force loop-player to respawn
send "[&6Flash's Server&r] &4You were killed by %player%" to loop-player
send "[&6Flash's Server&r] &4Killed all players in your world !"
else:
send "Unknown command."
unnecessary, this thread has been solvedjust do: if loop-player is not player:
https://gyazo.com/82a9fc1eb1f0fd0c9d0220b2a9911593 uhm@Dave i tried to explain it as easy as possible, Sherlock.